@choosemycompany/ui 0.1.0 → 0.3.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/dist/assets/index.css +1 -1
- package/dist/index.d.ts +88 -0
- package/dist/index.js +1330 -67
- package/dist/index.umd.js +2 -2
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -1,123 +1,1386 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/index.css';const
|
|
1
|
+
import { defineComponent as j, computed as E, createElementBlock as I, openBlock as x, normalizeClass as k, renderSlot as C, Fragment as ye, createCommentVNode as _, unref as S, createVNode as je, createElementVNode as W, withCtx as Fe, ref as Q, shallowRef as _e, onMounted as Ee, watch as $e, onUnmounted as Ae, h as oe, nextTick as Le, createBlock as Me } from "vue";
|
|
2
|
+
import './assets/index.css';const Ne = {
|
|
3
3
|
primary: "primary",
|
|
4
4
|
secondary: "secondary"
|
|
5
|
-
},
|
|
5
|
+
}, ze = {
|
|
6
6
|
default: "default",
|
|
7
7
|
danger: "danger"
|
|
8
|
-
},
|
|
8
|
+
}, De = {
|
|
9
9
|
small: "small",
|
|
10
10
|
medium: "medium"
|
|
11
|
-
},
|
|
11
|
+
}, Re = ["disabled"], Kt = /* @__PURE__ */ j({
|
|
12
12
|
name: "CmcButton",
|
|
13
13
|
__name: "CmcButton",
|
|
14
14
|
props: {
|
|
15
|
-
kind: { default:
|
|
16
|
-
variant: { default:
|
|
17
|
-
size: { default:
|
|
15
|
+
kind: { default: Ne.primary },
|
|
16
|
+
variant: { default: ze.default },
|
|
17
|
+
size: { default: De.medium },
|
|
18
18
|
disabled: { type: Boolean, default: !1 },
|
|
19
19
|
loading: { type: Boolean, default: !1 }
|
|
20
20
|
},
|
|
21
21
|
emits: ["click"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
22
|
+
setup(e, { emit: n }) {
|
|
23
|
+
const t = e, s = n, o = E(() => ({
|
|
24
24
|
button: !0,
|
|
25
|
-
[`button--${
|
|
26
|
-
[`button--${
|
|
27
|
-
[`button--${
|
|
28
|
-
"button--disabled":
|
|
29
|
-
})),
|
|
30
|
-
|
|
25
|
+
[`button--${t.variant}`]: !0,
|
|
26
|
+
[`button--${t.kind}`]: !0,
|
|
27
|
+
[`button--${t.size}`]: !0,
|
|
28
|
+
"button--disabled": t.disabled
|
|
29
|
+
})), i = () => {
|
|
30
|
+
t.disabled || s("click", 1);
|
|
31
31
|
};
|
|
32
|
-
return (
|
|
32
|
+
return (r, c) => (x(), I("button", {
|
|
33
33
|
type: "button",
|
|
34
|
-
class: o
|
|
35
|
-
onClick:
|
|
36
|
-
disabled:
|
|
34
|
+
class: k(o.value),
|
|
35
|
+
onClick: i,
|
|
36
|
+
disabled: t.disabled
|
|
37
37
|
}, [
|
|
38
|
-
|
|
39
|
-
], 10,
|
|
38
|
+
C(r.$slots, "default")
|
|
39
|
+
], 10, Re));
|
|
40
40
|
}
|
|
41
|
-
}),
|
|
41
|
+
}), P = {
|
|
42
42
|
h1: "h1",
|
|
43
43
|
h2: "h2",
|
|
44
44
|
h3: "h3",
|
|
45
45
|
h4: "h4",
|
|
46
46
|
h5: "h5",
|
|
47
47
|
h6: "h6"
|
|
48
|
-
},
|
|
48
|
+
}, Be = /* @__PURE__ */ j({
|
|
49
49
|
name: "CmcHeading",
|
|
50
50
|
__name: "CmcHeading",
|
|
51
51
|
props: {
|
|
52
52
|
level: {}
|
|
53
53
|
},
|
|
54
|
-
setup(
|
|
55
|
-
const
|
|
54
|
+
setup(e) {
|
|
55
|
+
const n = e, t = E(() => ({
|
|
56
56
|
heading: !0,
|
|
57
|
-
[`heading-${
|
|
57
|
+
[`heading-${n.level}`]: !0
|
|
58
58
|
}));
|
|
59
|
-
return (
|
|
60
|
-
|
|
59
|
+
return (s, o) => (x(), I(ye, null, [
|
|
60
|
+
S(P).h1 === n.level ? (x(), I("h1", {
|
|
61
61
|
key: 0,
|
|
62
|
-
class:
|
|
62
|
+
class: k(t.value)
|
|
63
63
|
}, [
|
|
64
|
-
|
|
65
|
-
], 2)) :
|
|
66
|
-
|
|
64
|
+
C(s.$slots, "default")
|
|
65
|
+
], 2)) : _("", !0),
|
|
66
|
+
S(P).h2 === n.level ? (x(), I("h2", {
|
|
67
67
|
key: 1,
|
|
68
|
-
class:
|
|
68
|
+
class: k(t.value)
|
|
69
69
|
}, [
|
|
70
|
-
|
|
71
|
-
], 2)) :
|
|
72
|
-
|
|
70
|
+
C(s.$slots, "default")
|
|
71
|
+
], 2)) : _("", !0),
|
|
72
|
+
S(P).h3 === n.level ? (x(), I("h3", {
|
|
73
73
|
key: 2,
|
|
74
|
-
class:
|
|
74
|
+
class: k(t.value)
|
|
75
75
|
}, [
|
|
76
|
-
|
|
77
|
-
], 2)) :
|
|
78
|
-
|
|
76
|
+
C(s.$slots, "default")
|
|
77
|
+
], 2)) : _("", !0),
|
|
78
|
+
S(P).h4 === n.level ? (x(), I("h4", {
|
|
79
79
|
key: 3,
|
|
80
|
-
class:
|
|
80
|
+
class: k(t.value)
|
|
81
81
|
}, [
|
|
82
|
-
|
|
83
|
-
], 2)) :
|
|
84
|
-
|
|
82
|
+
C(s.$slots, "default")
|
|
83
|
+
], 2)) : _("", !0),
|
|
84
|
+
S(P).h5 === n.level ? (x(), I("h5", {
|
|
85
85
|
key: 4,
|
|
86
|
-
class:
|
|
86
|
+
class: k(t.value)
|
|
87
87
|
}, [
|
|
88
|
-
|
|
89
|
-
], 2)) :
|
|
90
|
-
|
|
88
|
+
C(s.$slots, "default")
|
|
89
|
+
], 2)) : _("", !0),
|
|
90
|
+
S(P).h6 === n.level ? (x(), I("h6", {
|
|
91
91
|
key: 5,
|
|
92
|
-
class:
|
|
92
|
+
class: k(t.value)
|
|
93
93
|
}, [
|
|
94
|
-
|
|
95
|
-
], 2)) :
|
|
94
|
+
C(s.$slots, "default")
|
|
95
|
+
], 2)) : _("", !0)
|
|
96
96
|
], 64));
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
98
|
+
}), Wt = /* @__PURE__ */ j({
|
|
99
99
|
name: "CmcTitle",
|
|
100
100
|
__name: "CmcTitle",
|
|
101
|
-
setup(
|
|
102
|
-
return (
|
|
103
|
-
|
|
104
|
-
level:
|
|
101
|
+
setup(e) {
|
|
102
|
+
return (n, t) => (x(), I(ye, null, [
|
|
103
|
+
je(Be, {
|
|
104
|
+
level: S(P).h1
|
|
105
105
|
}, {
|
|
106
|
-
default:
|
|
107
|
-
n
|
|
106
|
+
default: Fe(() => [
|
|
107
|
+
C(n.$slots, "default")
|
|
108
108
|
]),
|
|
109
109
|
_: 3
|
|
110
110
|
}, 8, ["level"]),
|
|
111
|
-
|
|
111
|
+
t[0] || (t[0] = W("hr", null, null, -1))
|
|
112
112
|
], 64));
|
|
113
113
|
}
|
|
114
|
+
}), He = {
|
|
115
|
+
success: "success",
|
|
116
|
+
danger: "danger",
|
|
117
|
+
warning: "warning"
|
|
118
|
+
}, Ve = { class: "status__label" }, Jt = /* @__PURE__ */ j({
|
|
119
|
+
name: "CmcStatus",
|
|
120
|
+
__name: "CmcStatus",
|
|
121
|
+
props: {
|
|
122
|
+
status: { default: He.success }
|
|
123
|
+
},
|
|
124
|
+
setup(e) {
|
|
125
|
+
const n = e, t = E(() => ({
|
|
126
|
+
status: !0,
|
|
127
|
+
[`status--${n.status}`]: !0
|
|
128
|
+
}));
|
|
129
|
+
return (s, o) => (x(), I("div", {
|
|
130
|
+
class: k(t.value)
|
|
131
|
+
}, [
|
|
132
|
+
o[0] || (o[0] = W("span", { class: "status__dot" }, null, -1)),
|
|
133
|
+
W("span", Ve, [
|
|
134
|
+
C(s.$slots, "default")
|
|
135
|
+
])
|
|
136
|
+
], 2));
|
|
137
|
+
}
|
|
138
|
+
}), be = /^[a-z0-9]+(-[a-z0-9]+)*$/, V = (e, n, t, s = "") => {
|
|
139
|
+
const o = e.split(":");
|
|
140
|
+
if (e.slice(0, 1) === "@") {
|
|
141
|
+
if (o.length < 2 || o.length > 3)
|
|
142
|
+
return null;
|
|
143
|
+
s = o.shift().slice(1);
|
|
144
|
+
}
|
|
145
|
+
if (o.length > 3 || !o.length)
|
|
146
|
+
return null;
|
|
147
|
+
if (o.length > 1) {
|
|
148
|
+
const c = o.pop(), u = o.pop(), l = {
|
|
149
|
+
// Allow provider without '@': "provider:prefix:name"
|
|
150
|
+
provider: o.length > 0 ? o[0] : s,
|
|
151
|
+
prefix: u,
|
|
152
|
+
name: c
|
|
153
|
+
};
|
|
154
|
+
return n && !D(l) ? null : l;
|
|
155
|
+
}
|
|
156
|
+
const i = o[0], r = i.split("-");
|
|
157
|
+
if (r.length > 1) {
|
|
158
|
+
const c = {
|
|
159
|
+
provider: s,
|
|
160
|
+
prefix: r.shift(),
|
|
161
|
+
name: r.join("-")
|
|
162
|
+
};
|
|
163
|
+
return n && !D(c) ? null : c;
|
|
164
|
+
}
|
|
165
|
+
if (t && s === "") {
|
|
166
|
+
const c = {
|
|
167
|
+
provider: s,
|
|
168
|
+
prefix: "",
|
|
169
|
+
name: i
|
|
170
|
+
};
|
|
171
|
+
return n && !D(c, t) ? null : c;
|
|
172
|
+
}
|
|
173
|
+
return null;
|
|
174
|
+
}, D = (e, n) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
|
|
175
|
+
// Check name: cannot be empty
|
|
176
|
+
((n && e.prefix === "" || e.prefix) && e.name) : !1, ve = Object.freeze(
|
|
177
|
+
{
|
|
178
|
+
left: 0,
|
|
179
|
+
top: 0,
|
|
180
|
+
width: 16,
|
|
181
|
+
height: 16
|
|
182
|
+
}
|
|
183
|
+
), H = Object.freeze({
|
|
184
|
+
rotate: 0,
|
|
185
|
+
vFlip: !1,
|
|
186
|
+
hFlip: !1
|
|
187
|
+
}), G = Object.freeze({
|
|
188
|
+
...ve,
|
|
189
|
+
...H
|
|
190
|
+
}), J = Object.freeze({
|
|
191
|
+
...G,
|
|
192
|
+
body: "",
|
|
193
|
+
hidden: !1
|
|
194
|
+
});
|
|
195
|
+
function Ge(e, n) {
|
|
196
|
+
const t = {};
|
|
197
|
+
!e.hFlip != !n.hFlip && (t.hFlip = !0), !e.vFlip != !n.vFlip && (t.vFlip = !0);
|
|
198
|
+
const s = ((e.rotate || 0) + (n.rotate || 0)) % 4;
|
|
199
|
+
return s && (t.rotate = s), t;
|
|
200
|
+
}
|
|
201
|
+
function se(e, n) {
|
|
202
|
+
const t = Ge(e, n);
|
|
203
|
+
for (const s in J)
|
|
204
|
+
s in H ? s in e && !(s in t) && (t[s] = H[s]) : s in n ? t[s] = n[s] : s in e && (t[s] = e[s]);
|
|
205
|
+
return t;
|
|
206
|
+
}
|
|
207
|
+
function qe(e, n) {
|
|
208
|
+
const t = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
209
|
+
function i(r) {
|
|
210
|
+
if (t[r])
|
|
211
|
+
return o[r] = [];
|
|
212
|
+
if (!(r in o)) {
|
|
213
|
+
o[r] = null;
|
|
214
|
+
const c = s[r] && s[r].parent, u = c && i(c);
|
|
215
|
+
u && (o[r] = [c].concat(u));
|
|
216
|
+
}
|
|
217
|
+
return o[r];
|
|
218
|
+
}
|
|
219
|
+
return Object.keys(t).concat(Object.keys(s)).forEach(i), o;
|
|
220
|
+
}
|
|
221
|
+
function Qe(e, n, t) {
|
|
222
|
+
const s = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
223
|
+
let i = {};
|
|
224
|
+
function r(c) {
|
|
225
|
+
i = se(
|
|
226
|
+
s[c] || o[c],
|
|
227
|
+
i
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
return r(n), t.forEach(r), se(e, i);
|
|
231
|
+
}
|
|
232
|
+
function xe(e, n) {
|
|
233
|
+
const t = [];
|
|
234
|
+
if (typeof e != "object" || typeof e.icons != "object")
|
|
235
|
+
return t;
|
|
236
|
+
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
237
|
+
n(o, null), t.push(o);
|
|
238
|
+
});
|
|
239
|
+
const s = qe(e);
|
|
240
|
+
for (const o in s) {
|
|
241
|
+
const i = s[o];
|
|
242
|
+
i && (n(o, Qe(e, o, i)), t.push(o));
|
|
243
|
+
}
|
|
244
|
+
return t;
|
|
245
|
+
}
|
|
246
|
+
const Ue = {
|
|
247
|
+
provider: "",
|
|
248
|
+
aliases: {},
|
|
249
|
+
not_found: {},
|
|
250
|
+
...ve
|
|
251
|
+
};
|
|
252
|
+
function U(e, n) {
|
|
253
|
+
for (const t in n)
|
|
254
|
+
if (t in e && typeof e[t] != typeof n[t])
|
|
255
|
+
return !1;
|
|
256
|
+
return !0;
|
|
257
|
+
}
|
|
258
|
+
function we(e) {
|
|
259
|
+
if (typeof e != "object" || e === null)
|
|
260
|
+
return null;
|
|
261
|
+
const n = e;
|
|
262
|
+
if (typeof n.prefix != "string" || !e.icons || typeof e.icons != "object" || !U(e, Ue))
|
|
263
|
+
return null;
|
|
264
|
+
const t = n.icons;
|
|
265
|
+
for (const o in t) {
|
|
266
|
+
const i = t[o];
|
|
267
|
+
if (
|
|
268
|
+
// Name cannot be empty
|
|
269
|
+
!o || // Must have body
|
|
270
|
+
typeof i.body != "string" || // Check other props
|
|
271
|
+
!U(
|
|
272
|
+
i,
|
|
273
|
+
J
|
|
274
|
+
)
|
|
275
|
+
)
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
const s = n.aliases || /* @__PURE__ */ Object.create(null);
|
|
279
|
+
for (const o in s) {
|
|
280
|
+
const i = s[o], r = i.parent;
|
|
281
|
+
if (
|
|
282
|
+
// Name cannot be empty
|
|
283
|
+
!o || // Parent must be set and point to existing icon
|
|
284
|
+
typeof r != "string" || !t[r] && !s[r] || // Check other props
|
|
285
|
+
!U(
|
|
286
|
+
i,
|
|
287
|
+
J
|
|
288
|
+
)
|
|
289
|
+
)
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
return n;
|
|
293
|
+
}
|
|
294
|
+
const ie = /* @__PURE__ */ Object.create(null);
|
|
295
|
+
function Ke(e, n) {
|
|
296
|
+
return {
|
|
297
|
+
provider: e,
|
|
298
|
+
prefix: n,
|
|
299
|
+
icons: /* @__PURE__ */ Object.create(null),
|
|
300
|
+
missing: /* @__PURE__ */ new Set()
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function $(e, n) {
|
|
304
|
+
const t = ie[e] || (ie[e] = /* @__PURE__ */ Object.create(null));
|
|
305
|
+
return t[n] || (t[n] = Ke(e, n));
|
|
306
|
+
}
|
|
307
|
+
function Ie(e, n) {
|
|
308
|
+
return we(n) ? xe(n, (t, s) => {
|
|
309
|
+
s ? e.icons[t] = s : e.missing.add(t);
|
|
310
|
+
}) : [];
|
|
311
|
+
}
|
|
312
|
+
function We(e, n, t) {
|
|
313
|
+
try {
|
|
314
|
+
if (typeof t.body == "string")
|
|
315
|
+
return e.icons[n] = { ...t }, !0;
|
|
316
|
+
} catch {
|
|
317
|
+
}
|
|
318
|
+
return !1;
|
|
319
|
+
}
|
|
320
|
+
let N = !1;
|
|
321
|
+
function ke(e) {
|
|
322
|
+
return typeof e == "boolean" && (N = e), N;
|
|
323
|
+
}
|
|
324
|
+
function Je(e) {
|
|
325
|
+
const n = typeof e == "string" ? V(e, !0, N) : e;
|
|
326
|
+
if (n) {
|
|
327
|
+
const t = $(n.provider, n.prefix), s = n.name;
|
|
328
|
+
return t.icons[s] || (t.missing.has(s) ? null : void 0);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function Xe(e, n) {
|
|
332
|
+
const t = V(e, !0, N);
|
|
333
|
+
if (!t)
|
|
334
|
+
return !1;
|
|
335
|
+
const s = $(t.provider, t.prefix);
|
|
336
|
+
return n ? We(s, t.name, n) : (s.missing.add(t.name), !0);
|
|
337
|
+
}
|
|
338
|
+
function Ye(e, n) {
|
|
339
|
+
if (typeof e != "object")
|
|
340
|
+
return !1;
|
|
341
|
+
if (typeof n != "string" && (n = e.provider || ""), N && !n && !e.prefix) {
|
|
342
|
+
let o = !1;
|
|
343
|
+
return we(e) && (e.prefix = "", xe(e, (i, r) => {
|
|
344
|
+
Xe(i, r) && (o = !0);
|
|
345
|
+
})), o;
|
|
346
|
+
}
|
|
347
|
+
const t = e.prefix;
|
|
348
|
+
if (!D({
|
|
349
|
+
prefix: t,
|
|
350
|
+
name: "a"
|
|
351
|
+
}))
|
|
352
|
+
return !1;
|
|
353
|
+
const s = $(n, t);
|
|
354
|
+
return !!Ie(s, e);
|
|
355
|
+
}
|
|
356
|
+
const Ce = Object.freeze({
|
|
357
|
+
width: null,
|
|
358
|
+
height: null
|
|
359
|
+
}), Se = Object.freeze({
|
|
360
|
+
// Dimensions
|
|
361
|
+
...Ce,
|
|
362
|
+
// Transformations
|
|
363
|
+
...H
|
|
364
|
+
}), Ze = /(-?[0-9.]*[0-9]+[0-9.]*)/g, et = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
365
|
+
function re(e, n, t) {
|
|
366
|
+
if (n === 1)
|
|
367
|
+
return e;
|
|
368
|
+
if (t = t || 100, typeof e == "number")
|
|
369
|
+
return Math.ceil(e * n * t) / t;
|
|
370
|
+
if (typeof e != "string")
|
|
371
|
+
return e;
|
|
372
|
+
const s = e.split(Ze);
|
|
373
|
+
if (s === null || !s.length)
|
|
374
|
+
return e;
|
|
375
|
+
const o = [];
|
|
376
|
+
let i = s.shift(), r = et.test(i);
|
|
377
|
+
for (; ; ) {
|
|
378
|
+
if (r) {
|
|
379
|
+
const c = parseFloat(i);
|
|
380
|
+
isNaN(c) ? o.push(i) : o.push(Math.ceil(c * n * t) / t);
|
|
381
|
+
} else
|
|
382
|
+
o.push(i);
|
|
383
|
+
if (i = s.shift(), i === void 0)
|
|
384
|
+
return o.join("");
|
|
385
|
+
r = !r;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function tt(e, n = "defs") {
|
|
389
|
+
let t = "";
|
|
390
|
+
const s = e.indexOf("<" + n);
|
|
391
|
+
for (; s >= 0; ) {
|
|
392
|
+
const o = e.indexOf(">", s), i = e.indexOf("</" + n);
|
|
393
|
+
if (o === -1 || i === -1)
|
|
394
|
+
break;
|
|
395
|
+
const r = e.indexOf(">", i);
|
|
396
|
+
if (r === -1)
|
|
397
|
+
break;
|
|
398
|
+
t += e.slice(o + 1, i).trim(), e = e.slice(0, s).trim() + e.slice(r + 1);
|
|
399
|
+
}
|
|
400
|
+
return {
|
|
401
|
+
defs: t,
|
|
402
|
+
content: e
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
function nt(e, n) {
|
|
406
|
+
return e ? "<defs>" + e + "</defs>" + n : n;
|
|
407
|
+
}
|
|
408
|
+
function ot(e, n, t) {
|
|
409
|
+
const s = tt(e);
|
|
410
|
+
return nt(s.defs, n + s.content + t);
|
|
411
|
+
}
|
|
412
|
+
const st = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
413
|
+
function it(e, n) {
|
|
414
|
+
const t = {
|
|
415
|
+
...G,
|
|
416
|
+
...e
|
|
417
|
+
}, s = {
|
|
418
|
+
...Se,
|
|
419
|
+
...n
|
|
420
|
+
}, o = {
|
|
421
|
+
left: t.left,
|
|
422
|
+
top: t.top,
|
|
423
|
+
width: t.width,
|
|
424
|
+
height: t.height
|
|
425
|
+
};
|
|
426
|
+
let i = t.body;
|
|
427
|
+
[t, s].forEach((g) => {
|
|
428
|
+
const f = [], F = g.hFlip, T = g.vFlip;
|
|
429
|
+
let w = g.rotate;
|
|
430
|
+
F ? T ? w += 2 : (f.push(
|
|
431
|
+
"translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
|
|
432
|
+
), f.push("scale(-1 1)"), o.top = o.left = 0) : T && (f.push(
|
|
433
|
+
"translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
|
|
434
|
+
), f.push("scale(1 -1)"), o.top = o.left = 0);
|
|
435
|
+
let b;
|
|
436
|
+
switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
|
|
437
|
+
case 1:
|
|
438
|
+
b = o.height / 2 + o.top, f.unshift(
|
|
439
|
+
"rotate(90 " + b.toString() + " " + b.toString() + ")"
|
|
440
|
+
);
|
|
441
|
+
break;
|
|
442
|
+
case 2:
|
|
443
|
+
f.unshift(
|
|
444
|
+
"rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")"
|
|
445
|
+
);
|
|
446
|
+
break;
|
|
447
|
+
case 3:
|
|
448
|
+
b = o.width / 2 + o.left, f.unshift(
|
|
449
|
+
"rotate(-90 " + b.toString() + " " + b.toString() + ")"
|
|
450
|
+
);
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
w % 2 === 1 && (o.left !== o.top && (b = o.left, o.left = o.top, o.top = b), o.width !== o.height && (b = o.width, o.width = o.height, o.height = b)), f.length && (i = ot(
|
|
454
|
+
i,
|
|
455
|
+
'<g transform="' + f.join(" ") + '">',
|
|
456
|
+
"</g>"
|
|
457
|
+
));
|
|
458
|
+
});
|
|
459
|
+
const r = s.width, c = s.height, u = o.width, l = o.height;
|
|
460
|
+
let a, d;
|
|
461
|
+
r === null ? (d = c === null ? "1em" : c === "auto" ? l : c, a = re(d, u / l)) : (a = r === "auto" ? u : r, d = c === null ? re(a, l / u) : c === "auto" ? l : c);
|
|
462
|
+
const p = {}, m = (g, f) => {
|
|
463
|
+
st(f) || (p[g] = f.toString());
|
|
464
|
+
};
|
|
465
|
+
m("width", a), m("height", d);
|
|
466
|
+
const y = [o.left, o.top, u, l];
|
|
467
|
+
return p.viewBox = y.join(" "), {
|
|
468
|
+
attributes: p,
|
|
469
|
+
viewBox: y,
|
|
470
|
+
body: i
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
const rt = /\sid="(\S+)"/g, ct = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
474
|
+
let lt = 0;
|
|
475
|
+
function ut(e, n = ct) {
|
|
476
|
+
const t = [];
|
|
477
|
+
let s;
|
|
478
|
+
for (; s = rt.exec(e); )
|
|
479
|
+
t.push(s[1]);
|
|
480
|
+
if (!t.length)
|
|
481
|
+
return e;
|
|
482
|
+
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
483
|
+
return t.forEach((i) => {
|
|
484
|
+
const r = typeof n == "function" ? n(i) : n + (lt++).toString(), c = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
485
|
+
e = e.replace(
|
|
486
|
+
// Allowed characters before id: [#;"]
|
|
487
|
+
// Allowed characters after id: [)"], .[a-z]
|
|
488
|
+
new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
|
|
489
|
+
"$1" + r + o + "$3"
|
|
490
|
+
);
|
|
491
|
+
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
492
|
+
}
|
|
493
|
+
const X = /* @__PURE__ */ Object.create(null);
|
|
494
|
+
function at(e, n) {
|
|
495
|
+
X[e] = n;
|
|
496
|
+
}
|
|
497
|
+
function Y(e) {
|
|
498
|
+
return X[e] || X[""];
|
|
499
|
+
}
|
|
500
|
+
function ee(e) {
|
|
501
|
+
let n;
|
|
502
|
+
if (typeof e.resources == "string")
|
|
503
|
+
n = [e.resources];
|
|
504
|
+
else if (n = e.resources, !(n instanceof Array) || !n.length)
|
|
505
|
+
return null;
|
|
506
|
+
return {
|
|
507
|
+
// API hosts
|
|
508
|
+
resources: n,
|
|
509
|
+
// Root path
|
|
510
|
+
path: e.path || "/",
|
|
511
|
+
// URL length limit
|
|
512
|
+
maxURL: e.maxURL || 500,
|
|
513
|
+
// Timeout before next host is used.
|
|
514
|
+
rotate: e.rotate || 750,
|
|
515
|
+
// Timeout before failing query.
|
|
516
|
+
timeout: e.timeout || 5e3,
|
|
517
|
+
// Randomise default API end point.
|
|
518
|
+
random: e.random === !0,
|
|
519
|
+
// Start index
|
|
520
|
+
index: e.index || 0,
|
|
521
|
+
// Receive data after time out (used if time out kicks in first, then API module sends data anyway).
|
|
522
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
const te = /* @__PURE__ */ Object.create(null), L = [
|
|
526
|
+
"https://api.simplesvg.com",
|
|
527
|
+
"https://api.unisvg.com"
|
|
528
|
+
], R = [];
|
|
529
|
+
for (; L.length > 0; )
|
|
530
|
+
L.length === 1 || Math.random() > 0.5 ? R.push(L.shift()) : R.push(L.pop());
|
|
531
|
+
te[""] = ee({
|
|
532
|
+
resources: ["https://api.iconify.design"].concat(R)
|
|
533
|
+
});
|
|
534
|
+
function ft(e, n) {
|
|
535
|
+
const t = ee(n);
|
|
536
|
+
return t === null ? !1 : (te[e] = t, !0);
|
|
537
|
+
}
|
|
538
|
+
function ne(e) {
|
|
539
|
+
return te[e];
|
|
540
|
+
}
|
|
541
|
+
const dt = () => {
|
|
542
|
+
let e;
|
|
543
|
+
try {
|
|
544
|
+
if (e = fetch, typeof e == "function")
|
|
545
|
+
return e;
|
|
546
|
+
} catch {
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
let ce = dt();
|
|
550
|
+
function pt(e, n) {
|
|
551
|
+
const t = ne(e);
|
|
552
|
+
if (!t)
|
|
553
|
+
return 0;
|
|
554
|
+
let s;
|
|
555
|
+
if (!t.maxURL)
|
|
556
|
+
s = 0;
|
|
557
|
+
else {
|
|
558
|
+
let o = 0;
|
|
559
|
+
t.resources.forEach((r) => {
|
|
560
|
+
o = Math.max(o, r.length);
|
|
561
|
+
});
|
|
562
|
+
const i = n + ".json?icons=";
|
|
563
|
+
s = t.maxURL - o - t.path.length - i.length;
|
|
564
|
+
}
|
|
565
|
+
return s;
|
|
566
|
+
}
|
|
567
|
+
function ht(e) {
|
|
568
|
+
return e === 404;
|
|
569
|
+
}
|
|
570
|
+
const mt = (e, n, t) => {
|
|
571
|
+
const s = [], o = pt(e, n), i = "icons";
|
|
572
|
+
let r = {
|
|
573
|
+
type: i,
|
|
574
|
+
provider: e,
|
|
575
|
+
prefix: n,
|
|
576
|
+
icons: []
|
|
577
|
+
}, c = 0;
|
|
578
|
+
return t.forEach((u, l) => {
|
|
579
|
+
c += u.length + 1, c >= o && l > 0 && (s.push(r), r = {
|
|
580
|
+
type: i,
|
|
581
|
+
provider: e,
|
|
582
|
+
prefix: n,
|
|
583
|
+
icons: []
|
|
584
|
+
}, c = u.length), r.icons.push(u);
|
|
585
|
+
}), s.push(r), s;
|
|
586
|
+
};
|
|
587
|
+
function gt(e) {
|
|
588
|
+
if (typeof e == "string") {
|
|
589
|
+
const n = ne(e);
|
|
590
|
+
if (n)
|
|
591
|
+
return n.path;
|
|
592
|
+
}
|
|
593
|
+
return "/";
|
|
594
|
+
}
|
|
595
|
+
const yt = (e, n, t) => {
|
|
596
|
+
if (!ce) {
|
|
597
|
+
t("abort", 424);
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
let s = gt(n.provider);
|
|
601
|
+
switch (n.type) {
|
|
602
|
+
case "icons": {
|
|
603
|
+
const i = n.prefix, c = n.icons.join(","), u = new URLSearchParams({
|
|
604
|
+
icons: c
|
|
605
|
+
});
|
|
606
|
+
s += i + ".json?" + u.toString();
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
case "custom": {
|
|
610
|
+
const i = n.uri;
|
|
611
|
+
s += i.slice(0, 1) === "/" ? i.slice(1) : i;
|
|
612
|
+
break;
|
|
613
|
+
}
|
|
614
|
+
default:
|
|
615
|
+
t("abort", 400);
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
let o = 503;
|
|
619
|
+
ce(e + s).then((i) => {
|
|
620
|
+
const r = i.status;
|
|
621
|
+
if (r !== 200) {
|
|
622
|
+
setTimeout(() => {
|
|
623
|
+
t(ht(r) ? "abort" : "next", r);
|
|
624
|
+
});
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
return o = 501, i.json();
|
|
628
|
+
}).then((i) => {
|
|
629
|
+
if (typeof i != "object" || i === null) {
|
|
630
|
+
setTimeout(() => {
|
|
631
|
+
i === 404 ? t("abort", i) : t("next", o);
|
|
632
|
+
});
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
setTimeout(() => {
|
|
636
|
+
t("success", i);
|
|
637
|
+
});
|
|
638
|
+
}).catch(() => {
|
|
639
|
+
t("next", o);
|
|
640
|
+
});
|
|
641
|
+
}, bt = {
|
|
642
|
+
prepare: mt,
|
|
643
|
+
send: yt
|
|
644
|
+
};
|
|
645
|
+
function vt(e) {
|
|
646
|
+
const n = {
|
|
647
|
+
loaded: [],
|
|
648
|
+
missing: [],
|
|
649
|
+
pending: []
|
|
650
|
+
}, t = /* @__PURE__ */ Object.create(null);
|
|
651
|
+
e.sort((o, i) => o.provider !== i.provider ? o.provider.localeCompare(i.provider) : o.prefix !== i.prefix ? o.prefix.localeCompare(i.prefix) : o.name.localeCompare(i.name));
|
|
652
|
+
let s = {
|
|
653
|
+
provider: "",
|
|
654
|
+
prefix: "",
|
|
655
|
+
name: ""
|
|
656
|
+
};
|
|
657
|
+
return e.forEach((o) => {
|
|
658
|
+
if (s.name === o.name && s.prefix === o.prefix && s.provider === o.provider)
|
|
659
|
+
return;
|
|
660
|
+
s = o;
|
|
661
|
+
const i = o.provider, r = o.prefix, c = o.name, u = t[i] || (t[i] = /* @__PURE__ */ Object.create(null)), l = u[r] || (u[r] = $(i, r));
|
|
662
|
+
let a;
|
|
663
|
+
c in l.icons ? a = n.loaded : r === "" || l.missing.has(c) ? a = n.missing : a = n.pending;
|
|
664
|
+
const d = {
|
|
665
|
+
provider: i,
|
|
666
|
+
prefix: r,
|
|
667
|
+
name: c
|
|
668
|
+
};
|
|
669
|
+
a.push(d);
|
|
670
|
+
}), n;
|
|
671
|
+
}
|
|
672
|
+
function Te(e, n) {
|
|
673
|
+
e.forEach((t) => {
|
|
674
|
+
const s = t.loaderCallbacks;
|
|
675
|
+
s && (t.loaderCallbacks = s.filter((o) => o.id !== n));
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
function xt(e) {
|
|
679
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
680
|
+
e.pendingCallbacksFlag = !1;
|
|
681
|
+
const n = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
682
|
+
if (!n.length)
|
|
683
|
+
return;
|
|
684
|
+
let t = !1;
|
|
685
|
+
const s = e.provider, o = e.prefix;
|
|
686
|
+
n.forEach((i) => {
|
|
687
|
+
const r = i.icons, c = r.pending.length;
|
|
688
|
+
r.pending = r.pending.filter((u) => {
|
|
689
|
+
if (u.prefix !== o)
|
|
690
|
+
return !0;
|
|
691
|
+
const l = u.name;
|
|
692
|
+
if (e.icons[l])
|
|
693
|
+
r.loaded.push({
|
|
694
|
+
provider: s,
|
|
695
|
+
prefix: o,
|
|
696
|
+
name: l
|
|
697
|
+
});
|
|
698
|
+
else if (e.missing.has(l))
|
|
699
|
+
r.missing.push({
|
|
700
|
+
provider: s,
|
|
701
|
+
prefix: o,
|
|
702
|
+
name: l
|
|
703
|
+
});
|
|
704
|
+
else
|
|
705
|
+
return t = !0, !0;
|
|
706
|
+
return !1;
|
|
707
|
+
}), r.pending.length !== c && (t || Te([e], i.id), i.callback(
|
|
708
|
+
r.loaded.slice(0),
|
|
709
|
+
r.missing.slice(0),
|
|
710
|
+
r.pending.slice(0),
|
|
711
|
+
i.abort
|
|
712
|
+
));
|
|
713
|
+
});
|
|
714
|
+
}));
|
|
715
|
+
}
|
|
716
|
+
let wt = 0;
|
|
717
|
+
function It(e, n, t) {
|
|
718
|
+
const s = wt++, o = Te.bind(null, t, s);
|
|
719
|
+
if (!n.pending.length)
|
|
720
|
+
return o;
|
|
721
|
+
const i = {
|
|
722
|
+
id: s,
|
|
723
|
+
icons: n,
|
|
724
|
+
callback: e,
|
|
725
|
+
abort: o
|
|
726
|
+
};
|
|
727
|
+
return t.forEach((r) => {
|
|
728
|
+
(r.loaderCallbacks || (r.loaderCallbacks = [])).push(i);
|
|
729
|
+
}), o;
|
|
730
|
+
}
|
|
731
|
+
function kt(e, n = !0, t = !1) {
|
|
732
|
+
const s = [];
|
|
733
|
+
return e.forEach((o) => {
|
|
734
|
+
const i = typeof o == "string" ? V(o, n, t) : o;
|
|
735
|
+
i && s.push(i);
|
|
736
|
+
}), s;
|
|
737
|
+
}
|
|
738
|
+
var Ct = {
|
|
739
|
+
resources: [],
|
|
740
|
+
index: 0,
|
|
741
|
+
timeout: 2e3,
|
|
742
|
+
rotate: 750,
|
|
743
|
+
random: !1,
|
|
744
|
+
dataAfterTimeout: !1
|
|
745
|
+
};
|
|
746
|
+
function St(e, n, t, s) {
|
|
747
|
+
const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
748
|
+
let r;
|
|
749
|
+
if (e.random) {
|
|
750
|
+
let h = e.resources.slice(0);
|
|
751
|
+
for (r = []; h.length > 1; ) {
|
|
752
|
+
const v = Math.floor(Math.random() * h.length);
|
|
753
|
+
r.push(h[v]), h = h.slice(0, v).concat(h.slice(v + 1));
|
|
754
|
+
}
|
|
755
|
+
r = r.concat(h);
|
|
756
|
+
} else
|
|
757
|
+
r = e.resources.slice(i).concat(e.resources.slice(0, i));
|
|
758
|
+
const c = Date.now();
|
|
759
|
+
let u = "pending", l = 0, a, d = null, p = [], m = [];
|
|
760
|
+
typeof s == "function" && m.push(s);
|
|
761
|
+
function y() {
|
|
762
|
+
d && (clearTimeout(d), d = null);
|
|
763
|
+
}
|
|
764
|
+
function g() {
|
|
765
|
+
u === "pending" && (u = "aborted"), y(), p.forEach((h) => {
|
|
766
|
+
h.status === "pending" && (h.status = "aborted");
|
|
767
|
+
}), p = [];
|
|
768
|
+
}
|
|
769
|
+
function f(h, v) {
|
|
770
|
+
v && (m = []), typeof h == "function" && m.push(h);
|
|
771
|
+
}
|
|
772
|
+
function F() {
|
|
773
|
+
return {
|
|
774
|
+
startTime: c,
|
|
775
|
+
payload: n,
|
|
776
|
+
status: u,
|
|
777
|
+
queriesSent: l,
|
|
778
|
+
queriesPending: p.length,
|
|
779
|
+
subscribe: f,
|
|
780
|
+
abort: g
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
function T() {
|
|
784
|
+
u = "failed", m.forEach((h) => {
|
|
785
|
+
h(void 0, a);
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
function w() {
|
|
789
|
+
p.forEach((h) => {
|
|
790
|
+
h.status === "pending" && (h.status = "aborted");
|
|
791
|
+
}), p = [];
|
|
792
|
+
}
|
|
793
|
+
function b(h, v, A) {
|
|
794
|
+
const z = v !== "success";
|
|
795
|
+
switch (p = p.filter((O) => O !== h), u) {
|
|
796
|
+
case "pending":
|
|
797
|
+
break;
|
|
798
|
+
case "failed":
|
|
799
|
+
if (z || !e.dataAfterTimeout)
|
|
800
|
+
return;
|
|
801
|
+
break;
|
|
802
|
+
default:
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
if (v === "abort") {
|
|
806
|
+
a = A, T();
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
if (z) {
|
|
810
|
+
a = A, p.length || (r.length ? q() : T());
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if (y(), w(), !e.random) {
|
|
814
|
+
const O = e.resources.indexOf(h.resource);
|
|
815
|
+
O !== -1 && O !== e.index && (e.index = O);
|
|
816
|
+
}
|
|
817
|
+
u = "completed", m.forEach((O) => {
|
|
818
|
+
O(A);
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
function q() {
|
|
822
|
+
if (u !== "pending")
|
|
823
|
+
return;
|
|
824
|
+
y();
|
|
825
|
+
const h = r.shift();
|
|
826
|
+
if (h === void 0) {
|
|
827
|
+
if (p.length) {
|
|
828
|
+
d = setTimeout(() => {
|
|
829
|
+
y(), u === "pending" && (w(), T());
|
|
830
|
+
}, e.timeout);
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
T();
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
const v = {
|
|
837
|
+
status: "pending",
|
|
838
|
+
resource: h,
|
|
839
|
+
callback: (A, z) => {
|
|
840
|
+
b(v, A, z);
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
p.push(v), l++, d = setTimeout(q, e.rotate), t(h, n, v.callback);
|
|
844
|
+
}
|
|
845
|
+
return setTimeout(q), F;
|
|
846
|
+
}
|
|
847
|
+
function Oe(e) {
|
|
848
|
+
const n = {
|
|
849
|
+
...Ct,
|
|
850
|
+
...e
|
|
851
|
+
};
|
|
852
|
+
let t = [];
|
|
853
|
+
function s() {
|
|
854
|
+
t = t.filter((c) => c().status === "pending");
|
|
855
|
+
}
|
|
856
|
+
function o(c, u, l) {
|
|
857
|
+
const a = St(
|
|
858
|
+
n,
|
|
859
|
+
c,
|
|
860
|
+
u,
|
|
861
|
+
(d, p) => {
|
|
862
|
+
s(), l && l(d, p);
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
return t.push(a), a;
|
|
866
|
+
}
|
|
867
|
+
function i(c) {
|
|
868
|
+
return t.find((u) => c(u)) || null;
|
|
869
|
+
}
|
|
870
|
+
return {
|
|
871
|
+
query: o,
|
|
872
|
+
find: i,
|
|
873
|
+
setIndex: (c) => {
|
|
874
|
+
n.index = c;
|
|
875
|
+
},
|
|
876
|
+
getIndex: () => n.index,
|
|
877
|
+
cleanup: s
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
function le() {
|
|
881
|
+
}
|
|
882
|
+
const K = /* @__PURE__ */ Object.create(null);
|
|
883
|
+
function Tt(e) {
|
|
884
|
+
if (!K[e]) {
|
|
885
|
+
const n = ne(e);
|
|
886
|
+
if (!n)
|
|
887
|
+
return;
|
|
888
|
+
const t = Oe(n), s = {
|
|
889
|
+
config: n,
|
|
890
|
+
redundancy: t
|
|
891
|
+
};
|
|
892
|
+
K[e] = s;
|
|
893
|
+
}
|
|
894
|
+
return K[e];
|
|
895
|
+
}
|
|
896
|
+
function Ot(e, n, t) {
|
|
897
|
+
let s, o;
|
|
898
|
+
if (typeof e == "string") {
|
|
899
|
+
const i = Y(e);
|
|
900
|
+
if (!i)
|
|
901
|
+
return t(void 0, 424), le;
|
|
902
|
+
o = i.send;
|
|
903
|
+
const r = Tt(e);
|
|
904
|
+
r && (s = r.redundancy);
|
|
905
|
+
} else {
|
|
906
|
+
const i = ee(e);
|
|
907
|
+
if (i) {
|
|
908
|
+
s = Oe(i);
|
|
909
|
+
const r = e.resources ? e.resources[0] : "", c = Y(r);
|
|
910
|
+
c && (o = c.send);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
return !s || !o ? (t(void 0, 424), le) : s.query(n, o, t)().abort;
|
|
914
|
+
}
|
|
915
|
+
function ue() {
|
|
916
|
+
}
|
|
917
|
+
function Pt(e) {
|
|
918
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
919
|
+
e.iconsLoaderFlag = !1, xt(e);
|
|
920
|
+
}));
|
|
921
|
+
}
|
|
922
|
+
function jt(e) {
|
|
923
|
+
const n = [], t = [];
|
|
924
|
+
return e.forEach((s) => {
|
|
925
|
+
(s.match(be) ? n : t).push(s);
|
|
926
|
+
}), {
|
|
927
|
+
valid: n,
|
|
928
|
+
invalid: t
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
function M(e, n, t) {
|
|
932
|
+
function s() {
|
|
933
|
+
const o = e.pendingIcons;
|
|
934
|
+
n.forEach((i) => {
|
|
935
|
+
o && o.delete(i), e.icons[i] || e.missing.add(i);
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
if (t && typeof t == "object")
|
|
939
|
+
try {
|
|
940
|
+
if (!Ie(e, t).length) {
|
|
941
|
+
s();
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
} catch (o) {
|
|
945
|
+
console.error(o);
|
|
946
|
+
}
|
|
947
|
+
s(), Pt(e);
|
|
948
|
+
}
|
|
949
|
+
function ae(e, n) {
|
|
950
|
+
e instanceof Promise ? e.then((t) => {
|
|
951
|
+
n(t);
|
|
952
|
+
}).catch(() => {
|
|
953
|
+
n(null);
|
|
954
|
+
}) : n(e);
|
|
955
|
+
}
|
|
956
|
+
function Ft(e, n) {
|
|
957
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(n).sort() : e.iconsToLoad = n, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
958
|
+
e.iconsQueueFlag = !1;
|
|
959
|
+
const { provider: t, prefix: s } = e, o = e.iconsToLoad;
|
|
960
|
+
if (delete e.iconsToLoad, !o || !o.length)
|
|
961
|
+
return;
|
|
962
|
+
const i = e.loadIcon;
|
|
963
|
+
if (e.loadIcons && (o.length > 1 || !i)) {
|
|
964
|
+
ae(
|
|
965
|
+
e.loadIcons(o, s, t),
|
|
966
|
+
(a) => {
|
|
967
|
+
M(e, o, a);
|
|
968
|
+
}
|
|
969
|
+
);
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
if (i) {
|
|
973
|
+
o.forEach((a) => {
|
|
974
|
+
const d = i(a, s, t);
|
|
975
|
+
ae(d, (p) => {
|
|
976
|
+
const m = p ? {
|
|
977
|
+
prefix: s,
|
|
978
|
+
icons: {
|
|
979
|
+
[a]: p
|
|
980
|
+
}
|
|
981
|
+
} : null;
|
|
982
|
+
M(e, [a], m);
|
|
983
|
+
});
|
|
984
|
+
});
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
const { valid: r, invalid: c } = jt(o);
|
|
988
|
+
if (c.length && M(e, c, null), !r.length)
|
|
989
|
+
return;
|
|
990
|
+
const u = s.match(be) ? Y(t) : null;
|
|
991
|
+
if (!u) {
|
|
992
|
+
M(e, r, null);
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
u.prepare(t, s, r).forEach((a) => {
|
|
996
|
+
Ot(t, a, (d) => {
|
|
997
|
+
M(e, a.icons, d);
|
|
998
|
+
});
|
|
999
|
+
});
|
|
1000
|
+
}));
|
|
1001
|
+
}
|
|
1002
|
+
const _t = (e, n) => {
|
|
1003
|
+
const t = kt(e, !0, ke()), s = vt(t);
|
|
1004
|
+
if (!s.pending.length) {
|
|
1005
|
+
let u = !0;
|
|
1006
|
+
return n && setTimeout(() => {
|
|
1007
|
+
u && n(
|
|
1008
|
+
s.loaded,
|
|
1009
|
+
s.missing,
|
|
1010
|
+
s.pending,
|
|
1011
|
+
ue
|
|
1012
|
+
);
|
|
1013
|
+
}), () => {
|
|
1014
|
+
u = !1;
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
const o = /* @__PURE__ */ Object.create(null), i = [];
|
|
1018
|
+
let r, c;
|
|
1019
|
+
return s.pending.forEach((u) => {
|
|
1020
|
+
const { provider: l, prefix: a } = u;
|
|
1021
|
+
if (a === c && l === r)
|
|
1022
|
+
return;
|
|
1023
|
+
r = l, c = a, i.push($(l, a));
|
|
1024
|
+
const d = o[l] || (o[l] = /* @__PURE__ */ Object.create(null));
|
|
1025
|
+
d[a] || (d[a] = []);
|
|
1026
|
+
}), s.pending.forEach((u) => {
|
|
1027
|
+
const { provider: l, prefix: a, name: d } = u, p = $(l, a), m = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
|
|
1028
|
+
m.has(d) || (m.add(d), o[l][a].push(d));
|
|
1029
|
+
}), i.forEach((u) => {
|
|
1030
|
+
const l = o[u.provider][u.prefix];
|
|
1031
|
+
l.length && Ft(u, l);
|
|
1032
|
+
}), n ? It(n, s, i) : ue;
|
|
1033
|
+
};
|
|
1034
|
+
function Et(e, n) {
|
|
1035
|
+
const t = {
|
|
1036
|
+
...e
|
|
1037
|
+
};
|
|
1038
|
+
for (const s in n) {
|
|
1039
|
+
const o = n[s], i = typeof o;
|
|
1040
|
+
s in Ce ? (o === null || o && (i === "string" || i === "number")) && (t[s] = o) : i === typeof t[s] && (t[s] = s === "rotate" ? o % 4 : o);
|
|
1041
|
+
}
|
|
1042
|
+
return t;
|
|
1043
|
+
}
|
|
1044
|
+
const $t = /[\s,]+/;
|
|
1045
|
+
function At(e, n) {
|
|
1046
|
+
n.split($t).forEach((t) => {
|
|
1047
|
+
switch (t.trim()) {
|
|
1048
|
+
case "horizontal":
|
|
1049
|
+
e.hFlip = !0;
|
|
1050
|
+
break;
|
|
1051
|
+
case "vertical":
|
|
1052
|
+
e.vFlip = !0;
|
|
1053
|
+
break;
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
function Lt(e, n = 0) {
|
|
1058
|
+
const t = e.replace(/^-?[0-9.]*/, "");
|
|
1059
|
+
function s(o) {
|
|
1060
|
+
for (; o < 0; )
|
|
1061
|
+
o += 4;
|
|
1062
|
+
return o % 4;
|
|
1063
|
+
}
|
|
1064
|
+
if (t === "") {
|
|
1065
|
+
const o = parseInt(e);
|
|
1066
|
+
return isNaN(o) ? 0 : s(o);
|
|
1067
|
+
} else if (t !== e) {
|
|
1068
|
+
let o = 0;
|
|
1069
|
+
switch (t) {
|
|
1070
|
+
case "%":
|
|
1071
|
+
o = 25;
|
|
1072
|
+
break;
|
|
1073
|
+
case "deg":
|
|
1074
|
+
o = 90;
|
|
1075
|
+
}
|
|
1076
|
+
if (o) {
|
|
1077
|
+
let i = parseFloat(e.slice(0, e.length - t.length));
|
|
1078
|
+
return isNaN(i) ? 0 : (i = i / o, i % 1 === 0 ? s(i) : 0);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
return n;
|
|
1082
|
+
}
|
|
1083
|
+
function Mt(e, n) {
|
|
1084
|
+
let t = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1085
|
+
for (const s in n)
|
|
1086
|
+
t += " " + s + '="' + n[s] + '"';
|
|
1087
|
+
return '<svg xmlns="http://www.w3.org/2000/svg"' + t + ">" + e + "</svg>";
|
|
1088
|
+
}
|
|
1089
|
+
function Nt(e) {
|
|
1090
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1091
|
+
}
|
|
1092
|
+
function zt(e) {
|
|
1093
|
+
return "data:image/svg+xml," + Nt(e);
|
|
1094
|
+
}
|
|
1095
|
+
function Dt(e) {
|
|
1096
|
+
return 'url("' + zt(e) + '")';
|
|
1097
|
+
}
|
|
1098
|
+
const fe = {
|
|
1099
|
+
...Se,
|
|
1100
|
+
inline: !1
|
|
1101
|
+
}, Rt = {
|
|
1102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1103
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1104
|
+
"aria-hidden": !0,
|
|
1105
|
+
role: "img"
|
|
1106
|
+
}, Bt = {
|
|
1107
|
+
display: "inline-block"
|
|
1108
|
+
}, Z = {
|
|
1109
|
+
backgroundColor: "currentColor"
|
|
1110
|
+
}, Pe = {
|
|
1111
|
+
backgroundColor: "transparent"
|
|
1112
|
+
}, de = {
|
|
1113
|
+
Image: "var(--svg)",
|
|
1114
|
+
Repeat: "no-repeat",
|
|
1115
|
+
Size: "100% 100%"
|
|
1116
|
+
}, pe = {
|
|
1117
|
+
webkitMask: Z,
|
|
1118
|
+
mask: Z,
|
|
1119
|
+
background: Pe
|
|
1120
|
+
};
|
|
1121
|
+
for (const e in pe) {
|
|
1122
|
+
const n = pe[e];
|
|
1123
|
+
for (const t in de)
|
|
1124
|
+
n[e + t] = de[t];
|
|
1125
|
+
}
|
|
1126
|
+
const B = {};
|
|
1127
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
1128
|
+
const n = e.slice(0, 1) + "Flip";
|
|
1129
|
+
B[e + "-flip"] = n, B[e.slice(0, 1) + "-flip"] = n, B[e + "Flip"] = n;
|
|
1130
|
+
});
|
|
1131
|
+
function he(e) {
|
|
1132
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1133
|
+
}
|
|
1134
|
+
const me = (e, n) => {
|
|
1135
|
+
const t = Et(fe, n), s = { ...Rt }, o = n.mode || "svg", i = {}, r = n.style, c = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
1136
|
+
for (let g in n) {
|
|
1137
|
+
const f = n[g];
|
|
1138
|
+
if (f !== void 0)
|
|
1139
|
+
switch (g) {
|
|
1140
|
+
// Properties to ignore
|
|
1141
|
+
case "icon":
|
|
1142
|
+
case "style":
|
|
1143
|
+
case "onLoad":
|
|
1144
|
+
case "mode":
|
|
1145
|
+
case "ssr":
|
|
1146
|
+
break;
|
|
1147
|
+
// Boolean attributes
|
|
1148
|
+
case "inline":
|
|
1149
|
+
case "hFlip":
|
|
1150
|
+
case "vFlip":
|
|
1151
|
+
t[g] = f === !0 || f === "true" || f === 1;
|
|
1152
|
+
break;
|
|
1153
|
+
// Flip as string: 'horizontal,vertical'
|
|
1154
|
+
case "flip":
|
|
1155
|
+
typeof f == "string" && At(t, f);
|
|
1156
|
+
break;
|
|
1157
|
+
// Color: override style
|
|
1158
|
+
case "color":
|
|
1159
|
+
i.color = f;
|
|
1160
|
+
break;
|
|
1161
|
+
// Rotation as string
|
|
1162
|
+
case "rotate":
|
|
1163
|
+
typeof f == "string" ? t[g] = Lt(f) : typeof f == "number" && (t[g] = f);
|
|
1164
|
+
break;
|
|
1165
|
+
// Remove aria-hidden
|
|
1166
|
+
case "ariaHidden":
|
|
1167
|
+
case "aria-hidden":
|
|
1168
|
+
f !== !0 && f !== "true" && delete s["aria-hidden"];
|
|
1169
|
+
break;
|
|
1170
|
+
default: {
|
|
1171
|
+
const F = B[g];
|
|
1172
|
+
F ? (f === !0 || f === "true" || f === 1) && (t[F] = !0) : fe[g] === void 0 && (s[g] = f);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
const u = it(e, t), l = u.attributes;
|
|
1177
|
+
if (t.inline && (i.verticalAlign = "-0.125em"), o === "svg") {
|
|
1178
|
+
s.style = {
|
|
1179
|
+
...i,
|
|
1180
|
+
...c
|
|
1181
|
+
}, Object.assign(s, l);
|
|
1182
|
+
let g = 0, f = n.id;
|
|
1183
|
+
return typeof f == "string" && (f = f.replace(/-/g, "_")), s.innerHTML = ut(u.body, f ? () => f + "ID" + g++ : "iconifyVue"), oe("svg", s);
|
|
1184
|
+
}
|
|
1185
|
+
const { body: a, width: d, height: p } = e, m = o === "mask" || (o === "bg" ? !1 : a.indexOf("currentColor") !== -1), y = Mt(a, {
|
|
1186
|
+
...l,
|
|
1187
|
+
width: d + "",
|
|
1188
|
+
height: p + ""
|
|
1189
|
+
});
|
|
1190
|
+
return s.style = {
|
|
1191
|
+
...i,
|
|
1192
|
+
"--svg": Dt(y),
|
|
1193
|
+
width: he(l.width),
|
|
1194
|
+
height: he(l.height),
|
|
1195
|
+
...Bt,
|
|
1196
|
+
...m ? Z : Pe,
|
|
1197
|
+
...c
|
|
1198
|
+
}, oe("span", s);
|
|
1199
|
+
};
|
|
1200
|
+
ke(!0);
|
|
1201
|
+
at("", bt);
|
|
1202
|
+
if (typeof document < "u" && typeof window < "u") {
|
|
1203
|
+
const e = window;
|
|
1204
|
+
if (e.IconifyPreload !== void 0) {
|
|
1205
|
+
const n = e.IconifyPreload, t = "Invalid IconifyPreload syntax.";
|
|
1206
|
+
typeof n == "object" && n !== null && (n instanceof Array ? n : [n]).forEach((s) => {
|
|
1207
|
+
try {
|
|
1208
|
+
// Check if item is an object and not null/array
|
|
1209
|
+
(typeof s != "object" || s === null || s instanceof Array || // Check for 'icons' and 'prefix'
|
|
1210
|
+
typeof s.icons != "object" || typeof s.prefix != "string" || // Add icon set
|
|
1211
|
+
!Ye(s)) && console.error(t);
|
|
1212
|
+
} catch {
|
|
1213
|
+
console.error(t);
|
|
1214
|
+
}
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
if (e.IconifyProviders !== void 0) {
|
|
1218
|
+
const n = e.IconifyProviders;
|
|
1219
|
+
if (typeof n == "object" && n !== null)
|
|
1220
|
+
for (let t in n) {
|
|
1221
|
+
const s = "IconifyProviders[" + t + "] is invalid.";
|
|
1222
|
+
try {
|
|
1223
|
+
const o = n[t];
|
|
1224
|
+
if (typeof o != "object" || !o || o.resources === void 0)
|
|
1225
|
+
continue;
|
|
1226
|
+
ft(t, o) || console.error(s);
|
|
1227
|
+
} catch {
|
|
1228
|
+
console.error(s);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
const Ht = {
|
|
1234
|
+
...G,
|
|
1235
|
+
body: ""
|
|
1236
|
+
}, Vt = j((e, { emit: n }) => {
|
|
1237
|
+
const t = Q(null);
|
|
1238
|
+
function s() {
|
|
1239
|
+
t.value && (t.value.abort?.(), t.value = null);
|
|
1240
|
+
}
|
|
1241
|
+
const o = Q(!!e.ssr), i = Q(""), r = _e(null);
|
|
1242
|
+
function c() {
|
|
1243
|
+
const l = e.icon;
|
|
1244
|
+
if (typeof l == "object" && l !== null && typeof l.body == "string")
|
|
1245
|
+
return i.value = "", {
|
|
1246
|
+
data: l
|
|
1247
|
+
};
|
|
1248
|
+
let a;
|
|
1249
|
+
if (typeof l != "string" || (a = V(l, !1, !0)) === null)
|
|
1250
|
+
return null;
|
|
1251
|
+
let d = Je(a);
|
|
1252
|
+
if (!d) {
|
|
1253
|
+
const y = t.value;
|
|
1254
|
+
return (!y || y.name !== l) && (d === null ? t.value = {
|
|
1255
|
+
name: l
|
|
1256
|
+
} : t.value = {
|
|
1257
|
+
name: l,
|
|
1258
|
+
abort: _t([a], u)
|
|
1259
|
+
}), null;
|
|
1260
|
+
}
|
|
1261
|
+
s(), i.value !== l && (i.value = l, Le(() => {
|
|
1262
|
+
n("load", l);
|
|
1263
|
+
}));
|
|
1264
|
+
const p = e.customise;
|
|
1265
|
+
if (p) {
|
|
1266
|
+
d = Object.assign({}, d);
|
|
1267
|
+
const y = p(d.body, a.name, a.prefix, a.provider);
|
|
1268
|
+
typeof y == "string" && (d.body = y);
|
|
1269
|
+
}
|
|
1270
|
+
const m = ["iconify"];
|
|
1271
|
+
return a.prefix !== "" && m.push("iconify--" + a.prefix), a.provider !== "" && m.push("iconify--" + a.provider), { data: d, classes: m };
|
|
1272
|
+
}
|
|
1273
|
+
function u() {
|
|
1274
|
+
const l = c();
|
|
1275
|
+
l ? l.data !== r.value?.data && (r.value = l) : r.value = null;
|
|
1276
|
+
}
|
|
1277
|
+
return o.value ? u() : Ee(() => {
|
|
1278
|
+
o.value = !0, u();
|
|
1279
|
+
}), $e(() => e.icon, u), Ae(s), () => {
|
|
1280
|
+
const l = r.value;
|
|
1281
|
+
if (!l)
|
|
1282
|
+
return me(Ht, e);
|
|
1283
|
+
let a = e;
|
|
1284
|
+
return l.classes && (a = {
|
|
1285
|
+
...e,
|
|
1286
|
+
class: l.classes.join(" ")
|
|
1287
|
+
}), me({
|
|
1288
|
+
...G,
|
|
1289
|
+
...l.data
|
|
1290
|
+
}, a);
|
|
1291
|
+
};
|
|
1292
|
+
}, {
|
|
1293
|
+
props: [
|
|
1294
|
+
// Icon and render mode
|
|
1295
|
+
"icon",
|
|
1296
|
+
"mode",
|
|
1297
|
+
"ssr",
|
|
1298
|
+
// Layout and style
|
|
1299
|
+
"width",
|
|
1300
|
+
"height",
|
|
1301
|
+
"style",
|
|
1302
|
+
"color",
|
|
1303
|
+
"inline",
|
|
1304
|
+
// Transformations
|
|
1305
|
+
"rotate",
|
|
1306
|
+
"hFlip",
|
|
1307
|
+
"horizontalFlip",
|
|
1308
|
+
"vFlip",
|
|
1309
|
+
"verticalFlip",
|
|
1310
|
+
"flip",
|
|
1311
|
+
// Misc
|
|
1312
|
+
"id",
|
|
1313
|
+
"ariaHidden",
|
|
1314
|
+
"customise",
|
|
1315
|
+
"title"
|
|
1316
|
+
],
|
|
1317
|
+
emits: ["load"]
|
|
1318
|
+
}), ge = {
|
|
1319
|
+
profile: "iconamoon:profile-light",
|
|
1320
|
+
edit: "iconamoon:edit-light",
|
|
1321
|
+
delete: "qlementine-icons:trash-16",
|
|
1322
|
+
filter: "mdi:filter-outline",
|
|
1323
|
+
search: "material-symbols:search",
|
|
1324
|
+
people: "ic:outline-people",
|
|
1325
|
+
plus: "ic:baseline-plus",
|
|
1326
|
+
mail: "ci:mail-open",
|
|
1327
|
+
"chevron-down": "mi:chevron-down"
|
|
1328
|
+
}, Gt = {
|
|
1329
|
+
m: 20,
|
|
1330
|
+
l: 24
|
|
1331
|
+
}, qt = {
|
|
1332
|
+
primary: "primary",
|
|
1333
|
+
secondary: "secondary"
|
|
1334
|
+
}, Xt = /* @__PURE__ */ j({
|
|
1335
|
+
name: "CmcIcon",
|
|
1336
|
+
__name: "CmcIcon",
|
|
1337
|
+
props: {
|
|
1338
|
+
name: { default: ge.profile },
|
|
1339
|
+
size: { default: "l" },
|
|
1340
|
+
color: { default: qt.primary }
|
|
1341
|
+
},
|
|
1342
|
+
setup(e) {
|
|
1343
|
+
const n = e, t = E(() => ge[n.name]), s = E(() => Gt[n.size]);
|
|
1344
|
+
return (o, i) => (x(), Me(S(Vt), {
|
|
1345
|
+
class: k(["cmc-icon", `cmc-icon--${n.color}`]),
|
|
1346
|
+
icon: t.value,
|
|
1347
|
+
width: s.value,
|
|
1348
|
+
height: s.value
|
|
1349
|
+
}, null, 8, ["class", "icon", "width", "height"]));
|
|
1350
|
+
}
|
|
1351
|
+
}), Qt = {
|
|
1352
|
+
medium: "medium"
|
|
1353
|
+
}, Yt = /* @__PURE__ */ j({
|
|
1354
|
+
name: "CmcButtonGroup",
|
|
1355
|
+
__name: "CmcButtonGroup",
|
|
1356
|
+
props: {
|
|
1357
|
+
gap: { default: Qt.medium }
|
|
1358
|
+
},
|
|
1359
|
+
setup(e) {
|
|
1360
|
+
const n = e, t = E(() => ({
|
|
1361
|
+
"button-group": !0,
|
|
1362
|
+
[`button-group-gap--${n.gap}`]: !0
|
|
1363
|
+
}));
|
|
1364
|
+
return (s, o) => (x(), I("div", {
|
|
1365
|
+
class: k(t.value)
|
|
1366
|
+
}, [
|
|
1367
|
+
C(s.$slots, "default")
|
|
1368
|
+
], 2));
|
|
1369
|
+
}
|
|
114
1370
|
});
|
|
115
1371
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
1372
|
+
Kt as CmcButton,
|
|
1373
|
+
Yt as CmcButtonGroup,
|
|
1374
|
+
Be as CmcHeading,
|
|
1375
|
+
Xt as CmcIcon,
|
|
1376
|
+
Jt as CmcStatus,
|
|
1377
|
+
Wt as CmcTitle,
|
|
1378
|
+
Ne as buttonKindOptions,
|
|
1379
|
+
De as buttonSizeOptions,
|
|
1380
|
+
ze as buttonVariantOptions,
|
|
1381
|
+
P as headingLevelOptions,
|
|
1382
|
+
qt as iconColorOptions,
|
|
1383
|
+
Gt as iconSizeOptions,
|
|
1384
|
+
ge as iconsMap,
|
|
1385
|
+
He as statusOptions
|
|
123
1386
|
};
|