@neuralytics/alpine-ds 0.3.0 → 0.4.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/CHANGELOG.md +7 -0
- package/README.md +7 -21
- package/dist/components/button/Button.vue.d.ts +3 -2
- package/dist/components/icon/Icon.types.d.ts +1 -0
- package/dist/components/icon/Icon.vue.d.ts +4 -4
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/warnIfNotAllowed.d.ts +2 -0
- package/dist/constants/iconOptions.d.ts +10 -10
- package/dist/icons.d.ts +1 -1
- package/dist/index.mjs +1134 -68
- package/dist/tailwind-preset.d.ts +2 -0
- package/dist/tailwind-preset.mjs +86 -11
- package/package.json +2 -8
- package/dist/icons-DedUTX68.js +0 -6
- package/dist/tailwind-tokens.d.ts +0 -4
- package/dist/tailwind-tokens.mjs +0 -87
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,1070 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as W, ref as E, shallowRef as Fe, onMounted as Ae, watch as Oe, onUnmounted as De, h as Y, nextTick as Me, computed as q, createBlock as me, openBlock as F, unref as M, normalizeClass as ye, createElementBlock as Z, createCommentVNode as ee, toDisplayString as Ne } from "vue";
|
|
2
|
+
import { tv as be } from "tailwind-variants";
|
|
3
|
+
const ve = {
|
|
4
|
+
loader: "line-md:loading-twotone-loop"
|
|
5
|
+
}, Xt = ["xs", "sm", "md", "lg", "xl", "2xl"], xe = /^[a-z0-9]+(-[a-z0-9]+)*$/, R = (e, t, o, s = "") => {
|
|
6
|
+
const n = e.split(":");
|
|
7
|
+
if (e.slice(0, 1) === "@") {
|
|
8
|
+
if (n.length < 2 || n.length > 3) return null;
|
|
9
|
+
s = n.shift().slice(1);
|
|
10
|
+
}
|
|
11
|
+
if (n.length > 3 || !n.length) return null;
|
|
12
|
+
if (n.length > 1) {
|
|
13
|
+
const l = n.pop(), a = n.pop(), c = {
|
|
14
|
+
provider: n.length > 0 ? n[0] : s,
|
|
15
|
+
prefix: a,
|
|
16
|
+
name: l
|
|
17
|
+
};
|
|
18
|
+
return t && !A(c) ? null : c;
|
|
19
|
+
}
|
|
20
|
+
const i = n[0], r = i.split("-");
|
|
21
|
+
if (r.length > 1) {
|
|
22
|
+
const l = {
|
|
23
|
+
provider: s,
|
|
24
|
+
prefix: r.shift(),
|
|
25
|
+
name: r.join("-")
|
|
26
|
+
};
|
|
27
|
+
return t && !A(l) ? null : l;
|
|
28
|
+
}
|
|
29
|
+
if (o && s === "") {
|
|
30
|
+
const l = {
|
|
31
|
+
provider: s,
|
|
32
|
+
prefix: "",
|
|
33
|
+
name: i
|
|
34
|
+
};
|
|
35
|
+
return t && !A(l, o) ? null : l;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}, A = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
39
|
+
function Re(e, t) {
|
|
40
|
+
const o = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
41
|
+
function i(r) {
|
|
42
|
+
if (o[r]) return n[r] = [];
|
|
43
|
+
if (!(r in n)) {
|
|
44
|
+
n[r] = null;
|
|
45
|
+
const l = s[r] && s[r].parent, a = l && i(l);
|
|
46
|
+
a && (n[r] = [l].concat(a));
|
|
47
|
+
}
|
|
48
|
+
return n[r];
|
|
49
|
+
}
|
|
50
|
+
return Object.keys(o).concat(Object.keys(s)).forEach(i), n;
|
|
51
|
+
}
|
|
52
|
+
const we = Object.freeze({
|
|
53
|
+
left: 0,
|
|
54
|
+
top: 0,
|
|
55
|
+
width: 16,
|
|
56
|
+
height: 16
|
|
57
|
+
}), N = Object.freeze({
|
|
58
|
+
rotate: 0,
|
|
59
|
+
vFlip: !1,
|
|
60
|
+
hFlip: !1
|
|
61
|
+
}), z = Object.freeze({
|
|
62
|
+
...we,
|
|
63
|
+
...N
|
|
64
|
+
}), Q = Object.freeze({
|
|
65
|
+
...z,
|
|
66
|
+
body: "",
|
|
67
|
+
hidden: !1
|
|
68
|
+
});
|
|
69
|
+
function ze(e, t) {
|
|
70
|
+
const o = {};
|
|
71
|
+
!e.hFlip != !t.hFlip && (o.hFlip = !0), !e.vFlip != !t.vFlip && (o.vFlip = !0);
|
|
72
|
+
const s = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
73
|
+
return s && (o.rotate = s), o;
|
|
74
|
+
}
|
|
75
|
+
function te(e, t) {
|
|
76
|
+
const o = ze(e, t);
|
|
77
|
+
for (const s in Q) s in N ? s in e && !(s in o) && (o[s] = N[s]) : s in t ? o[s] = t[s] : s in e && (o[s] = e[s]);
|
|
78
|
+
return o;
|
|
79
|
+
}
|
|
80
|
+
function Be(e, t, o) {
|
|
81
|
+
const s = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
82
|
+
let i = {};
|
|
83
|
+
function r(l) {
|
|
84
|
+
i = te(s[l] || n[l], i);
|
|
85
|
+
}
|
|
86
|
+
return r(t), o.forEach(r), te(e, i);
|
|
87
|
+
}
|
|
88
|
+
function Ie(e, t) {
|
|
89
|
+
const o = [];
|
|
90
|
+
if (typeof e != "object" || typeof e.icons != "object") return o;
|
|
91
|
+
e.not_found instanceof Array && e.not_found.forEach((n) => {
|
|
92
|
+
t(n, null), o.push(n);
|
|
93
|
+
});
|
|
94
|
+
const s = Re(e);
|
|
95
|
+
for (const n in s) {
|
|
96
|
+
const i = s[n];
|
|
97
|
+
i && (t(n, Be(e, n, i)), o.push(n));
|
|
98
|
+
}
|
|
99
|
+
return o;
|
|
100
|
+
}
|
|
101
|
+
const $e = {
|
|
102
|
+
provider: "",
|
|
103
|
+
aliases: {},
|
|
104
|
+
not_found: {},
|
|
105
|
+
...we
|
|
106
|
+
};
|
|
107
|
+
function $(e, t) {
|
|
108
|
+
for (const o in t) if (o in e && typeof e[o] != typeof t[o]) return !1;
|
|
109
|
+
return !0;
|
|
110
|
+
}
|
|
111
|
+
function Se(e) {
|
|
112
|
+
if (typeof e != "object" || e === null) return null;
|
|
113
|
+
const t = e;
|
|
114
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !$(e, $e)) return null;
|
|
115
|
+
const o = t.icons;
|
|
116
|
+
for (const n in o) {
|
|
117
|
+
const i = o[n];
|
|
118
|
+
if (!n || typeof i.body != "string" || !$(i, Q)) return null;
|
|
119
|
+
}
|
|
120
|
+
const s = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
121
|
+
for (const n in s) {
|
|
122
|
+
const i = s[n], r = i.parent;
|
|
123
|
+
if (!n || typeof r != "string" || !o[r] && !s[r] || !$(i, Q)) return null;
|
|
124
|
+
}
|
|
125
|
+
return t;
|
|
126
|
+
}
|
|
127
|
+
const ne = /* @__PURE__ */ Object.create(null);
|
|
128
|
+
function _e(e, t) {
|
|
129
|
+
return {
|
|
130
|
+
provider: e,
|
|
131
|
+
prefix: t,
|
|
132
|
+
icons: /* @__PURE__ */ Object.create(null),
|
|
133
|
+
missing: /* @__PURE__ */ new Set()
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function k(e, t) {
|
|
137
|
+
const o = ne[e] || (ne[e] = /* @__PURE__ */ Object.create(null));
|
|
138
|
+
return o[t] || (o[t] = _e(e, t));
|
|
139
|
+
}
|
|
140
|
+
function ke(e, t) {
|
|
141
|
+
return Se(t) ? Ie(t, (o, s) => {
|
|
142
|
+
s ? e.icons[o] = s : e.missing.add(o);
|
|
143
|
+
}) : [];
|
|
144
|
+
}
|
|
145
|
+
function He(e, t, o) {
|
|
146
|
+
try {
|
|
147
|
+
if (typeof o.body == "string")
|
|
148
|
+
return e.icons[t] = { ...o }, !0;
|
|
149
|
+
} catch {
|
|
150
|
+
}
|
|
151
|
+
return !1;
|
|
152
|
+
}
|
|
153
|
+
let C = !1;
|
|
154
|
+
function Le(e) {
|
|
155
|
+
return typeof e == "boolean" && (C = e), C;
|
|
156
|
+
}
|
|
157
|
+
function qe(e) {
|
|
158
|
+
const t = typeof e == "string" ? R(e, !0, C) : e;
|
|
159
|
+
if (t) {
|
|
160
|
+
const o = k(t.provider, t.prefix), s = t.name;
|
|
161
|
+
return o.icons[s] || (o.missing.has(s) ? null : void 0);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function Qe(e, t) {
|
|
165
|
+
const o = R(e, !0, C);
|
|
166
|
+
if (!o) return !1;
|
|
167
|
+
const s = k(o.provider, o.prefix);
|
|
168
|
+
return t ? He(s, o.name, t) : (s.missing.add(o.name), !0);
|
|
169
|
+
}
|
|
170
|
+
function Ue(e, t) {
|
|
171
|
+
if (typeof e != "object") return !1;
|
|
172
|
+
if (typeof t != "string" && (t = e.provider || ""), C && !t && !e.prefix) {
|
|
173
|
+
let n = !1;
|
|
174
|
+
return Se(e) && (e.prefix = "", Ie(e, (i, r) => {
|
|
175
|
+
Qe(i, r) && (n = !0);
|
|
176
|
+
})), n;
|
|
177
|
+
}
|
|
178
|
+
const o = e.prefix;
|
|
179
|
+
if (!A({
|
|
180
|
+
prefix: o,
|
|
181
|
+
name: "a"
|
|
182
|
+
})) return !1;
|
|
183
|
+
const s = k(t, o);
|
|
184
|
+
return !!ke(s, e);
|
|
185
|
+
}
|
|
186
|
+
const Te = Object.freeze({
|
|
187
|
+
width: null,
|
|
188
|
+
height: null
|
|
189
|
+
}), Pe = Object.freeze({
|
|
190
|
+
...Te,
|
|
191
|
+
...N
|
|
192
|
+
}), Ve = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ge = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
193
|
+
function oe(e, t, o) {
|
|
194
|
+
if (t === 1) return e;
|
|
195
|
+
if (o = o || 100, typeof e == "number") return Math.ceil(e * t * o) / o;
|
|
196
|
+
if (typeof e != "string") return e;
|
|
197
|
+
const s = e.split(Ve);
|
|
198
|
+
if (s === null || !s.length) return e;
|
|
199
|
+
const n = [];
|
|
200
|
+
let i = s.shift(), r = Ge.test(i);
|
|
201
|
+
for (; ; ) {
|
|
202
|
+
if (r) {
|
|
203
|
+
const l = parseFloat(i);
|
|
204
|
+
isNaN(l) ? n.push(i) : n.push(Math.ceil(l * t * o) / o);
|
|
205
|
+
} else n.push(i);
|
|
206
|
+
if (i = s.shift(), i === void 0) return n.join("");
|
|
207
|
+
r = !r;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function We(e, t = "defs") {
|
|
211
|
+
let o = "";
|
|
212
|
+
const s = e.indexOf("<" + t);
|
|
213
|
+
for (; s >= 0; ) {
|
|
214
|
+
const n = e.indexOf(">", s), i = e.indexOf("</" + t);
|
|
215
|
+
if (n === -1 || i === -1) break;
|
|
216
|
+
const r = e.indexOf(">", i);
|
|
217
|
+
if (r === -1) break;
|
|
218
|
+
o += e.slice(n + 1, i).trim(), e = e.slice(0, s).trim() + e.slice(r + 1);
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
defs: o,
|
|
222
|
+
content: e
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function Ke(e, t) {
|
|
226
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
227
|
+
}
|
|
228
|
+
function Xe(e, t, o) {
|
|
229
|
+
const s = We(e);
|
|
230
|
+
return Ke(s.defs, t + s.content + o);
|
|
231
|
+
}
|
|
232
|
+
const Je = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
233
|
+
function Ye(e, t) {
|
|
234
|
+
const o = {
|
|
235
|
+
...z,
|
|
236
|
+
...e
|
|
237
|
+
}, s = {
|
|
238
|
+
...Pe,
|
|
239
|
+
...t
|
|
240
|
+
}, n = {
|
|
241
|
+
left: o.left,
|
|
242
|
+
top: o.top,
|
|
243
|
+
width: o.width,
|
|
244
|
+
height: o.height
|
|
245
|
+
};
|
|
246
|
+
let i = o.body;
|
|
247
|
+
[o, s].forEach((g) => {
|
|
248
|
+
const d = [], w = g.hFlip, I = g.vFlip;
|
|
249
|
+
let x = g.rotate;
|
|
250
|
+
w ? I ? x += 2 : (d.push("translate(" + (n.width + n.left).toString() + " " + (0 - n.top).toString() + ")"), d.push("scale(-1 1)"), n.top = n.left = 0) : I && (d.push("translate(" + (0 - n.left).toString() + " " + (n.height + n.top).toString() + ")"), d.push("scale(1 -1)"), n.top = n.left = 0);
|
|
251
|
+
let b;
|
|
252
|
+
switch (x < 0 && (x -= Math.floor(x / 4) * 4), x = x % 4, x) {
|
|
253
|
+
case 1:
|
|
254
|
+
b = n.height / 2 + n.top, d.unshift("rotate(90 " + b.toString() + " " + b.toString() + ")");
|
|
255
|
+
break;
|
|
256
|
+
case 2:
|
|
257
|
+
d.unshift("rotate(180 " + (n.width / 2 + n.left).toString() + " " + (n.height / 2 + n.top).toString() + ")");
|
|
258
|
+
break;
|
|
259
|
+
case 3:
|
|
260
|
+
b = n.width / 2 + n.left, d.unshift("rotate(-90 " + b.toString() + " " + b.toString() + ")");
|
|
261
|
+
}
|
|
262
|
+
x % 2 === 1 && (n.left !== n.top && (b = n.left, n.left = n.top, n.top = b), n.width !== n.height && (b = n.width, n.width = n.height, n.height = b)), d.length && (i = Xe(i, '<g transform="' + d.join(" ") + '">', "</g>"));
|
|
263
|
+
});
|
|
264
|
+
const r = s.width, l = s.height, a = n.width, c = n.height;
|
|
265
|
+
let u, f;
|
|
266
|
+
r === null ? (f = l === null ? "1em" : l === "auto" ? c : l, u = oe(f, a / c)) : (u = r === "auto" ? a : r, f = l === null ? oe(u, c / a) : l === "auto" ? c : l);
|
|
267
|
+
const h = {}, m = (g, d) => {
|
|
268
|
+
Je(d) || (h[g] = d.toString());
|
|
269
|
+
};
|
|
270
|
+
m("width", u), m("height", f);
|
|
271
|
+
const y = [
|
|
272
|
+
n.left,
|
|
273
|
+
n.top,
|
|
274
|
+
a,
|
|
275
|
+
c
|
|
276
|
+
];
|
|
277
|
+
return h.viewBox = y.join(" "), {
|
|
278
|
+
attributes: h,
|
|
279
|
+
viewBox: y,
|
|
280
|
+
body: i
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const Ze = /\sid="(\S+)"/g, se = /* @__PURE__ */ new Map();
|
|
284
|
+
function et(e) {
|
|
285
|
+
e = e.replace(/[0-9]+$/, "") || "a";
|
|
286
|
+
const t = se.get(e) || 0;
|
|
287
|
+
return se.set(e, t + 1), t ? `${e}${t}` : e;
|
|
288
|
+
}
|
|
289
|
+
function tt(e) {
|
|
290
|
+
const t = [];
|
|
291
|
+
let o;
|
|
292
|
+
for (; o = Ze.exec(e); ) t.push(o[1]);
|
|
293
|
+
if (!t.length) return e;
|
|
294
|
+
const s = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
295
|
+
return t.forEach((n) => {
|
|
296
|
+
const i = et(n), r = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
297
|
+
e = e.replace(new RegExp('([#;"])(' + r + ')([")]|\\.[a-z])', "g"), "$1" + i + s + "$3");
|
|
298
|
+
}), e = e.replace(new RegExp(s, "g"), ""), e;
|
|
299
|
+
}
|
|
300
|
+
const U = /* @__PURE__ */ Object.create(null);
|
|
301
|
+
function nt(e, t) {
|
|
302
|
+
U[e] = t;
|
|
303
|
+
}
|
|
304
|
+
function V(e) {
|
|
305
|
+
return U[e] || U[""];
|
|
306
|
+
}
|
|
307
|
+
function K(e) {
|
|
308
|
+
let t;
|
|
309
|
+
if (typeof e.resources == "string") t = [e.resources];
|
|
310
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
311
|
+
return {
|
|
312
|
+
resources: t,
|
|
313
|
+
path: e.path || "/",
|
|
314
|
+
maxURL: e.maxURL || 500,
|
|
315
|
+
rotate: e.rotate || 750,
|
|
316
|
+
timeout: e.timeout || 5e3,
|
|
317
|
+
random: e.random === !0,
|
|
318
|
+
index: e.index || 0,
|
|
319
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
const X = /* @__PURE__ */ Object.create(null), T = ["https://api.simplesvg.com", "https://api.unisvg.com"], O = [];
|
|
323
|
+
for (; T.length > 0; ) T.length === 1 || Math.random() > 0.5 ? O.push(T.shift()) : O.push(T.pop());
|
|
324
|
+
X[""] = K({ resources: ["https://api.iconify.design"].concat(O) });
|
|
325
|
+
function ot(e, t) {
|
|
326
|
+
const o = K(t);
|
|
327
|
+
return o === null ? !1 : (X[e] = o, !0);
|
|
328
|
+
}
|
|
329
|
+
function J(e) {
|
|
330
|
+
return X[e];
|
|
331
|
+
}
|
|
332
|
+
const st = () => {
|
|
333
|
+
let e;
|
|
334
|
+
try {
|
|
335
|
+
if (e = fetch, typeof e == "function") return e;
|
|
336
|
+
} catch {
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
let ie = st();
|
|
340
|
+
function it(e, t) {
|
|
341
|
+
const o = J(e);
|
|
342
|
+
if (!o) return 0;
|
|
343
|
+
let s;
|
|
344
|
+
if (!o.maxURL) s = 0;
|
|
345
|
+
else {
|
|
346
|
+
let n = 0;
|
|
347
|
+
o.resources.forEach((r) => {
|
|
348
|
+
n = Math.max(n, r.length);
|
|
349
|
+
});
|
|
350
|
+
const i = t + ".json?icons=";
|
|
351
|
+
s = o.maxURL - n - o.path.length - i.length;
|
|
352
|
+
}
|
|
353
|
+
return s;
|
|
354
|
+
}
|
|
355
|
+
function rt(e) {
|
|
356
|
+
return e === 404;
|
|
357
|
+
}
|
|
358
|
+
const ct = (e, t, o) => {
|
|
359
|
+
const s = [], n = it(e, t), i = "icons";
|
|
360
|
+
let r = {
|
|
361
|
+
type: i,
|
|
362
|
+
provider: e,
|
|
363
|
+
prefix: t,
|
|
364
|
+
icons: []
|
|
365
|
+
}, l = 0;
|
|
366
|
+
return o.forEach((a, c) => {
|
|
367
|
+
l += a.length + 1, l >= n && c > 0 && (s.push(r), r = {
|
|
368
|
+
type: i,
|
|
369
|
+
provider: e,
|
|
370
|
+
prefix: t,
|
|
371
|
+
icons: []
|
|
372
|
+
}, l = a.length), r.icons.push(a);
|
|
373
|
+
}), s.push(r), s;
|
|
374
|
+
};
|
|
375
|
+
function lt(e) {
|
|
376
|
+
if (typeof e == "string") {
|
|
377
|
+
const t = J(e);
|
|
378
|
+
if (t) return t.path;
|
|
379
|
+
}
|
|
380
|
+
return "/";
|
|
381
|
+
}
|
|
382
|
+
const at = (e, t, o) => {
|
|
383
|
+
if (!ie) {
|
|
384
|
+
o("abort", 424);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
let s = lt(t.provider);
|
|
388
|
+
switch (t.type) {
|
|
389
|
+
case "icons": {
|
|
390
|
+
const i = t.prefix, r = t.icons.join(","), l = new URLSearchParams({ icons: r });
|
|
391
|
+
s += i + ".json?" + l.toString();
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
case "custom": {
|
|
395
|
+
const i = t.uri;
|
|
396
|
+
s += i.slice(0, 1) === "/" ? i.slice(1) : i;
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
default:
|
|
400
|
+
o("abort", 400);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
let n = 503;
|
|
404
|
+
ie(e + s).then((i) => {
|
|
405
|
+
const r = i.status;
|
|
406
|
+
if (r !== 200) {
|
|
407
|
+
setTimeout(() => {
|
|
408
|
+
o(rt(r) ? "abort" : "next", r);
|
|
409
|
+
});
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
return n = 501, i.json();
|
|
413
|
+
}).then((i) => {
|
|
414
|
+
if (typeof i != "object" || i === null) {
|
|
415
|
+
setTimeout(() => {
|
|
416
|
+
i === 404 ? o("abort", i) : o("next", n);
|
|
417
|
+
});
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
setTimeout(() => {
|
|
421
|
+
o("success", i);
|
|
422
|
+
});
|
|
423
|
+
}).catch(() => {
|
|
424
|
+
o("next", n);
|
|
425
|
+
});
|
|
426
|
+
}, ut = {
|
|
427
|
+
prepare: ct,
|
|
428
|
+
send: at
|
|
429
|
+
};
|
|
430
|
+
function Ce(e, t) {
|
|
431
|
+
e.forEach((o) => {
|
|
432
|
+
const s = o.loaderCallbacks;
|
|
433
|
+
s && (o.loaderCallbacks = s.filter((n) => n.id !== t));
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
function ft(e) {
|
|
437
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
438
|
+
e.pendingCallbacksFlag = !1;
|
|
439
|
+
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
440
|
+
if (!t.length) return;
|
|
441
|
+
let o = !1;
|
|
442
|
+
const s = e.provider, n = e.prefix;
|
|
443
|
+
t.forEach((i) => {
|
|
444
|
+
const r = i.icons, l = r.pending.length;
|
|
445
|
+
r.pending = r.pending.filter((a) => {
|
|
446
|
+
if (a.prefix !== n) return !0;
|
|
447
|
+
const c = a.name;
|
|
448
|
+
if (e.icons[c]) r.loaded.push({
|
|
449
|
+
provider: s,
|
|
450
|
+
prefix: n,
|
|
451
|
+
name: c
|
|
452
|
+
});
|
|
453
|
+
else if (e.missing.has(c)) r.missing.push({
|
|
454
|
+
provider: s,
|
|
455
|
+
prefix: n,
|
|
456
|
+
name: c
|
|
457
|
+
});
|
|
458
|
+
else
|
|
459
|
+
return o = !0, !0;
|
|
460
|
+
return !1;
|
|
461
|
+
}), r.pending.length !== l && (o || Ce([e], i.id), i.callback(r.loaded.slice(0), r.missing.slice(0), r.pending.slice(0), i.abort));
|
|
462
|
+
});
|
|
463
|
+
}));
|
|
464
|
+
}
|
|
465
|
+
let dt = 0;
|
|
466
|
+
function ht(e, t, o) {
|
|
467
|
+
const s = dt++, n = Ce.bind(null, o, s);
|
|
468
|
+
if (!t.pending.length) return n;
|
|
469
|
+
const i = {
|
|
470
|
+
id: s,
|
|
471
|
+
icons: t,
|
|
472
|
+
callback: e,
|
|
473
|
+
abort: n
|
|
474
|
+
};
|
|
475
|
+
return o.forEach((r) => {
|
|
476
|
+
(r.loaderCallbacks || (r.loaderCallbacks = [])).push(i);
|
|
477
|
+
}), n;
|
|
478
|
+
}
|
|
479
|
+
function pt(e) {
|
|
480
|
+
const t = {
|
|
481
|
+
loaded: [],
|
|
482
|
+
missing: [],
|
|
483
|
+
pending: []
|
|
484
|
+
}, o = /* @__PURE__ */ Object.create(null);
|
|
485
|
+
e.sort((n, i) => n.provider !== i.provider ? n.provider.localeCompare(i.provider) : n.prefix !== i.prefix ? n.prefix.localeCompare(i.prefix) : n.name.localeCompare(i.name));
|
|
486
|
+
let s = {
|
|
487
|
+
provider: "",
|
|
488
|
+
prefix: "",
|
|
489
|
+
name: ""
|
|
490
|
+
};
|
|
491
|
+
return e.forEach((n) => {
|
|
492
|
+
if (s.name === n.name && s.prefix === n.prefix && s.provider === n.provider) return;
|
|
493
|
+
s = n;
|
|
494
|
+
const i = n.provider, r = n.prefix, l = n.name, a = o[i] || (o[i] = /* @__PURE__ */ Object.create(null)), c = a[r] || (a[r] = k(i, r));
|
|
495
|
+
let u;
|
|
496
|
+
l in c.icons ? u = t.loaded : r === "" || c.missing.has(l) ? u = t.missing : u = t.pending;
|
|
497
|
+
const f = {
|
|
498
|
+
provider: i,
|
|
499
|
+
prefix: r,
|
|
500
|
+
name: l
|
|
501
|
+
};
|
|
502
|
+
u.push(f);
|
|
503
|
+
}), t;
|
|
504
|
+
}
|
|
505
|
+
function gt(e, t = !0, o = !1) {
|
|
506
|
+
const s = [];
|
|
507
|
+
return e.forEach((n) => {
|
|
508
|
+
const i = typeof n == "string" ? R(n, t, o) : n;
|
|
509
|
+
i && s.push(i);
|
|
510
|
+
}), s;
|
|
511
|
+
}
|
|
512
|
+
const mt = {
|
|
513
|
+
resources: [],
|
|
514
|
+
index: 0,
|
|
515
|
+
timeout: 2e3,
|
|
516
|
+
rotate: 750,
|
|
517
|
+
random: !1,
|
|
518
|
+
dataAfterTimeout: !1
|
|
519
|
+
};
|
|
520
|
+
function yt(e, t, o, s) {
|
|
521
|
+
const n = e.resources.length, i = e.random ? Math.floor(Math.random() * n) : e.index;
|
|
522
|
+
let r;
|
|
523
|
+
if (e.random) {
|
|
524
|
+
let p = e.resources.slice(0);
|
|
525
|
+
for (r = []; p.length > 1; ) {
|
|
526
|
+
const v = Math.floor(Math.random() * p.length);
|
|
527
|
+
r.push(p[v]), p = p.slice(0, v).concat(p.slice(v + 1));
|
|
528
|
+
}
|
|
529
|
+
r = r.concat(p);
|
|
530
|
+
} else r = e.resources.slice(i).concat(e.resources.slice(0, i));
|
|
531
|
+
const l = Date.now();
|
|
532
|
+
let a = "pending", c = 0, u, f = null, h = [], m = [];
|
|
533
|
+
typeof s == "function" && m.push(s);
|
|
534
|
+
function y() {
|
|
535
|
+
f && (clearTimeout(f), f = null);
|
|
536
|
+
}
|
|
537
|
+
function g() {
|
|
538
|
+
a === "pending" && (a = "aborted"), y(), h.forEach((p) => {
|
|
539
|
+
p.status === "pending" && (p.status = "aborted");
|
|
540
|
+
}), h = [];
|
|
541
|
+
}
|
|
542
|
+
function d(p, v) {
|
|
543
|
+
v && (m = []), typeof p == "function" && m.push(p);
|
|
544
|
+
}
|
|
545
|
+
function w() {
|
|
546
|
+
return {
|
|
547
|
+
startTime: l,
|
|
548
|
+
payload: t,
|
|
549
|
+
status: a,
|
|
550
|
+
queriesSent: c,
|
|
551
|
+
queriesPending: h.length,
|
|
552
|
+
subscribe: d,
|
|
553
|
+
abort: g
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
function I() {
|
|
557
|
+
a = "failed", m.forEach((p) => {
|
|
558
|
+
p(void 0, u);
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
function x() {
|
|
562
|
+
h.forEach((p) => {
|
|
563
|
+
p.status === "pending" && (p.status = "aborted");
|
|
564
|
+
}), h = [];
|
|
565
|
+
}
|
|
566
|
+
function b(p, v, L) {
|
|
567
|
+
const j = v !== "success";
|
|
568
|
+
switch (h = h.filter((S) => S !== p), a) {
|
|
569
|
+
case "pending":
|
|
570
|
+
break;
|
|
571
|
+
case "failed":
|
|
572
|
+
if (j || !e.dataAfterTimeout) return;
|
|
573
|
+
break;
|
|
574
|
+
default:
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
if (v === "abort") {
|
|
578
|
+
u = L, I();
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
if (j) {
|
|
582
|
+
u = L, h.length || (r.length ? B() : I());
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
if (y(), x(), !e.random) {
|
|
586
|
+
const S = e.resources.indexOf(p.resource);
|
|
587
|
+
S !== -1 && S !== e.index && (e.index = S);
|
|
588
|
+
}
|
|
589
|
+
a = "completed", m.forEach((S) => {
|
|
590
|
+
S(L);
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
function B() {
|
|
594
|
+
if (a !== "pending") return;
|
|
595
|
+
y();
|
|
596
|
+
const p = r.shift();
|
|
597
|
+
if (p === void 0) {
|
|
598
|
+
if (h.length) {
|
|
599
|
+
f = setTimeout(() => {
|
|
600
|
+
y(), a === "pending" && (x(), I());
|
|
601
|
+
}, e.timeout);
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
I();
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
const v = {
|
|
608
|
+
status: "pending",
|
|
609
|
+
resource: p,
|
|
610
|
+
callback: (L, j) => {
|
|
611
|
+
b(v, L, j);
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
h.push(v), c++, f = setTimeout(B, e.rotate), o(p, t, v.callback);
|
|
615
|
+
}
|
|
616
|
+
return setTimeout(B), w;
|
|
617
|
+
}
|
|
618
|
+
function je(e) {
|
|
619
|
+
const t = {
|
|
620
|
+
...mt,
|
|
621
|
+
...e
|
|
622
|
+
};
|
|
623
|
+
let o = [];
|
|
624
|
+
function s() {
|
|
625
|
+
o = o.filter((r) => r().status === "pending");
|
|
626
|
+
}
|
|
627
|
+
function n(r, l, a) {
|
|
628
|
+
const c = yt(t, r, l, (u, f) => {
|
|
629
|
+
s(), a && a(u, f);
|
|
630
|
+
});
|
|
631
|
+
return o.push(c), c;
|
|
632
|
+
}
|
|
633
|
+
function i(r) {
|
|
634
|
+
return o.find((l) => r(l)) || null;
|
|
635
|
+
}
|
|
636
|
+
return {
|
|
637
|
+
query: n,
|
|
638
|
+
find: i,
|
|
639
|
+
setIndex: (r) => {
|
|
640
|
+
t.index = r;
|
|
641
|
+
},
|
|
642
|
+
getIndex: () => t.index,
|
|
643
|
+
cleanup: s
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
function re() {
|
|
647
|
+
}
|
|
648
|
+
const _ = /* @__PURE__ */ Object.create(null);
|
|
649
|
+
function bt(e) {
|
|
650
|
+
if (!_[e]) {
|
|
651
|
+
const t = J(e);
|
|
652
|
+
if (!t) return;
|
|
653
|
+
const o = {
|
|
654
|
+
config: t,
|
|
655
|
+
redundancy: je(t)
|
|
656
|
+
};
|
|
657
|
+
_[e] = o;
|
|
658
|
+
}
|
|
659
|
+
return _[e];
|
|
660
|
+
}
|
|
661
|
+
function vt(e, t, o) {
|
|
662
|
+
let s, n;
|
|
663
|
+
if (typeof e == "string") {
|
|
664
|
+
const i = V(e);
|
|
665
|
+
if (!i)
|
|
666
|
+
return o(void 0, 424), re;
|
|
667
|
+
n = i.send;
|
|
668
|
+
const r = bt(e);
|
|
669
|
+
r && (s = r.redundancy);
|
|
670
|
+
} else {
|
|
671
|
+
const i = K(e);
|
|
672
|
+
if (i) {
|
|
673
|
+
s = je(i);
|
|
674
|
+
const r = e.resources ? e.resources[0] : "", l = V(r);
|
|
675
|
+
l && (n = l.send);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
return !s || !n ? (o(void 0, 424), re) : s.query(t, n, o)().abort;
|
|
679
|
+
}
|
|
680
|
+
function ce() {
|
|
681
|
+
}
|
|
682
|
+
function xt(e) {
|
|
683
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
684
|
+
e.iconsLoaderFlag = !1, ft(e);
|
|
685
|
+
}));
|
|
686
|
+
}
|
|
687
|
+
function wt(e) {
|
|
688
|
+
const t = [], o = [];
|
|
689
|
+
return e.forEach((s) => {
|
|
690
|
+
(s.match(xe) ? t : o).push(s);
|
|
691
|
+
}), {
|
|
692
|
+
valid: t,
|
|
693
|
+
invalid: o
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
function P(e, t, o) {
|
|
697
|
+
function s() {
|
|
698
|
+
const n = e.pendingIcons;
|
|
699
|
+
t.forEach((i) => {
|
|
700
|
+
n && n.delete(i), e.icons[i] || e.missing.add(i);
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
if (o && typeof o == "object") try {
|
|
704
|
+
if (!ke(e, o).length) {
|
|
705
|
+
s();
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
} catch (n) {
|
|
709
|
+
console.error(n);
|
|
710
|
+
}
|
|
711
|
+
s(), xt(e);
|
|
712
|
+
}
|
|
713
|
+
function le(e, t) {
|
|
714
|
+
e instanceof Promise ? e.then((o) => {
|
|
715
|
+
t(o);
|
|
716
|
+
}).catch(() => {
|
|
717
|
+
t(null);
|
|
718
|
+
}) : t(e);
|
|
719
|
+
}
|
|
720
|
+
function It(e, t) {
|
|
721
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
722
|
+
e.iconsQueueFlag = !1;
|
|
723
|
+
const { provider: o, prefix: s } = e, n = e.iconsToLoad;
|
|
724
|
+
if (delete e.iconsToLoad, !n || !n.length) return;
|
|
725
|
+
const i = e.loadIcon;
|
|
726
|
+
if (e.loadIcons && (n.length > 1 || !i)) {
|
|
727
|
+
le(e.loadIcons(n, s, o), (c) => {
|
|
728
|
+
P(e, n, c);
|
|
729
|
+
});
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
if (i) {
|
|
733
|
+
n.forEach((c) => {
|
|
734
|
+
le(i(c, s, o), (u) => {
|
|
735
|
+
P(e, [c], u ? {
|
|
736
|
+
prefix: s,
|
|
737
|
+
icons: { [c]: u }
|
|
738
|
+
} : null);
|
|
739
|
+
});
|
|
740
|
+
});
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
const { valid: r, invalid: l } = wt(n);
|
|
744
|
+
if (l.length && P(e, l, null), !r.length) return;
|
|
745
|
+
const a = s.match(xe) ? V(o) : null;
|
|
746
|
+
if (!a) {
|
|
747
|
+
P(e, r, null);
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
a.prepare(o, s, r).forEach((c) => {
|
|
751
|
+
vt(o, c, (u) => {
|
|
752
|
+
P(e, c.icons, u);
|
|
753
|
+
});
|
|
754
|
+
});
|
|
755
|
+
}));
|
|
756
|
+
}
|
|
757
|
+
const St = (e, t) => {
|
|
758
|
+
const o = gt(e, !0, Le()), s = pt(o);
|
|
759
|
+
if (!s.pending.length) {
|
|
760
|
+
let a = !0;
|
|
761
|
+
return t && setTimeout(() => {
|
|
762
|
+
a && t(s.loaded, s.missing, s.pending, ce);
|
|
763
|
+
}), () => {
|
|
764
|
+
a = !1;
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
const n = /* @__PURE__ */ Object.create(null), i = [];
|
|
768
|
+
let r, l;
|
|
769
|
+
return s.pending.forEach((a) => {
|
|
770
|
+
const { provider: c, prefix: u } = a;
|
|
771
|
+
if (u === l && c === r) return;
|
|
772
|
+
r = c, l = u, i.push(k(c, u));
|
|
773
|
+
const f = n[c] || (n[c] = /* @__PURE__ */ Object.create(null));
|
|
774
|
+
f[u] || (f[u] = []);
|
|
775
|
+
}), s.pending.forEach((a) => {
|
|
776
|
+
const { provider: c, prefix: u, name: f } = a, h = k(c, u), m = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
|
|
777
|
+
m.has(f) || (m.add(f), n[c][u].push(f));
|
|
778
|
+
}), i.forEach((a) => {
|
|
779
|
+
const c = n[a.provider][a.prefix];
|
|
780
|
+
c.length && It(a, c);
|
|
781
|
+
}), t ? ht(t, s, i) : ce;
|
|
782
|
+
};
|
|
783
|
+
function kt(e, t) {
|
|
784
|
+
const o = { ...e };
|
|
785
|
+
for (const s in t) {
|
|
786
|
+
const n = t[s], i = typeof n;
|
|
787
|
+
s in Te ? (n === null || n && (i === "string" || i === "number")) && (o[s] = n) : i === typeof o[s] && (o[s] = s === "rotate" ? n % 4 : n);
|
|
788
|
+
}
|
|
789
|
+
return o;
|
|
790
|
+
}
|
|
791
|
+
const Lt = /[\s,]+/;
|
|
792
|
+
function Tt(e, t) {
|
|
793
|
+
t.split(Lt).forEach((o) => {
|
|
794
|
+
switch (o.trim()) {
|
|
795
|
+
case "horizontal":
|
|
796
|
+
e.hFlip = !0;
|
|
797
|
+
break;
|
|
798
|
+
case "vertical":
|
|
799
|
+
e.vFlip = !0;
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
function Pt(e, t = 0) {
|
|
804
|
+
const o = e.replace(/^-?[0-9.]*/, "");
|
|
805
|
+
function s(n) {
|
|
806
|
+
for (; n < 0; ) n += 4;
|
|
807
|
+
return n % 4;
|
|
808
|
+
}
|
|
809
|
+
if (o === "") {
|
|
810
|
+
const n = parseInt(e);
|
|
811
|
+
return isNaN(n) ? 0 : s(n);
|
|
812
|
+
} else if (o !== e) {
|
|
813
|
+
let n = 0;
|
|
814
|
+
switch (o) {
|
|
815
|
+
case "%":
|
|
816
|
+
n = 25;
|
|
817
|
+
break;
|
|
818
|
+
case "deg":
|
|
819
|
+
n = 90;
|
|
820
|
+
}
|
|
821
|
+
if (n) {
|
|
822
|
+
let i = parseFloat(e.slice(0, e.length - o.length));
|
|
823
|
+
return isNaN(i) ? 0 : (i = i / n, i % 1 === 0 ? s(i) : 0);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
return t;
|
|
827
|
+
}
|
|
828
|
+
function Ct(e, t) {
|
|
829
|
+
let o = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
830
|
+
for (const s in t) o += " " + s + '="' + t[s] + '"';
|
|
831
|
+
return '<svg xmlns="http://www.w3.org/2000/svg"' + o + ">" + e + "</svg>";
|
|
832
|
+
}
|
|
833
|
+
function jt(e) {
|
|
834
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ").replace(/:/g, "%3A").replace(/\//g, "%2F");
|
|
835
|
+
}
|
|
836
|
+
function Et(e) {
|
|
837
|
+
return "data:image/svg+xml," + jt(e);
|
|
838
|
+
}
|
|
839
|
+
function Ft(e) {
|
|
840
|
+
return 'url("' + Et(e) + '")';
|
|
841
|
+
}
|
|
842
|
+
const ae = {
|
|
843
|
+
...Pe,
|
|
844
|
+
inline: !1
|
|
845
|
+
}, At = {
|
|
846
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
847
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
848
|
+
"aria-hidden": !0,
|
|
849
|
+
role: "img"
|
|
850
|
+
}, Ot = {
|
|
851
|
+
display: "inline-block"
|
|
852
|
+
}, G = {
|
|
853
|
+
backgroundColor: "currentColor"
|
|
854
|
+
}, Ee = {
|
|
855
|
+
backgroundColor: "transparent"
|
|
856
|
+
}, ue = {
|
|
857
|
+
Image: "var(--svg)",
|
|
858
|
+
Repeat: "no-repeat",
|
|
859
|
+
Size: "100% 100%"
|
|
860
|
+
}, fe = {
|
|
861
|
+
webkitMask: G,
|
|
862
|
+
mask: G,
|
|
863
|
+
background: Ee
|
|
864
|
+
};
|
|
865
|
+
for (const e in fe) {
|
|
866
|
+
const t = fe[e];
|
|
867
|
+
for (const o in ue)
|
|
868
|
+
t[e + o] = ue[o];
|
|
869
|
+
}
|
|
870
|
+
const D = {};
|
|
871
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
872
|
+
const t = e.slice(0, 1) + "Flip";
|
|
873
|
+
D[e + "-flip"] = t, D[e.slice(0, 1) + "-flip"] = t, D[e + "Flip"] = t;
|
|
874
|
+
});
|
|
875
|
+
function de(e) {
|
|
876
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
877
|
+
}
|
|
878
|
+
const he = (e, t) => {
|
|
879
|
+
const o = kt(ae, t), s = { ...At }, n = t.mode || "svg", i = {}, r = t.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
880
|
+
for (let g in t) {
|
|
881
|
+
const d = t[g];
|
|
882
|
+
if (d !== void 0)
|
|
883
|
+
switch (g) {
|
|
884
|
+
// Properties to ignore
|
|
885
|
+
case "icon":
|
|
886
|
+
case "style":
|
|
887
|
+
case "onLoad":
|
|
888
|
+
case "mode":
|
|
889
|
+
case "ssr":
|
|
890
|
+
case "customise":
|
|
891
|
+
break;
|
|
892
|
+
// Boolean attributes
|
|
893
|
+
case "inline":
|
|
894
|
+
case "hFlip":
|
|
895
|
+
case "vFlip":
|
|
896
|
+
o[g] = d === !0 || d === "true" || d === 1;
|
|
897
|
+
break;
|
|
898
|
+
// Flip as string: 'horizontal,vertical'
|
|
899
|
+
// Handled after this loop, see below.
|
|
900
|
+
case "flip":
|
|
901
|
+
break;
|
|
902
|
+
// Color: override style
|
|
903
|
+
case "color":
|
|
904
|
+
i.color = d;
|
|
905
|
+
break;
|
|
906
|
+
// Rotation as string
|
|
907
|
+
case "rotate":
|
|
908
|
+
typeof d == "string" ? o[g] = Pt(d) : typeof d == "number" && (o[g] = d);
|
|
909
|
+
break;
|
|
910
|
+
// Remove aria-hidden
|
|
911
|
+
case "ariaHidden":
|
|
912
|
+
case "aria-hidden":
|
|
913
|
+
d !== !0 && d !== "true" && delete s["aria-hidden"];
|
|
914
|
+
break;
|
|
915
|
+
default: {
|
|
916
|
+
const w = D[g];
|
|
917
|
+
w ? (d === !0 || d === "true" || d === 1) && (o[w] = !0) : ae[g] === void 0 && (s[g] = d);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
typeof t.flip == "string" && Tt(o, t.flip);
|
|
922
|
+
const a = Ye(e, o), c = a.attributes;
|
|
923
|
+
if (o.inline && (i.verticalAlign = "-0.125em"), n === "svg")
|
|
924
|
+
return s.style = {
|
|
925
|
+
...i,
|
|
926
|
+
...l
|
|
927
|
+
}, Object.assign(s, c), s.innerHTML = tt(a.body), Y("svg", s);
|
|
928
|
+
const { body: u, width: f, height: h } = e, m = n === "mask" || (n === "bg" ? !1 : u.indexOf("currentColor") !== -1), y = Ct(u, {
|
|
929
|
+
...c,
|
|
930
|
+
width: f + "",
|
|
931
|
+
height: h + ""
|
|
932
|
+
});
|
|
933
|
+
return s.style = {
|
|
934
|
+
...i,
|
|
935
|
+
"--svg": Ft(y),
|
|
936
|
+
width: de(c.width),
|
|
937
|
+
height: de(c.height),
|
|
938
|
+
...Ot,
|
|
939
|
+
...m ? G : Ee,
|
|
940
|
+
...l
|
|
941
|
+
}, Y("span", s);
|
|
942
|
+
};
|
|
943
|
+
Le(!0);
|
|
944
|
+
nt("", ut);
|
|
945
|
+
if (typeof document < "u" && typeof window < "u") {
|
|
946
|
+
const e = window;
|
|
947
|
+
if (e.IconifyPreload !== void 0) {
|
|
948
|
+
const t = e.IconifyPreload, o = "Invalid IconifyPreload syntax.";
|
|
949
|
+
typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((s) => {
|
|
950
|
+
try {
|
|
951
|
+
// Check if item is an object and not null/array
|
|
952
|
+
(typeof s != "object" || s === null || s instanceof Array || // Check for 'icons' and 'prefix'
|
|
953
|
+
typeof s.icons != "object" || typeof s.prefix != "string" || // Add icon set
|
|
954
|
+
!Ue(s)) && console.error(o);
|
|
955
|
+
} catch {
|
|
956
|
+
console.error(o);
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
if (e.IconifyProviders !== void 0) {
|
|
961
|
+
const t = e.IconifyProviders;
|
|
962
|
+
if (typeof t == "object" && t !== null)
|
|
963
|
+
for (let o in t) {
|
|
964
|
+
const s = "IconifyProviders[" + o + "] is invalid.";
|
|
965
|
+
try {
|
|
966
|
+
const n = t[o];
|
|
967
|
+
if (typeof n != "object" || !n || n.resources === void 0)
|
|
968
|
+
continue;
|
|
969
|
+
ot(o, n) || console.error(s);
|
|
970
|
+
} catch {
|
|
971
|
+
console.error(s);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
const Dt = {
|
|
977
|
+
...z,
|
|
978
|
+
body: ""
|
|
979
|
+
}, Mt = W((e, { emit: t }) => {
|
|
980
|
+
const o = E(null);
|
|
981
|
+
function s() {
|
|
982
|
+
o.value && (o.value.abort?.(), o.value = null);
|
|
983
|
+
}
|
|
984
|
+
const n = E(!!e.ssr), i = E(""), r = Fe(null);
|
|
985
|
+
function l() {
|
|
986
|
+
const c = e.icon;
|
|
987
|
+
if (typeof c == "object" && c !== null && typeof c.body == "string")
|
|
988
|
+
return i.value = "", {
|
|
989
|
+
data: c
|
|
990
|
+
};
|
|
991
|
+
let u;
|
|
992
|
+
if (typeof c != "string" || (u = R(c, !1, !0)) === null)
|
|
993
|
+
return null;
|
|
994
|
+
let f = qe(u);
|
|
995
|
+
if (!f) {
|
|
996
|
+
const y = o.value;
|
|
997
|
+
return (!y || y.name !== c) && (f === null ? o.value = {
|
|
998
|
+
name: c
|
|
999
|
+
} : o.value = {
|
|
1000
|
+
name: c,
|
|
1001
|
+
abort: St([u], a)
|
|
1002
|
+
}), null;
|
|
1003
|
+
}
|
|
1004
|
+
s(), i.value !== c && (i.value = c, Me(() => {
|
|
1005
|
+
t("load", c);
|
|
1006
|
+
}));
|
|
1007
|
+
const h = e.customise;
|
|
1008
|
+
if (h) {
|
|
1009
|
+
f = Object.assign({}, f);
|
|
1010
|
+
const y = h(f.body, u.name, u.prefix, u.provider);
|
|
1011
|
+
typeof y == "string" && (f.body = y);
|
|
1012
|
+
}
|
|
1013
|
+
const m = ["iconify"];
|
|
1014
|
+
return u.prefix !== "" && m.push("iconify--" + u.prefix), u.provider !== "" && m.push("iconify--" + u.provider), { data: f, classes: m };
|
|
1015
|
+
}
|
|
1016
|
+
function a() {
|
|
1017
|
+
const c = l();
|
|
1018
|
+
c ? c.data !== r.value?.data && (r.value = c) : r.value = null;
|
|
1019
|
+
}
|
|
1020
|
+
return n.value ? a() : Ae(() => {
|
|
1021
|
+
n.value = !0, a();
|
|
1022
|
+
}), Oe(() => e.icon, a), De(s), () => {
|
|
1023
|
+
const c = r.value;
|
|
1024
|
+
if (!c)
|
|
1025
|
+
return he(Dt, e);
|
|
1026
|
+
let u = e;
|
|
1027
|
+
return c.classes && (u = {
|
|
1028
|
+
...e,
|
|
1029
|
+
class: c.classes.join(" ")
|
|
1030
|
+
}), he({
|
|
1031
|
+
...z,
|
|
1032
|
+
...c.data
|
|
1033
|
+
}, u);
|
|
1034
|
+
};
|
|
1035
|
+
}, {
|
|
1036
|
+
props: {
|
|
1037
|
+
// Icon and render mode
|
|
1038
|
+
icon: { type: [String, Object], required: !0 },
|
|
1039
|
+
mode: { type: String },
|
|
1040
|
+
ssr: { type: Boolean },
|
|
1041
|
+
// Layout and style
|
|
1042
|
+
width: { type: [String, Number] },
|
|
1043
|
+
height: { type: [String, Number] },
|
|
1044
|
+
style: { type: [String, Object] },
|
|
1045
|
+
color: { type: String },
|
|
1046
|
+
inline: { type: Boolean },
|
|
1047
|
+
// Transformations
|
|
1048
|
+
rotate: { type: [Number, String] },
|
|
1049
|
+
hFlip: { type: Boolean },
|
|
1050
|
+
horizontalFlip: { type: Boolean },
|
|
1051
|
+
vFlip: { type: Boolean },
|
|
1052
|
+
verticalFlip: { type: Boolean },
|
|
1053
|
+
flip: { type: String },
|
|
1054
|
+
// Misc
|
|
1055
|
+
id: { type: String },
|
|
1056
|
+
ariaHidden: { type: [Boolean, String], default: void 0 },
|
|
1057
|
+
customise: { type: Function },
|
|
1058
|
+
title: { type: String }
|
|
1059
|
+
},
|
|
1060
|
+
emits: ["load"]
|
|
1061
|
+
}), pe = ["mdi:", "line-md:"];
|
|
1062
|
+
function Nt(e) {
|
|
1063
|
+
e.filter((t) => !!t).forEach((t) => {
|
|
1064
|
+
pe.some((o) => t.startsWith(o)) || console.warn(`[AlpineIcon] "${t}" is not from an allowed collection (${pe.join(", ")}).`);
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
const Rt = /* @__PURE__ */ W({
|
|
5
1068
|
name: "AlpineIcon",
|
|
6
1069
|
__name: "Icon",
|
|
7
1070
|
props: {
|
|
@@ -10,8 +1073,8 @@ const J = ["xs", "sm", "md", "lg", "xl", "2xl"], T = /* @__PURE__ */ w({
|
|
|
10
1073
|
size: { default: "md" },
|
|
11
1074
|
isLoading: { type: Boolean, default: !1 }
|
|
12
1075
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
1076
|
+
setup(e) {
|
|
1077
|
+
const t = e, o = be({
|
|
15
1078
|
variants: {
|
|
16
1079
|
size: {
|
|
17
1080
|
xs: "size-3",
|
|
@@ -22,14 +1085,17 @@ const J = ["xs", "sm", "md", "lg", "xl", "2xl"], T = /* @__PURE__ */ w({
|
|
|
22
1085
|
"2xl": "size-8"
|
|
23
1086
|
}
|
|
24
1087
|
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1088
|
+
});
|
|
1089
|
+
Nt([t.icon, t.hoverIcon]);
|
|
1090
|
+
const s = E(!1), n = q(() => t.isLoading ? ve.loader : t.hoverIcon && s.value ? t.hoverIcon : t.icon);
|
|
1091
|
+
return (i, r) => (F(), me(M(Mt), {
|
|
1092
|
+
icon: n.value,
|
|
1093
|
+
class: ye(M(o)({ size: e.size })),
|
|
1094
|
+
onMouseover: r[0] || (r[0] = (l) => s.value = !0),
|
|
1095
|
+
onMouseleave: r[1] || (r[1] = (l) => s.value = !1)
|
|
1096
|
+
}, null, 8, ["icon", "class"]));
|
|
1097
|
+
}
|
|
1098
|
+
}), zt = be({
|
|
33
1099
|
base: "rounded-lg flex items-center justify-center gap-2 font-medium transition-all max-w-full border",
|
|
34
1100
|
variants: {
|
|
35
1101
|
iconPosition: {
|
|
@@ -142,65 +1208,65 @@ const J = ["xs", "sm", "md", "lg", "xl", "2xl"], T = /* @__PURE__ */ w({
|
|
|
142
1208
|
class: "cursor-pointer"
|
|
143
1209
|
}
|
|
144
1210
|
]
|
|
145
|
-
}),
|
|
1211
|
+
}), Bt = ["primary", "secondary", "invisible"], $t = ["left", "right"], _t = ["button", "submit", "reset"], Ht = ["type", "aria-label", "disabled"], qt = {
|
|
146
1212
|
key: 1,
|
|
147
1213
|
class: "min-w-0 truncate"
|
|
148
|
-
},
|
|
1214
|
+
}, Jt = /* @__PURE__ */ W({
|
|
149
1215
|
name: "AlpineButton",
|
|
150
1216
|
__name: "Button",
|
|
151
1217
|
props: {
|
|
152
1218
|
label: {},
|
|
153
1219
|
icon: { default: null },
|
|
154
|
-
design: { default:
|
|
1220
|
+
design: { default: Bt[0] },
|
|
155
1221
|
isLoading: { type: Boolean, default: !1 },
|
|
156
1222
|
isDisabled: { type: Boolean, default: !1 },
|
|
157
1223
|
isDanger: { type: Boolean, default: !1 },
|
|
158
|
-
iconPosition: { default: $[0] },
|
|
159
|
-
type: { default:
|
|
1224
|
+
iconPosition: { default: $t[0] },
|
|
1225
|
+
type: { default: _t[0] }
|
|
160
1226
|
},
|
|
161
|
-
setup(
|
|
162
|
-
const
|
|
163
|
-
return (n,
|
|
164
|
-
type:
|
|
165
|
-
"aria-label":
|
|
166
|
-
class:
|
|
167
|
-
design:
|
|
168
|
-
iconPosition:
|
|
169
|
-
isLoading:
|
|
170
|
-
isDisabled:
|
|
171
|
-
isDanger:
|
|
1227
|
+
setup(e) {
|
|
1228
|
+
const t = e, o = q(() => t.isLoading ? ve.loader : t.icon), s = q(() => !t.icon && !t.label ? "-" : t.label);
|
|
1229
|
+
return (n, i) => (F(), Z("button", {
|
|
1230
|
+
type: t.type,
|
|
1231
|
+
"aria-label": t.label ?? t.icon ?? "Button without label or icon",
|
|
1232
|
+
class: ye(M(zt)({
|
|
1233
|
+
design: t.design,
|
|
1234
|
+
iconPosition: t.iconPosition,
|
|
1235
|
+
isLoading: t.isLoading,
|
|
1236
|
+
isDisabled: t.isDisabled,
|
|
1237
|
+
isDanger: t.isDanger,
|
|
172
1238
|
hasLabel: !!s.value
|
|
173
1239
|
})),
|
|
174
|
-
disabled:
|
|
1240
|
+
disabled: t.isDisabled || t.isLoading
|
|
175
1241
|
}, [
|
|
176
|
-
|
|
1242
|
+
o.value ? (F(), me(M(Rt), {
|
|
177
1243
|
key: 0,
|
|
178
1244
|
"aria-hidden": !0,
|
|
179
|
-
icon:
|
|
1245
|
+
icon: o.value,
|
|
180
1246
|
class: "shrink-0"
|
|
181
|
-
}, null, 8, ["icon"])) :
|
|
182
|
-
s.value ? (
|
|
183
|
-
], 10,
|
|
1247
|
+
}, null, 8, ["icon"])) : ee("", !0),
|
|
1248
|
+
s.value ? (F(), Z("span", qt, Ne(s.value), 1)) : ee("", !0)
|
|
1249
|
+
], 10, Ht));
|
|
184
1250
|
}
|
|
185
1251
|
});
|
|
186
|
-
function
|
|
187
|
-
const
|
|
188
|
-
return
|
|
189
|
-
r: Number.parseInt(
|
|
190
|
-
g: Number.parseInt(
|
|
191
|
-
b: Number.parseInt(
|
|
1252
|
+
function Qt(e) {
|
|
1253
|
+
const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
1254
|
+
return t ? {
|
|
1255
|
+
r: Number.parseInt(t[1], 16),
|
|
1256
|
+
g: Number.parseInt(t[2], 16),
|
|
1257
|
+
b: Number.parseInt(t[3], 16)
|
|
192
1258
|
} : { r: 0, g: 0, b: 0 };
|
|
193
1259
|
}
|
|
194
|
-
function
|
|
195
|
-
const
|
|
196
|
-
return
|
|
1260
|
+
function H(e) {
|
|
1261
|
+
const t = e / 255;
|
|
1262
|
+
return t <= 0.04045 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
|
|
197
1263
|
}
|
|
198
|
-
function
|
|
199
|
-
const { r:
|
|
200
|
-
let
|
|
201
|
-
return
|
|
1264
|
+
function Ut(e) {
|
|
1265
|
+
const { r: t, g: o, b: s } = Qt(e), n = H(t), i = H(o), r = H(s), l = 0.4122214708 * n + 0.5363325363 * i + 0.0514459929 * r, a = 0.2119034982 * n + 0.6806995451 * i + 0.1073969566 * r, c = 0.0883024619 * n + 0.2817188376 * i + 0.6299787005 * r, u = Math.cbrt(l), f = Math.cbrt(a), h = Math.cbrt(c), m = 0.2104542553 * u + 0.793617785 * f - 0.0040720468 * h, y = 1.9779984951 * u - 2.428592205 * f + 0.4505937099 * h, g = 0.0259040371 * u + 0.7827717662 * f - 0.808675766 * h, d = Math.sqrt(y * y + g * g);
|
|
1266
|
+
let w = Math.atan2(g, y) * 180 / Math.PI;
|
|
1267
|
+
return w < 0 && (w += 360), { lightness: m, chroma: d, hue: w };
|
|
202
1268
|
}
|
|
203
|
-
const
|
|
1269
|
+
const ge = {
|
|
204
1270
|
50: 1.4208,
|
|
205
1271
|
100: 1.3779,
|
|
206
1272
|
200: 1.314,
|
|
@@ -211,7 +1277,7 @@ const x = {
|
|
|
211
1277
|
700: 0.754,
|
|
212
1278
|
800: 0.6501,
|
|
213
1279
|
900: 0.5749
|
|
214
|
-
},
|
|
1280
|
+
}, Vt = {
|
|
215
1281
|
50: 0.0549,
|
|
216
1282
|
100: 0.135,
|
|
217
1283
|
200: 0.262,
|
|
@@ -223,27 +1289,27 @@ const x = {
|
|
|
223
1289
|
800: 0.747,
|
|
224
1290
|
900: 0.595
|
|
225
1291
|
};
|
|
226
|
-
function
|
|
227
|
-
const { lightness:
|
|
228
|
-
for (const
|
|
229
|
-
const
|
|
230
|
-
n[`--color-accent-${
|
|
1292
|
+
function Gt(e) {
|
|
1293
|
+
const { lightness: t, chroma: o, hue: s } = Ut(e), n = {};
|
|
1294
|
+
for (const i of Object.keys(ge)) {
|
|
1295
|
+
const r = Math.min(1, Math.max(0, t * ge[i])), l = Math.max(0, o * Vt[i]);
|
|
1296
|
+
n[`--color-accent-${i}`] = `oklch(${(r * 100).toFixed(1)}% ${l.toFixed(3)} ${s.toFixed(1)})`;
|
|
231
1297
|
}
|
|
232
1298
|
return n;
|
|
233
1299
|
}
|
|
234
|
-
function
|
|
235
|
-
const
|
|
236
|
-
for (const [s, n] of Object.entries(
|
|
237
|
-
|
|
1300
|
+
function Yt(e) {
|
|
1301
|
+
const t = Gt(e), o = document.documentElement;
|
|
1302
|
+
for (const [s, n] of Object.entries(t))
|
|
1303
|
+
o.style.setProperty(s, n);
|
|
238
1304
|
}
|
|
239
|
-
function
|
|
240
|
-
document.documentElement.style.setProperty("--button-text-color",
|
|
1305
|
+
function Zt(e) {
|
|
1306
|
+
document.documentElement.style.setProperty("--button-text-color", e);
|
|
241
1307
|
}
|
|
242
1308
|
export {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
1309
|
+
Jt as AlpineButton,
|
|
1310
|
+
Rt as AlpineIcon,
|
|
1311
|
+
Gt as generateAccentScale,
|
|
1312
|
+
Xt as iconSizes,
|
|
1313
|
+
Yt as setAccentColorTheme,
|
|
1314
|
+
Zt as setButtonTextColor
|
|
249
1315
|
};
|