@neuralytics/alpine-ds 0.6.0 → 0.7.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 +10 -0
- package/README.md +47 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +2 -2
- package/dist/fonts/OFL.txt +94 -0
- package/dist/fonts/lato-latin-bold.woff2 +0 -0
- package/dist/fonts/lato-latin-ext-bold.woff2 +0 -0
- package/dist/fonts/lato-latin-ext-medium.woff2 +0 -0
- package/dist/fonts/lato-latin-ext-regular.woff2 +0 -0
- package/dist/fonts/lato-latin-medium.woff2 +0 -0
- package/dist/fonts/lato-latin-regular.woff2 +0 -0
- package/dist/fonts.css +67 -0
- package/dist/index.mjs +891 -894
- package/dist/tailwind-preset.mjs +32 -15
- package/dist/theme.css +48 -0
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { tv as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as ce, ref as B, shallowRef as Zt, onMounted as Jt, watch as vt, onUnmounted as en, h as Ze, nextTick as tn, useTemplateRef as Me, onBeforeUnmount as St, createBlock as ge, openBlock as z, Teleport as nn, createElementBlock as me, createCommentVNode as ye, normalizeStyle as Je, renderSlot as Ne, useId as on, withKeys as sn, unref as k, createVNode as Tt, withCtx as be, createElementVNode as ue, toDisplayString as Ot, computed as $e, mergeProps as At } from "vue";
|
|
2
|
+
import { tv as Et } from "tailwind-variants";
|
|
3
|
+
const It = {
|
|
4
4
|
loader: "line-md:loading-twotone-loop"
|
|
5
|
-
},
|
|
6
|
-
const i =
|
|
7
|
-
if (
|
|
5
|
+
}, pi = ["xs", "sm", "md", "lg", "xl", "2xl"], Rt = /^[a-z0-9]+(-[a-z0-9]+)*$/, Te = (e, t, n, o = "") => {
|
|
6
|
+
const i = e.split(":");
|
|
7
|
+
if (e.slice(0, 1) === "@") {
|
|
8
8
|
if (i.length < 2 || i.length > 3) return null;
|
|
9
9
|
o = i.shift().slice(1);
|
|
10
10
|
}
|
|
@@ -15,7 +15,7 @@ const Ce = {
|
|
|
15
15
|
prefix: a,
|
|
16
16
|
name: c
|
|
17
17
|
};
|
|
18
|
-
return
|
|
18
|
+
return t && !de(l) ? null : l;
|
|
19
19
|
}
|
|
20
20
|
const s = i[0], r = s.split("-");
|
|
21
21
|
if (r.length > 1) {
|
|
@@ -24,7 +24,7 @@ const Ce = {
|
|
|
24
24
|
prefix: r.shift(),
|
|
25
25
|
name: r.join("-")
|
|
26
26
|
};
|
|
27
|
-
return
|
|
27
|
+
return t && !de(c) ? null : c;
|
|
28
28
|
}
|
|
29
29
|
if (n && o === "") {
|
|
30
30
|
const c = {
|
|
@@ -32,12 +32,12 @@ const Ce = {
|
|
|
32
32
|
prefix: "",
|
|
33
33
|
name: s
|
|
34
34
|
};
|
|
35
|
-
return
|
|
35
|
+
return t && !de(c, n) ? null : c;
|
|
36
36
|
}
|
|
37
37
|
return null;
|
|
38
|
-
},
|
|
39
|
-
function
|
|
40
|
-
const n =
|
|
38
|
+
}, de = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
39
|
+
function rn(e, t) {
|
|
40
|
+
const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
|
|
41
41
|
function s(r) {
|
|
42
42
|
if (n[r]) return i[r] = [];
|
|
43
43
|
if (!(r in i)) {
|
|
@@ -49,194 +49,194 @@ function cn(t, e) {
|
|
|
49
49
|
}
|
|
50
50
|
return Object.keys(n).concat(Object.keys(o)).forEach(s), i;
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Lt = Object.freeze({
|
|
53
53
|
left: 0,
|
|
54
54
|
top: 0,
|
|
55
55
|
width: 16,
|
|
56
56
|
height: 16
|
|
57
|
-
}),
|
|
57
|
+
}), we = Object.freeze({
|
|
58
58
|
rotate: 0,
|
|
59
59
|
vFlip: !1,
|
|
60
60
|
hFlip: !1
|
|
61
|
-
}),
|
|
62
|
-
...
|
|
63
|
-
...
|
|
64
|
-
}),
|
|
65
|
-
...
|
|
61
|
+
}), Oe = Object.freeze({
|
|
62
|
+
...Lt,
|
|
63
|
+
...we
|
|
64
|
+
}), _e = Object.freeze({
|
|
65
|
+
...Oe,
|
|
66
66
|
body: "",
|
|
67
67
|
hidden: !1
|
|
68
68
|
});
|
|
69
|
-
function
|
|
69
|
+
function cn(e, t) {
|
|
70
70
|
const n = {};
|
|
71
|
-
!
|
|
72
|
-
const o = ((
|
|
71
|
+
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
72
|
+
const o = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
73
73
|
return o && (n.rotate = o), n;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const n =
|
|
77
|
-
for (const o in
|
|
75
|
+
function et(e, t) {
|
|
76
|
+
const n = cn(e, t);
|
|
77
|
+
for (const o in _e) o in we ? o in e && !(o in n) && (n[o] = we[o]) : o in t ? n[o] = t[o] : o in e && (n[o] = e[o]);
|
|
78
78
|
return n;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
const o =
|
|
80
|
+
function ln(e, t, n) {
|
|
81
|
+
const o = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
82
82
|
let s = {};
|
|
83
83
|
function r(c) {
|
|
84
|
-
s =
|
|
84
|
+
s = et(o[c] || i[c], s);
|
|
85
85
|
}
|
|
86
|
-
return r(
|
|
86
|
+
return r(t), n.forEach(r), et(e, s);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ct(e, t) {
|
|
89
89
|
const n = [];
|
|
90
|
-
if (typeof
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
91
|
+
e.not_found instanceof Array && e.not_found.forEach((i) => {
|
|
92
|
+
t(i, null), n.push(i);
|
|
93
93
|
});
|
|
94
|
-
const o =
|
|
94
|
+
const o = rn(e);
|
|
95
95
|
for (const i in o) {
|
|
96
96
|
const s = o[i];
|
|
97
|
-
s && (
|
|
97
|
+
s && (t(i, ln(e, i, s)), n.push(i));
|
|
98
98
|
}
|
|
99
99
|
return n;
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const an = {
|
|
102
102
|
provider: "",
|
|
103
103
|
aliases: {},
|
|
104
104
|
not_found: {},
|
|
105
|
-
...
|
|
105
|
+
...Lt
|
|
106
106
|
};
|
|
107
|
-
function
|
|
108
|
-
for (const n in
|
|
107
|
+
function Ce(e, t) {
|
|
108
|
+
for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
109
109
|
return !0;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (typeof
|
|
113
|
-
const
|
|
114
|
-
if (typeof
|
|
115
|
-
const n =
|
|
111
|
+
function Pt(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" || !Ce(e, an)) return null;
|
|
115
|
+
const n = t.icons;
|
|
116
116
|
for (const i in n) {
|
|
117
117
|
const s = n[i];
|
|
118
|
-
if (!i || typeof s.body != "string" || !
|
|
118
|
+
if (!i || typeof s.body != "string" || !Ce(s, _e)) return null;
|
|
119
119
|
}
|
|
120
|
-
const o =
|
|
120
|
+
const o = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
121
121
|
for (const i in o) {
|
|
122
122
|
const s = o[i], r = s.parent;
|
|
123
|
-
if (!i || typeof r != "string" || !n[r] && !o[r] || !
|
|
123
|
+
if (!i || typeof r != "string" || !n[r] && !o[r] || !Ce(s, _e)) return null;
|
|
124
124
|
}
|
|
125
|
-
return
|
|
125
|
+
return t;
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
function
|
|
127
|
+
const tt = /* @__PURE__ */ Object.create(null);
|
|
128
|
+
function fn(e, t) {
|
|
129
129
|
return {
|
|
130
|
-
provider:
|
|
131
|
-
prefix:
|
|
130
|
+
provider: e,
|
|
131
|
+
prefix: t,
|
|
132
132
|
icons: /* @__PURE__ */ Object.create(null),
|
|
133
133
|
missing: /* @__PURE__ */ new Set()
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function K(
|
|
137
|
-
const n =
|
|
138
|
-
return n[
|
|
136
|
+
function K(e, t) {
|
|
137
|
+
const n = tt[e] || (tt[e] = /* @__PURE__ */ Object.create(null));
|
|
138
|
+
return n[t] || (n[t] = fn(e, t));
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
return
|
|
142
|
-
o ?
|
|
140
|
+
function kt(e, t) {
|
|
141
|
+
return Pt(t) ? Ct(t, (n, o) => {
|
|
142
|
+
o ? e.icons[n] = o : e.missing.add(n);
|
|
143
143
|
}) : [];
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function un(e, t, n) {
|
|
146
146
|
try {
|
|
147
147
|
if (typeof n.body == "string")
|
|
148
|
-
return
|
|
148
|
+
return e.icons[t] = { ...n }, !0;
|
|
149
149
|
} catch {
|
|
150
150
|
}
|
|
151
151
|
return !1;
|
|
152
152
|
}
|
|
153
|
-
let
|
|
154
|
-
function
|
|
155
|
-
return typeof
|
|
153
|
+
let ie = !1;
|
|
154
|
+
function Dt(e) {
|
|
155
|
+
return typeof e == "boolean" && (ie = e), ie;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
const n = K(
|
|
157
|
+
function dn(e) {
|
|
158
|
+
const t = typeof e == "string" ? Te(e, !0, ie) : e;
|
|
159
|
+
if (t) {
|
|
160
|
+
const n = K(t.provider, t.prefix), o = t.name;
|
|
161
161
|
return n.icons[o] || (n.missing.has(o) ? null : void 0);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const n =
|
|
164
|
+
function pn(e, t) {
|
|
165
|
+
const n = Te(e, !0, ie);
|
|
166
166
|
if (!n) return !1;
|
|
167
167
|
const o = K(n.provider, n.prefix);
|
|
168
|
-
return
|
|
168
|
+
return t ? un(o, n.name, t) : (o.missing.add(n.name), !0);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
if (typeof
|
|
172
|
-
if (typeof
|
|
170
|
+
function hn(e, t) {
|
|
171
|
+
if (typeof e != "object") return !1;
|
|
172
|
+
if (typeof t != "string" && (t = e.provider || ""), ie && !t && !e.prefix) {
|
|
173
173
|
let i = !1;
|
|
174
|
-
return
|
|
175
|
-
|
|
174
|
+
return Pt(e) && (e.prefix = "", Ct(e, (s, r) => {
|
|
175
|
+
pn(s, r) && (i = !0);
|
|
176
176
|
})), i;
|
|
177
177
|
}
|
|
178
|
-
const n =
|
|
179
|
-
if (!
|
|
178
|
+
const n = e.prefix;
|
|
179
|
+
if (!de({
|
|
180
180
|
prefix: n,
|
|
181
181
|
name: "a"
|
|
182
182
|
})) return !1;
|
|
183
|
-
const o = K(
|
|
184
|
-
return !!
|
|
183
|
+
const o = K(t, n);
|
|
184
|
+
return !!kt(o, e);
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const Ft = Object.freeze({
|
|
187
187
|
width: null,
|
|
188
188
|
height: null
|
|
189
|
-
}),
|
|
190
|
-
...
|
|
191
|
-
...
|
|
192
|
-
}),
|
|
193
|
-
function
|
|
194
|
-
if (
|
|
195
|
-
if (n = n || 100, typeof
|
|
196
|
-
if (typeof
|
|
197
|
-
const o =
|
|
198
|
-
if (o === null || !o.length) return
|
|
189
|
+
}), Mt = Object.freeze({
|
|
190
|
+
...Ft,
|
|
191
|
+
...we
|
|
192
|
+
}), gn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, mn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
193
|
+
function nt(e, t, n) {
|
|
194
|
+
if (t === 1) return e;
|
|
195
|
+
if (n = n || 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
196
|
+
if (typeof e != "string") return e;
|
|
197
|
+
const o = e.split(gn);
|
|
198
|
+
if (o === null || !o.length) return e;
|
|
199
199
|
const i = [];
|
|
200
|
-
let s = o.shift(), r =
|
|
200
|
+
let s = o.shift(), r = mn.test(s);
|
|
201
201
|
for (; ; ) {
|
|
202
202
|
if (r) {
|
|
203
203
|
const c = parseFloat(s);
|
|
204
|
-
isNaN(c) ? i.push(s) : i.push(Math.ceil(c *
|
|
204
|
+
isNaN(c) ? i.push(s) : i.push(Math.ceil(c * t * n) / n);
|
|
205
205
|
} else i.push(s);
|
|
206
206
|
if (s = o.shift(), s === void 0) return i.join("");
|
|
207
207
|
r = !r;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function yn(e, t = "defs") {
|
|
211
211
|
let n = "";
|
|
212
|
-
const o =
|
|
212
|
+
const o = e.indexOf("<" + t);
|
|
213
213
|
for (; o >= 0; ) {
|
|
214
|
-
const i =
|
|
214
|
+
const i = e.indexOf(">", o), s = e.indexOf("</" + t);
|
|
215
215
|
if (i === -1 || s === -1) break;
|
|
216
|
-
const r =
|
|
216
|
+
const r = e.indexOf(">", s);
|
|
217
217
|
if (r === -1) break;
|
|
218
|
-
n +=
|
|
218
|
+
n += e.slice(i + 1, s).trim(), e = e.slice(0, o).trim() + e.slice(r + 1);
|
|
219
219
|
}
|
|
220
220
|
return {
|
|
221
221
|
defs: n,
|
|
222
|
-
content:
|
|
222
|
+
content: e
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return
|
|
225
|
+
function bn(e, t) {
|
|
226
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
const o =
|
|
230
|
-
return
|
|
228
|
+
function wn(e, t, n) {
|
|
229
|
+
const o = yn(e);
|
|
230
|
+
return bn(o.defs, t + o.content + n);
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
function
|
|
232
|
+
const xn = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
233
|
+
function vn(e, t) {
|
|
234
234
|
const n = {
|
|
235
|
-
...
|
|
236
|
-
...t
|
|
237
|
-
}, o = {
|
|
238
|
-
...Me,
|
|
235
|
+
...Oe,
|
|
239
236
|
...e
|
|
237
|
+
}, o = {
|
|
238
|
+
...Mt,
|
|
239
|
+
...t
|
|
240
240
|
}, i = {
|
|
241
241
|
left: n.left,
|
|
242
242
|
top: n.top,
|
|
@@ -259,13 +259,13 @@ function Sn(t, e) {
|
|
|
259
259
|
case 3:
|
|
260
260
|
v = i.width / 2 + i.left, g.unshift("rotate(-90 " + v.toString() + " " + v.toString() + ")");
|
|
261
261
|
}
|
|
262
|
-
x % 2 === 1 && (i.left !== i.top && (v = i.left, i.left = i.top, i.top = v), i.width !== i.height && (v = i.width, i.width = i.height, i.height = v)), g.length && (s =
|
|
262
|
+
x % 2 === 1 && (i.left !== i.top && (v = i.left, i.left = i.top, i.top = v), i.width !== i.height && (v = i.width, i.width = i.height, i.height = v)), g.length && (s = wn(s, '<g transform="' + g.join(" ") + '">', "</g>"));
|
|
263
263
|
});
|
|
264
264
|
const r = o.width, c = o.height, a = i.width, l = i.height;
|
|
265
265
|
let f, u;
|
|
266
|
-
r === null ? (u = c === null ? "1em" : c === "auto" ? l : c, f =
|
|
266
|
+
r === null ? (u = c === null ? "1em" : c === "auto" ? l : c, f = nt(u, a / l)) : (f = r === "auto" ? a : r, u = c === null ? nt(f, l / a) : c === "auto" ? l : c);
|
|
267
267
|
const p = {}, d = (m, g) => {
|
|
268
|
-
|
|
268
|
+
xn(g) || (p[m] = g.toString());
|
|
269
269
|
};
|
|
270
270
|
d("width", f), d("height", u);
|
|
271
271
|
const h = [
|
|
@@ -280,65 +280,65 @@ function Sn(t, e) {
|
|
|
280
280
|
body: s
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
const
|
|
284
|
-
function
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
return
|
|
283
|
+
const Sn = /\sid="(\S+)"/g, ot = /* @__PURE__ */ new Map();
|
|
284
|
+
function Tn(e) {
|
|
285
|
+
e = e.replace(/[0-9]+$/, "") || "a";
|
|
286
|
+
const t = ot.get(e) || 0;
|
|
287
|
+
return ot.set(e, t + 1), t ? `${e}${t}` : e;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const
|
|
289
|
+
function On(e) {
|
|
290
|
+
const t = [];
|
|
291
291
|
let n;
|
|
292
|
-
for (; n =
|
|
293
|
-
if (!
|
|
292
|
+
for (; n = Sn.exec(e); ) t.push(n[1]);
|
|
293
|
+
if (!t.length) return e;
|
|
294
294
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
295
|
-
return
|
|
296
|
-
const s =
|
|
297
|
-
|
|
298
|
-
}),
|
|
295
|
+
return t.forEach((i) => {
|
|
296
|
+
const s = Tn(i), r = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
297
|
+
e = e.replace(new RegExp('([#;"])(' + r + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
|
|
298
|
+
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
299
299
|
}
|
|
300
|
-
const
|
|
301
|
-
function
|
|
302
|
-
|
|
300
|
+
const je = /* @__PURE__ */ Object.create(null);
|
|
301
|
+
function An(e, t) {
|
|
302
|
+
je[e] = t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
return
|
|
304
|
+
function Be(e) {
|
|
305
|
+
return je[e] || je[""];
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
let
|
|
309
|
-
if (typeof
|
|
310
|
-
else if (
|
|
307
|
+
function He(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
311
|
return {
|
|
312
|
-
resources:
|
|
313
|
-
path:
|
|
314
|
-
maxURL:
|
|
315
|
-
rotate:
|
|
316
|
-
timeout:
|
|
317
|
-
random:
|
|
318
|
-
index:
|
|
319
|
-
dataAfterTimeout:
|
|
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
320
|
};
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
for (;
|
|
324
|
-
|
|
325
|
-
function
|
|
326
|
-
const n =
|
|
327
|
-
return n === null ? !1 : (
|
|
322
|
+
const Ue = /* @__PURE__ */ Object.create(null), ne = ["https://api.simplesvg.com", "https://api.unisvg.com"], pe = [];
|
|
323
|
+
for (; ne.length > 0; ) ne.length === 1 || Math.random() > 0.5 ? pe.push(ne.shift()) : pe.push(ne.pop());
|
|
324
|
+
Ue[""] = He({ resources: ["https://api.iconify.design"].concat(pe) });
|
|
325
|
+
function En(e, t) {
|
|
326
|
+
const n = He(t);
|
|
327
|
+
return n === null ? !1 : (Ue[e] = n, !0);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return
|
|
329
|
+
function qe(e) {
|
|
330
|
+
return Ue[e];
|
|
331
331
|
}
|
|
332
|
-
const
|
|
333
|
-
let
|
|
332
|
+
const In = () => {
|
|
333
|
+
let e;
|
|
334
334
|
try {
|
|
335
|
-
if (
|
|
335
|
+
if (e = fetch, typeof e == "function") return e;
|
|
336
336
|
} catch {
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
|
-
let
|
|
340
|
-
function
|
|
341
|
-
const n =
|
|
339
|
+
let it = In();
|
|
340
|
+
function Rn(e, t) {
|
|
341
|
+
const n = qe(e);
|
|
342
342
|
if (!n) return 0;
|
|
343
343
|
let o;
|
|
344
344
|
if (!n.maxURL) o = 0;
|
|
@@ -347,52 +347,52 @@ function En(t, e) {
|
|
|
347
347
|
n.resources.forEach((r) => {
|
|
348
348
|
i = Math.max(i, r.length);
|
|
349
349
|
});
|
|
350
|
-
const s =
|
|
350
|
+
const s = t + ".json?icons=";
|
|
351
351
|
o = n.maxURL - i - n.path.length - s.length;
|
|
352
352
|
}
|
|
353
353
|
return o;
|
|
354
354
|
}
|
|
355
|
-
function Ln(
|
|
356
|
-
return
|
|
355
|
+
function Ln(e) {
|
|
356
|
+
return e === 404;
|
|
357
357
|
}
|
|
358
|
-
const
|
|
359
|
-
const o = [], i =
|
|
358
|
+
const Cn = (e, t, n) => {
|
|
359
|
+
const o = [], i = Rn(e, t), s = "icons";
|
|
360
360
|
let r = {
|
|
361
361
|
type: s,
|
|
362
|
-
provider:
|
|
363
|
-
prefix:
|
|
362
|
+
provider: e,
|
|
363
|
+
prefix: t,
|
|
364
364
|
icons: []
|
|
365
365
|
}, c = 0;
|
|
366
366
|
return n.forEach((a, l) => {
|
|
367
367
|
c += a.length + 1, c >= i && l > 0 && (o.push(r), r = {
|
|
368
368
|
type: s,
|
|
369
|
-
provider:
|
|
370
|
-
prefix:
|
|
369
|
+
provider: e,
|
|
370
|
+
prefix: t,
|
|
371
371
|
icons: []
|
|
372
372
|
}, c = a.length), r.icons.push(a);
|
|
373
373
|
}), o.push(r), o;
|
|
374
374
|
};
|
|
375
|
-
function
|
|
376
|
-
if (typeof
|
|
377
|
-
const
|
|
378
|
-
if (
|
|
375
|
+
function Pn(e) {
|
|
376
|
+
if (typeof e == "string") {
|
|
377
|
+
const t = qe(e);
|
|
378
|
+
if (t) return t.path;
|
|
379
379
|
}
|
|
380
380
|
return "/";
|
|
381
381
|
}
|
|
382
|
-
const
|
|
383
|
-
if (!
|
|
382
|
+
const kn = (e, t, n) => {
|
|
383
|
+
if (!it) {
|
|
384
384
|
n("abort", 424);
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
|
-
let o =
|
|
388
|
-
switch (
|
|
387
|
+
let o = Pn(t.provider);
|
|
388
|
+
switch (t.type) {
|
|
389
389
|
case "icons": {
|
|
390
|
-
const s =
|
|
390
|
+
const s = t.prefix, r = t.icons.join(","), c = new URLSearchParams({ icons: r });
|
|
391
391
|
o += s + ".json?" + c.toString();
|
|
392
392
|
break;
|
|
393
393
|
}
|
|
394
394
|
case "custom": {
|
|
395
|
-
const s =
|
|
395
|
+
const s = t.uri;
|
|
396
396
|
o += s.slice(0, 1) === "/" ? s.slice(1) : s;
|
|
397
397
|
break;
|
|
398
398
|
}
|
|
@@ -401,7 +401,7 @@ const Dn = (t, e, n) => {
|
|
|
401
401
|
return;
|
|
402
402
|
}
|
|
403
403
|
let i = 503;
|
|
404
|
-
|
|
404
|
+
it(e + o).then((s) => {
|
|
405
405
|
const r = s.status;
|
|
406
406
|
if (r !== 200) {
|
|
407
407
|
setTimeout(() => {
|
|
@@ -423,34 +423,34 @@ const Dn = (t, e, n) => {
|
|
|
423
423
|
}).catch(() => {
|
|
424
424
|
n("next", i);
|
|
425
425
|
});
|
|
426
|
-
},
|
|
427
|
-
prepare:
|
|
428
|
-
send:
|
|
426
|
+
}, Dn = {
|
|
427
|
+
prepare: Cn,
|
|
428
|
+
send: kn
|
|
429
429
|
};
|
|
430
|
-
function
|
|
431
|
-
|
|
430
|
+
function Nt(e, t) {
|
|
431
|
+
e.forEach((n) => {
|
|
432
432
|
const o = n.loaderCallbacks;
|
|
433
|
-
o && (n.loaderCallbacks = o.filter((i) => i.id !==
|
|
433
|
+
o && (n.loaderCallbacks = o.filter((i) => i.id !== t));
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const
|
|
440
|
-
if (!
|
|
436
|
+
function Fn(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
441
|
let n = !1;
|
|
442
|
-
const o =
|
|
443
|
-
|
|
442
|
+
const o = e.provider, i = e.prefix;
|
|
443
|
+
t.forEach((s) => {
|
|
444
444
|
const r = s.icons, c = r.pending.length;
|
|
445
445
|
r.pending = r.pending.filter((a) => {
|
|
446
446
|
if (a.prefix !== i) return !0;
|
|
447
447
|
const l = a.name;
|
|
448
|
-
if (
|
|
448
|
+
if (e.icons[l]) r.loaded.push({
|
|
449
449
|
provider: o,
|
|
450
450
|
prefix: i,
|
|
451
451
|
name: l
|
|
452
452
|
});
|
|
453
|
-
else if (
|
|
453
|
+
else if (e.missing.has(l)) r.missing.push({
|
|
454
454
|
provider: o,
|
|
455
455
|
prefix: i,
|
|
456
456
|
name: l
|
|
@@ -458,58 +458,58 @@ function Mn(t) {
|
|
|
458
458
|
else
|
|
459
459
|
return n = !0, !0;
|
|
460
460
|
return !1;
|
|
461
|
-
}), r.pending.length !== c && (n ||
|
|
461
|
+
}), r.pending.length !== c && (n || Nt([e], s.id), s.callback(r.loaded.slice(0), r.missing.slice(0), r.pending.slice(0), s.abort));
|
|
462
462
|
});
|
|
463
463
|
}));
|
|
464
464
|
}
|
|
465
|
-
let
|
|
466
|
-
function
|
|
467
|
-
const o =
|
|
468
|
-
if (!
|
|
465
|
+
let Mn = 0;
|
|
466
|
+
function Nn(e, t, n) {
|
|
467
|
+
const o = Mn++, i = Nt.bind(null, n, o);
|
|
468
|
+
if (!t.pending.length) return i;
|
|
469
469
|
const s = {
|
|
470
470
|
id: o,
|
|
471
|
-
icons:
|
|
472
|
-
callback:
|
|
471
|
+
icons: t,
|
|
472
|
+
callback: e,
|
|
473
473
|
abort: i
|
|
474
474
|
};
|
|
475
475
|
return n.forEach((r) => {
|
|
476
476
|
(r.loaderCallbacks || (r.loaderCallbacks = [])).push(s);
|
|
477
477
|
}), i;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
const
|
|
479
|
+
function $n(e) {
|
|
480
|
+
const t = {
|
|
481
481
|
loaded: [],
|
|
482
482
|
missing: [],
|
|
483
483
|
pending: []
|
|
484
484
|
}, n = /* @__PURE__ */ Object.create(null);
|
|
485
|
-
|
|
485
|
+
e.sort((i, s) => i.provider !== s.provider ? i.provider.localeCompare(s.provider) : i.prefix !== s.prefix ? i.prefix.localeCompare(s.prefix) : i.name.localeCompare(s.name));
|
|
486
486
|
let o = {
|
|
487
487
|
provider: "",
|
|
488
488
|
prefix: "",
|
|
489
489
|
name: ""
|
|
490
490
|
};
|
|
491
|
-
return
|
|
491
|
+
return e.forEach((i) => {
|
|
492
492
|
if (o.name === i.name && o.prefix === i.prefix && o.provider === i.provider) return;
|
|
493
493
|
o = i;
|
|
494
494
|
const s = i.provider, r = i.prefix, c = i.name, a = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), l = a[r] || (a[r] = K(s, r));
|
|
495
495
|
let f;
|
|
496
|
-
c in l.icons ? f =
|
|
496
|
+
c in l.icons ? f = t.loaded : r === "" || l.missing.has(c) ? f = t.missing : f = t.pending;
|
|
497
497
|
const u = {
|
|
498
498
|
provider: s,
|
|
499
499
|
prefix: r,
|
|
500
500
|
name: c
|
|
501
501
|
};
|
|
502
502
|
f.push(u);
|
|
503
|
-
}),
|
|
503
|
+
}), t;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function _n(e, t = !0, n = !1) {
|
|
506
506
|
const o = [];
|
|
507
|
-
return
|
|
508
|
-
const s = typeof i == "string" ?
|
|
507
|
+
return e.forEach((i) => {
|
|
508
|
+
const s = typeof i == "string" ? Te(i, t, n) : i;
|
|
509
509
|
s && o.push(s);
|
|
510
510
|
}), o;
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const jn = {
|
|
513
513
|
resources: [],
|
|
514
514
|
index: 0,
|
|
515
515
|
timeout: 2e3,
|
|
@@ -517,17 +517,17 @@ const Bn = {
|
|
|
517
517
|
random: !1,
|
|
518
518
|
dataAfterTimeout: !1
|
|
519
519
|
};
|
|
520
|
-
function
|
|
521
|
-
const i =
|
|
520
|
+
function Bn(e, t, n, o) {
|
|
521
|
+
const i = e.resources.length, s = e.random ? Math.floor(Math.random() * i) : e.index;
|
|
522
522
|
let r;
|
|
523
|
-
if (
|
|
524
|
-
let b =
|
|
523
|
+
if (e.random) {
|
|
524
|
+
let b = e.resources.slice(0);
|
|
525
525
|
for (r = []; b.length > 1; ) {
|
|
526
526
|
const T = Math.floor(Math.random() * b.length);
|
|
527
527
|
r.push(b[T]), b = b.slice(0, T).concat(b.slice(T + 1));
|
|
528
528
|
}
|
|
529
529
|
r = r.concat(b);
|
|
530
|
-
} else r =
|
|
530
|
+
} else r = e.resources.slice(s).concat(e.resources.slice(0, s));
|
|
531
531
|
const c = Date.now();
|
|
532
532
|
let a = "pending", l = 0, f, u = null, p = [], d = [];
|
|
533
533
|
typeof o == "function" && d.push(o);
|
|
@@ -545,7 +545,7 @@ function zn(t, e, n, o) {
|
|
|
545
545
|
function y() {
|
|
546
546
|
return {
|
|
547
547
|
startTime: c,
|
|
548
|
-
payload:
|
|
548
|
+
payload: t,
|
|
549
549
|
status: a,
|
|
550
550
|
queriesSent: l,
|
|
551
551
|
queriesPending: p.length,
|
|
@@ -563,31 +563,31 @@ function zn(t, e, n, o) {
|
|
|
563
563
|
b.status === "pending" && (b.status = "aborted");
|
|
564
564
|
}), p = [];
|
|
565
565
|
}
|
|
566
|
-
function v(b, T,
|
|
566
|
+
function v(b, T, E) {
|
|
567
567
|
const A = T !== "success";
|
|
568
568
|
switch (p = p.filter((S) => S !== b), a) {
|
|
569
569
|
case "pending":
|
|
570
570
|
break;
|
|
571
571
|
case "failed":
|
|
572
|
-
if (A || !
|
|
572
|
+
if (A || !e.dataAfterTimeout) return;
|
|
573
573
|
break;
|
|
574
574
|
default:
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
577
|
if (T === "abort") {
|
|
578
|
-
f =
|
|
578
|
+
f = E, w();
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
581
|
if (A) {
|
|
582
|
-
f =
|
|
582
|
+
f = E, p.length || (r.length ? O() : w());
|
|
583
583
|
return;
|
|
584
584
|
}
|
|
585
|
-
if (h(), x(), !
|
|
586
|
-
const S =
|
|
587
|
-
S !== -1 && S !==
|
|
585
|
+
if (h(), x(), !e.random) {
|
|
586
|
+
const S = e.resources.indexOf(b.resource);
|
|
587
|
+
S !== -1 && S !== e.index && (e.index = S);
|
|
588
588
|
}
|
|
589
589
|
a = "completed", d.forEach((S) => {
|
|
590
|
-
S(
|
|
590
|
+
S(E);
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
593
|
function O() {
|
|
@@ -598,7 +598,7 @@ function zn(t, e, n, o) {
|
|
|
598
598
|
if (p.length) {
|
|
599
599
|
u = setTimeout(() => {
|
|
600
600
|
h(), a === "pending" && (x(), w());
|
|
601
|
-
},
|
|
601
|
+
}, e.timeout);
|
|
602
602
|
return;
|
|
603
603
|
}
|
|
604
604
|
w();
|
|
@@ -607,25 +607,25 @@ function zn(t, e, n, o) {
|
|
|
607
607
|
const T = {
|
|
608
608
|
status: "pending",
|
|
609
609
|
resource: b,
|
|
610
|
-
callback: (
|
|
611
|
-
v(T,
|
|
610
|
+
callback: (E, A) => {
|
|
611
|
+
v(T, E, A);
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
|
-
p.push(T), l++, u = setTimeout(O,
|
|
614
|
+
p.push(T), l++, u = setTimeout(O, e.rotate), n(b, t, T.callback);
|
|
615
615
|
}
|
|
616
616
|
return setTimeout(O), y;
|
|
617
617
|
}
|
|
618
|
-
function $e
|
|
619
|
-
const
|
|
620
|
-
...
|
|
621
|
-
...
|
|
618
|
+
function $t(e) {
|
|
619
|
+
const t = {
|
|
620
|
+
...jn,
|
|
621
|
+
...e
|
|
622
622
|
};
|
|
623
623
|
let n = [];
|
|
624
624
|
function o() {
|
|
625
625
|
n = n.filter((r) => r().status === "pending");
|
|
626
626
|
}
|
|
627
627
|
function i(r, c, a) {
|
|
628
|
-
const l =
|
|
628
|
+
const l = Bn(t, r, c, (f, u) => {
|
|
629
629
|
o(), a && a(f, u);
|
|
630
630
|
});
|
|
631
631
|
return n.push(l), l;
|
|
@@ -637,102 +637,102 @@ function $e(t) {
|
|
|
637
637
|
query: i,
|
|
638
638
|
find: s,
|
|
639
639
|
setIndex: (r) => {
|
|
640
|
-
|
|
640
|
+
t.index = r;
|
|
641
641
|
},
|
|
642
|
-
getIndex: () =>
|
|
642
|
+
getIndex: () => t.index,
|
|
643
643
|
cleanup: o
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function st() {
|
|
647
647
|
}
|
|
648
|
-
const
|
|
649
|
-
function
|
|
650
|
-
if (!
|
|
651
|
-
const
|
|
652
|
-
if (!
|
|
648
|
+
const Pe = /* @__PURE__ */ Object.create(null);
|
|
649
|
+
function zn(e) {
|
|
650
|
+
if (!Pe[e]) {
|
|
651
|
+
const t = qe(e);
|
|
652
|
+
if (!t) return;
|
|
653
653
|
const n = {
|
|
654
|
-
config:
|
|
655
|
-
redundancy: $
|
|
654
|
+
config: t,
|
|
655
|
+
redundancy: $t(t)
|
|
656
656
|
};
|
|
657
|
-
|
|
657
|
+
Pe[e] = n;
|
|
658
658
|
}
|
|
659
|
-
return
|
|
659
|
+
return Pe[e];
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function Wn(e, t, n) {
|
|
662
662
|
let o, i;
|
|
663
|
-
if (typeof
|
|
664
|
-
const s =
|
|
663
|
+
if (typeof e == "string") {
|
|
664
|
+
const s = Be(e);
|
|
665
665
|
if (!s)
|
|
666
|
-
return n(void 0, 424),
|
|
666
|
+
return n(void 0, 424), st;
|
|
667
667
|
i = s.send;
|
|
668
|
-
const r =
|
|
668
|
+
const r = zn(e);
|
|
669
669
|
r && (o = r.redundancy);
|
|
670
670
|
} else {
|
|
671
|
-
const s =
|
|
671
|
+
const s = He(e);
|
|
672
672
|
if (s) {
|
|
673
|
-
o = $
|
|
674
|
-
const r =
|
|
673
|
+
o = $t(s);
|
|
674
|
+
const r = e.resources ? e.resources[0] : "", c = Be(r);
|
|
675
675
|
c && (i = c.send);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
-
return !o || !i ? (n(void 0, 424),
|
|
678
|
+
return !o || !i ? (n(void 0, 424), st) : o.query(t, i, n)().abort;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function rt() {
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
|
|
684
|
-
|
|
682
|
+
function Vn(e) {
|
|
683
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
684
|
+
e.iconsLoaderFlag = !1, Fn(e);
|
|
685
685
|
}));
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
const
|
|
689
|
-
return
|
|
690
|
-
(o.match(
|
|
687
|
+
function Hn(e) {
|
|
688
|
+
const t = [], n = [];
|
|
689
|
+
return e.forEach((o) => {
|
|
690
|
+
(o.match(Rt) ? t : n).push(o);
|
|
691
691
|
}), {
|
|
692
|
-
valid:
|
|
692
|
+
valid: t,
|
|
693
693
|
invalid: n
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function oe(e, t, n) {
|
|
697
697
|
function o() {
|
|
698
|
-
const i =
|
|
699
|
-
|
|
700
|
-
i && i.delete(s),
|
|
698
|
+
const i = e.pendingIcons;
|
|
699
|
+
t.forEach((s) => {
|
|
700
|
+
i && i.delete(s), e.icons[s] || e.missing.add(s);
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
if (n && typeof n == "object") try {
|
|
704
|
-
if (!
|
|
704
|
+
if (!kt(e, n).length) {
|
|
705
705
|
o();
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
708
|
} catch (i) {
|
|
709
709
|
console.error(i);
|
|
710
710
|
}
|
|
711
|
-
o(),
|
|
711
|
+
o(), Vn(e);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
function ct(e, t) {
|
|
714
|
+
e instanceof Promise ? e.then((n) => {
|
|
715
|
+
t(n);
|
|
716
716
|
}).catch(() => {
|
|
717
|
-
|
|
718
|
-
}) : e
|
|
719
|
-
}
|
|
720
|
-
function
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
const { provider: n, prefix: o } =
|
|
724
|
-
if (delete
|
|
725
|
-
const s =
|
|
726
|
-
if (
|
|
727
|
-
|
|
728
|
-
|
|
717
|
+
t(null);
|
|
718
|
+
}) : t(e);
|
|
719
|
+
}
|
|
720
|
+
function Un(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: n, prefix: o } = e, i = e.iconsToLoad;
|
|
724
|
+
if (delete e.iconsToLoad, !i || !i.length) return;
|
|
725
|
+
const s = e.loadIcon;
|
|
726
|
+
if (e.loadIcons && (i.length > 1 || !s)) {
|
|
727
|
+
ct(e.loadIcons(i, o, n), (l) => {
|
|
728
|
+
oe(e, i, l);
|
|
729
729
|
});
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
732
|
if (s) {
|
|
733
733
|
i.forEach((l) => {
|
|
734
|
-
|
|
735
|
-
|
|
734
|
+
ct(s(l, o, n), (f) => {
|
|
735
|
+
oe(e, [l], f ? {
|
|
736
736
|
prefix: o,
|
|
737
737
|
icons: { [l]: f }
|
|
738
738
|
} : null);
|
|
@@ -740,26 +740,26 @@ function qn(t, e) {
|
|
|
740
740
|
});
|
|
741
741
|
return;
|
|
742
742
|
}
|
|
743
|
-
const { valid: r, invalid: c } =
|
|
744
|
-
if (c.length &&
|
|
745
|
-
const a = o.match(
|
|
743
|
+
const { valid: r, invalid: c } = Hn(i);
|
|
744
|
+
if (c.length && oe(e, c, null), !r.length) return;
|
|
745
|
+
const a = o.match(Rt) ? Be(n) : null;
|
|
746
746
|
if (!a) {
|
|
747
|
-
|
|
747
|
+
oe(e, r, null);
|
|
748
748
|
return;
|
|
749
749
|
}
|
|
750
750
|
a.prepare(n, o, r).forEach((l) => {
|
|
751
|
-
|
|
752
|
-
|
|
751
|
+
Wn(n, l, (f) => {
|
|
752
|
+
oe(e, l.icons, f);
|
|
753
753
|
});
|
|
754
754
|
});
|
|
755
755
|
}));
|
|
756
756
|
}
|
|
757
|
-
const
|
|
758
|
-
const n =
|
|
757
|
+
const qn = (e, t) => {
|
|
758
|
+
const n = _n(e, !0, Dt()), o = $n(n);
|
|
759
759
|
if (!o.pending.length) {
|
|
760
760
|
let a = !0;
|
|
761
|
-
return
|
|
762
|
-
a &&
|
|
761
|
+
return t && setTimeout(() => {
|
|
762
|
+
a && t(o.loaded, o.missing, o.pending, rt);
|
|
763
763
|
}), () => {
|
|
764
764
|
a = !1;
|
|
765
765
|
};
|
|
@@ -777,39 +777,39 @@ const Xn = (t, e) => {
|
|
|
777
777
|
d.has(u) || (d.add(u), i[l][f].push(u));
|
|
778
778
|
}), s.forEach((a) => {
|
|
779
779
|
const l = i[a.provider][a.prefix];
|
|
780
|
-
l.length &&
|
|
781
|
-
}),
|
|
780
|
+
l.length && Un(a, l);
|
|
781
|
+
}), t ? Nn(t, o, s) : rt;
|
|
782
782
|
};
|
|
783
|
-
function
|
|
784
|
-
const n = { ...
|
|
785
|
-
for (const o in
|
|
786
|
-
const i =
|
|
787
|
-
o in
|
|
783
|
+
function Xn(e, t) {
|
|
784
|
+
const n = { ...e };
|
|
785
|
+
for (const o in t) {
|
|
786
|
+
const i = t[o], s = typeof i;
|
|
787
|
+
o in Ft ? (i === null || i && (s === "string" || s === "number")) && (n[o] = i) : s === typeof n[o] && (n[o] = o === "rotate" ? i % 4 : i);
|
|
788
788
|
}
|
|
789
789
|
return n;
|
|
790
790
|
}
|
|
791
|
-
const
|
|
792
|
-
function
|
|
793
|
-
|
|
791
|
+
const Gn = /[\s,]+/;
|
|
792
|
+
function Qn(e, t) {
|
|
793
|
+
t.split(Gn).forEach((n) => {
|
|
794
794
|
switch (n.trim()) {
|
|
795
795
|
case "horizontal":
|
|
796
|
-
|
|
796
|
+
e.hFlip = !0;
|
|
797
797
|
break;
|
|
798
798
|
case "vertical":
|
|
799
|
-
|
|
799
|
+
e.vFlip = !0;
|
|
800
800
|
}
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
const n =
|
|
803
|
+
function Kn(e, t = 0) {
|
|
804
|
+
const n = e.replace(/^-?[0-9.]*/, "");
|
|
805
805
|
function o(i) {
|
|
806
806
|
for (; i < 0; ) i += 4;
|
|
807
807
|
return i % 4;
|
|
808
808
|
}
|
|
809
809
|
if (n === "") {
|
|
810
|
-
const i = parseInt(
|
|
810
|
+
const i = parseInt(e);
|
|
811
811
|
return isNaN(i) ? 0 : o(i);
|
|
812
|
-
} else if (n !==
|
|
812
|
+
} else if (n !== e) {
|
|
813
813
|
let i = 0;
|
|
814
814
|
switch (n) {
|
|
815
815
|
case "%":
|
|
@@ -819,66 +819,66 @@ function Yn(t, e = 0) {
|
|
|
819
819
|
i = 90;
|
|
820
820
|
}
|
|
821
821
|
if (i) {
|
|
822
|
-
let s = parseFloat(
|
|
822
|
+
let s = parseFloat(e.slice(0, e.length - n.length));
|
|
823
823
|
return isNaN(s) ? 0 : (s = s / i, s % 1 === 0 ? o(s) : 0);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
|
-
return
|
|
826
|
+
return t;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
829
|
-
let n =
|
|
830
|
-
for (const o in
|
|
831
|
-
return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" +
|
|
828
|
+
function Yn(e, t) {
|
|
829
|
+
let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
830
|
+
for (const o in t) n += " " + o + '="' + t[o] + '"';
|
|
831
|
+
return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
833
|
+
function Zn(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
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return "data:image/svg+xml," +
|
|
836
|
+
function Jn(e) {
|
|
837
|
+
return "data:image/svg+xml," + Zn(e);
|
|
838
838
|
}
|
|
839
|
-
function eo(
|
|
840
|
-
return 'url("' +
|
|
839
|
+
function eo(e) {
|
|
840
|
+
return 'url("' + Jn(e) + '")';
|
|
841
841
|
}
|
|
842
|
-
const
|
|
843
|
-
...
|
|
842
|
+
const lt = {
|
|
843
|
+
...Mt,
|
|
844
844
|
inline: !1
|
|
845
|
-
},
|
|
845
|
+
}, to = {
|
|
846
846
|
xmlns: "http://www.w3.org/2000/svg",
|
|
847
847
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
848
848
|
"aria-hidden": !0,
|
|
849
849
|
role: "img"
|
|
850
|
-
},
|
|
850
|
+
}, no = {
|
|
851
851
|
display: "inline-block"
|
|
852
|
-
},
|
|
852
|
+
}, ze = {
|
|
853
853
|
backgroundColor: "currentColor"
|
|
854
|
-
},
|
|
854
|
+
}, _t = {
|
|
855
855
|
backgroundColor: "transparent"
|
|
856
|
-
},
|
|
856
|
+
}, at = {
|
|
857
857
|
Image: "var(--svg)",
|
|
858
858
|
Repeat: "no-repeat",
|
|
859
859
|
Size: "100% 100%"
|
|
860
|
-
},
|
|
861
|
-
webkitMask:
|
|
862
|
-
mask:
|
|
863
|
-
background:
|
|
860
|
+
}, ft = {
|
|
861
|
+
webkitMask: ze,
|
|
862
|
+
mask: ze,
|
|
863
|
+
background: _t
|
|
864
864
|
};
|
|
865
|
-
for (const
|
|
866
|
-
const
|
|
867
|
-
for (const n in
|
|
868
|
-
e
|
|
869
|
-
}
|
|
870
|
-
const
|
|
871
|
-
["horizontal", "vertical"].forEach((
|
|
872
|
-
const
|
|
873
|
-
|
|
865
|
+
for (const e in ft) {
|
|
866
|
+
const t = ft[e];
|
|
867
|
+
for (const n in at)
|
|
868
|
+
t[e + n] = at[n];
|
|
869
|
+
}
|
|
870
|
+
const he = {};
|
|
871
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
872
|
+
const t = e.slice(0, 1) + "Flip";
|
|
873
|
+
he[e + "-flip"] = t, he[e.slice(0, 1) + "-flip"] = t, he[e + "Flip"] = t;
|
|
874
874
|
});
|
|
875
|
-
function
|
|
876
|
-
return
|
|
875
|
+
function ut(e) {
|
|
876
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
877
877
|
}
|
|
878
|
-
const
|
|
879
|
-
const n =
|
|
880
|
-
for (let m in
|
|
881
|
-
const g =
|
|
878
|
+
const dt = (e, t) => {
|
|
879
|
+
const n = Xn(lt, t), o = { ...to }, i = t.mode || "svg", s = {}, r = t.style, c = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
880
|
+
for (let m in t) {
|
|
881
|
+
const g = t[m];
|
|
882
882
|
if (g !== void 0)
|
|
883
883
|
switch (m) {
|
|
884
884
|
// Properties to ignore
|
|
@@ -905,7 +905,7 @@ const de = (t, e) => {
|
|
|
905
905
|
break;
|
|
906
906
|
// Rotation as string
|
|
907
907
|
case "rotate":
|
|
908
|
-
typeof g == "string" ? n[m] =
|
|
908
|
+
typeof g == "string" ? n[m] = Kn(g) : typeof g == "number" && (n[m] = g);
|
|
909
909
|
break;
|
|
910
910
|
// Remove aria-hidden
|
|
911
911
|
case "ariaHidden":
|
|
@@ -913,19 +913,19 @@ const de = (t, e) => {
|
|
|
913
913
|
g !== !0 && g !== "true" && delete o["aria-hidden"];
|
|
914
914
|
break;
|
|
915
915
|
default: {
|
|
916
|
-
const y =
|
|
917
|
-
y ? (g === !0 || g === "true" || g === 1) && (n[y] = !0) :
|
|
916
|
+
const y = he[m];
|
|
917
|
+
y ? (g === !0 || g === "true" || g === 1) && (n[y] = !0) : lt[m] === void 0 && (o[m] = g);
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
typeof
|
|
922
|
-
const a =
|
|
921
|
+
typeof t.flip == "string" && Qn(n, t.flip);
|
|
922
|
+
const a = vn(e, n), l = a.attributes;
|
|
923
923
|
if (n.inline && (s.verticalAlign = "-0.125em"), i === "svg")
|
|
924
924
|
return o.style = {
|
|
925
925
|
...s,
|
|
926
926
|
...c
|
|
927
|
-
}, Object.assign(o, l), o.innerHTML =
|
|
928
|
-
const { body: f, width: u, height: p } =
|
|
927
|
+
}, Object.assign(o, l), o.innerHTML = On(a.body), Ze("svg", o);
|
|
928
|
+
const { body: f, width: u, height: p } = e, d = i === "mask" || (i === "bg" ? !1 : f.indexOf("currentColor") !== -1), h = Yn(f, {
|
|
929
929
|
...l,
|
|
930
930
|
width: u + "",
|
|
931
931
|
height: p + ""
|
|
@@ -933,78 +933,78 @@ const de = (t, e) => {
|
|
|
933
933
|
return o.style = {
|
|
934
934
|
...s,
|
|
935
935
|
"--svg": eo(h),
|
|
936
|
-
width:
|
|
937
|
-
height:
|
|
938
|
-
...
|
|
939
|
-
...d ?
|
|
936
|
+
width: ut(l.width),
|
|
937
|
+
height: ut(l.height),
|
|
938
|
+
...no,
|
|
939
|
+
...d ? ze : _t,
|
|
940
940
|
...c
|
|
941
|
-
},
|
|
941
|
+
}, Ze("span", o);
|
|
942
942
|
};
|
|
943
|
-
|
|
944
|
-
|
|
943
|
+
Dt(!0);
|
|
944
|
+
An("", Dn);
|
|
945
945
|
if (typeof document < "u" && typeof window < "u") {
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
948
|
-
const
|
|
949
|
-
typeof
|
|
946
|
+
const e = window;
|
|
947
|
+
if (e.IconifyPreload !== void 0) {
|
|
948
|
+
const t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
949
|
+
typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((o) => {
|
|
950
950
|
try {
|
|
951
951
|
// Check if item is an object and not null/array
|
|
952
952
|
(typeof o != "object" || o === null || o instanceof Array || // Check for 'icons' and 'prefix'
|
|
953
953
|
typeof o.icons != "object" || typeof o.prefix != "string" || // Add icon set
|
|
954
|
-
!
|
|
954
|
+
!hn(o)) && console.error(n);
|
|
955
955
|
} catch {
|
|
956
956
|
console.error(n);
|
|
957
957
|
}
|
|
958
958
|
});
|
|
959
959
|
}
|
|
960
|
-
if (
|
|
961
|
-
const
|
|
962
|
-
if (typeof
|
|
963
|
-
for (let n in
|
|
960
|
+
if (e.IconifyProviders !== void 0) {
|
|
961
|
+
const t = e.IconifyProviders;
|
|
962
|
+
if (typeof t == "object" && t !== null)
|
|
963
|
+
for (let n in t) {
|
|
964
964
|
const o = "IconifyProviders[" + n + "] is invalid.";
|
|
965
965
|
try {
|
|
966
|
-
const i =
|
|
966
|
+
const i = t[n];
|
|
967
967
|
if (typeof i != "object" || !i || i.resources === void 0)
|
|
968
968
|
continue;
|
|
969
|
-
|
|
969
|
+
En(n, i) || console.error(o);
|
|
970
970
|
} catch {
|
|
971
971
|
console.error(o);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
const
|
|
977
|
-
...
|
|
976
|
+
const oo = {
|
|
977
|
+
...Oe,
|
|
978
978
|
body: ""
|
|
979
|
-
},
|
|
979
|
+
}, io = ce((e, { emit: t }) => {
|
|
980
980
|
const n = B(null);
|
|
981
981
|
function o() {
|
|
982
982
|
n.value && (n.value.abort?.(), n.value = null);
|
|
983
983
|
}
|
|
984
|
-
const i = B(!!
|
|
984
|
+
const i = B(!!e.ssr), s = B(""), r = Zt(null);
|
|
985
985
|
function c() {
|
|
986
|
-
const l =
|
|
986
|
+
const l = e.icon;
|
|
987
987
|
if (typeof l == "object" && l !== null && typeof l.body == "string")
|
|
988
988
|
return s.value = "", {
|
|
989
989
|
data: l
|
|
990
990
|
};
|
|
991
991
|
let f;
|
|
992
|
-
if (typeof l != "string" || (f =
|
|
992
|
+
if (typeof l != "string" || (f = Te(l, !1, !0)) === null)
|
|
993
993
|
return null;
|
|
994
|
-
let u =
|
|
994
|
+
let u = dn(f);
|
|
995
995
|
if (!u) {
|
|
996
996
|
const h = n.value;
|
|
997
997
|
return (!h || h.name !== l) && (u === null ? n.value = {
|
|
998
998
|
name: l
|
|
999
999
|
} : n.value = {
|
|
1000
1000
|
name: l,
|
|
1001
|
-
abort:
|
|
1001
|
+
abort: qn([f], a)
|
|
1002
1002
|
}), null;
|
|
1003
1003
|
}
|
|
1004
|
-
o(), s.value !== l && (s.value = l,
|
|
1005
|
-
|
|
1004
|
+
o(), s.value !== l && (s.value = l, tn(() => {
|
|
1005
|
+
t("load", l);
|
|
1006
1006
|
}));
|
|
1007
|
-
const p =
|
|
1007
|
+
const p = e.customise;
|
|
1008
1008
|
if (p) {
|
|
1009
1009
|
u = Object.assign({}, u);
|
|
1010
1010
|
const h = p(u.body, f.name, f.prefix, f.provider);
|
|
@@ -1017,18 +1017,18 @@ const io = {
|
|
|
1017
1017
|
const l = c();
|
|
1018
1018
|
l ? l.data !== r.value?.data && (r.value = l) : r.value = null;
|
|
1019
1019
|
}
|
|
1020
|
-
return i.value ? a() :
|
|
1020
|
+
return i.value ? a() : Jt(() => {
|
|
1021
1021
|
i.value = !0, a();
|
|
1022
|
-
}),
|
|
1022
|
+
}), vt(() => e.icon, a), en(o), () => {
|
|
1023
1023
|
const l = r.value;
|
|
1024
1024
|
if (!l)
|
|
1025
|
-
return
|
|
1026
|
-
let f =
|
|
1025
|
+
return dt(oo, e);
|
|
1026
|
+
let f = e;
|
|
1027
1027
|
return l.classes && (f = {
|
|
1028
|
-
...
|
|
1028
|
+
...e,
|
|
1029
1029
|
class: l.classes.join(" ")
|
|
1030
|
-
}),
|
|
1031
|
-
...
|
|
1030
|
+
}), dt({
|
|
1031
|
+
...Oe,
|
|
1032
1032
|
...l.data
|
|
1033
1033
|
}, f);
|
|
1034
1034
|
};
|
|
@@ -1058,119 +1058,119 @@ const io = {
|
|
|
1058
1058
|
title: { type: String }
|
|
1059
1059
|
},
|
|
1060
1060
|
emits: ["load"]
|
|
1061
|
-
}),
|
|
1061
|
+
}), jt = {
|
|
1062
1062
|
default: 1e3,
|
|
1063
1063
|
tooltip: 5e3
|
|
1064
|
-
}, Y = Math.min, q = Math.max,
|
|
1065
|
-
x:
|
|
1066
|
-
y:
|
|
1067
|
-
}),
|
|
1064
|
+
}, Y = Math.min, q = Math.max, xe = Math.round, fe = Math.floor, N = (e) => ({
|
|
1065
|
+
x: e,
|
|
1066
|
+
y: e
|
|
1067
|
+
}), so = {
|
|
1068
1068
|
left: "right",
|
|
1069
1069
|
right: "left",
|
|
1070
1070
|
bottom: "top",
|
|
1071
1071
|
top: "bottom"
|
|
1072
1072
|
};
|
|
1073
|
-
function
|
|
1074
|
-
return q(
|
|
1073
|
+
function Bt(e, t, n) {
|
|
1074
|
+
return q(e, Y(t, n));
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return typeof
|
|
1076
|
+
function le(e, t) {
|
|
1077
|
+
return typeof e == "function" ? e(t) : e;
|
|
1078
1078
|
}
|
|
1079
|
-
function Z(
|
|
1080
|
-
return
|
|
1079
|
+
function Z(e) {
|
|
1080
|
+
return e.split("-")[0];
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return
|
|
1082
|
+
function ae(e) {
|
|
1083
|
+
return e.split("-")[1];
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1085
|
+
function zt(e) {
|
|
1086
|
+
return e === "x" ? "y" : "x";
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
return
|
|
1088
|
+
function Xe(e) {
|
|
1089
|
+
return e === "y" ? "height" : "width";
|
|
1090
1090
|
}
|
|
1091
|
-
function j(
|
|
1092
|
-
const
|
|
1093
|
-
return
|
|
1091
|
+
function j(e) {
|
|
1092
|
+
const t = e[0];
|
|
1093
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return
|
|
1095
|
+
function Ge(e) {
|
|
1096
|
+
return zt(j(e));
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function ro(e, t, n) {
|
|
1099
1099
|
n === void 0 && (n = !1);
|
|
1100
|
-
const o =
|
|
1100
|
+
const o = ae(e), i = Ge(e), s = Xe(i);
|
|
1101
1101
|
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
1102
|
-
return
|
|
1102
|
+
return t.reference[s] > t.floating[s] && (r = ve(r)), [r, ve(r)];
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
const
|
|
1106
|
-
return [
|
|
1104
|
+
function co(e) {
|
|
1105
|
+
const t = ve(e);
|
|
1106
|
+
return [We(e), t, We(t)];
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1109
|
-
return
|
|
1108
|
+
function We(e) {
|
|
1109
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
1110
1110
|
}
|
|
1111
|
-
const
|
|
1112
|
-
function
|
|
1113
|
-
switch (
|
|
1111
|
+
const pt = ["left", "right"], ht = ["right", "left"], lo = ["top", "bottom"], ao = ["bottom", "top"];
|
|
1112
|
+
function fo(e, t, n) {
|
|
1113
|
+
switch (e) {
|
|
1114
1114
|
case "top":
|
|
1115
1115
|
case "bottom":
|
|
1116
|
-
return n ?
|
|
1116
|
+
return n ? t ? ht : pt : t ? pt : ht;
|
|
1117
1117
|
case "left":
|
|
1118
1118
|
case "right":
|
|
1119
|
-
return
|
|
1119
|
+
return t ? lo : ao;
|
|
1120
1120
|
default:
|
|
1121
1121
|
return [];
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1125
|
-
const i =
|
|
1126
|
-
let s =
|
|
1127
|
-
return i && (s = s.map((r) => r + "-" + i),
|
|
1124
|
+
function uo(e, t, n, o) {
|
|
1125
|
+
const i = ae(e);
|
|
1126
|
+
let s = fo(Z(e), n === "start", o);
|
|
1127
|
+
return i && (s = s.map((r) => r + "-" + i), t && (s = s.concat(s.map(We)))), s;
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1130
|
-
const
|
|
1131
|
-
return
|
|
1129
|
+
function ve(e) {
|
|
1130
|
+
const t = Z(e);
|
|
1131
|
+
return so[t] + e.slice(t.length);
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1134
|
-
var
|
|
1133
|
+
function po(e) {
|
|
1134
|
+
var t, n, o, i;
|
|
1135
1135
|
return {
|
|
1136
|
-
top: (
|
|
1137
|
-
right: (n =
|
|
1138
|
-
bottom: (o =
|
|
1139
|
-
left: (i =
|
|
1136
|
+
top: (t = e.top) != null ? t : 0,
|
|
1137
|
+
right: (n = e.right) != null ? n : 0,
|
|
1138
|
+
bottom: (o = e.bottom) != null ? o : 0,
|
|
1139
|
+
left: (i = e.left) != null ? i : 0
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return typeof
|
|
1144
|
-
top:
|
|
1145
|
-
right:
|
|
1146
|
-
bottom:
|
|
1147
|
-
left:
|
|
1142
|
+
function Wt(e) {
|
|
1143
|
+
return typeof e != "number" ? po(e) : {
|
|
1144
|
+
top: e,
|
|
1145
|
+
right: e,
|
|
1146
|
+
bottom: e,
|
|
1147
|
+
left: e
|
|
1148
1148
|
};
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Se(e) {
|
|
1151
1151
|
const {
|
|
1152
|
-
x:
|
|
1152
|
+
x: t,
|
|
1153
1153
|
y: n,
|
|
1154
1154
|
width: o,
|
|
1155
1155
|
height: i
|
|
1156
|
-
} =
|
|
1156
|
+
} = e;
|
|
1157
1157
|
return {
|
|
1158
1158
|
width: o,
|
|
1159
1159
|
height: i,
|
|
1160
1160
|
top: n,
|
|
1161
|
-
left:
|
|
1162
|
-
right:
|
|
1161
|
+
left: t,
|
|
1162
|
+
right: t + o,
|
|
1163
1163
|
bottom: n + i,
|
|
1164
|
-
x:
|
|
1164
|
+
x: t,
|
|
1165
1165
|
y: n
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function gt(e, t, n) {
|
|
1169
1169
|
let {
|
|
1170
1170
|
reference: o,
|
|
1171
1171
|
floating: i
|
|
1172
|
-
} =
|
|
1173
|
-
const s = j(
|
|
1172
|
+
} = e;
|
|
1173
|
+
const s = j(t), r = Ge(t), c = Xe(r), a = Z(t), l = s === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, p = o[c] / 2 - i[c] / 2;
|
|
1174
1174
|
let d;
|
|
1175
1175
|
switch (a) {
|
|
1176
1176
|
case "top":
|
|
@@ -1203,12 +1203,12 @@ function ge(t, e, n) {
|
|
|
1203
1203
|
y: o.y
|
|
1204
1204
|
};
|
|
1205
1205
|
}
|
|
1206
|
-
const h =
|
|
1206
|
+
const h = ae(t);
|
|
1207
1207
|
return h && (d[r] += p * (h === "end" ? 1 : -1) * (n && l ? -1 : 1)), d;
|
|
1208
1208
|
}
|
|
1209
|
-
async function
|
|
1209
|
+
async function ho(e, t) {
|
|
1210
1210
|
var n;
|
|
1211
|
-
|
|
1211
|
+
t === void 0 && (t = {});
|
|
1212
1212
|
const {
|
|
1213
1213
|
x: o,
|
|
1214
1214
|
y: i,
|
|
@@ -1216,13 +1216,13 @@ async function go(t, e) {
|
|
|
1216
1216
|
rects: r,
|
|
1217
1217
|
elements: c,
|
|
1218
1218
|
strategy: a
|
|
1219
|
-
} =
|
|
1219
|
+
} = e, {
|
|
1220
1220
|
boundary: l = "clippingAncestors",
|
|
1221
1221
|
rootBoundary: f = "viewport",
|
|
1222
1222
|
elementContext: u = "floating",
|
|
1223
1223
|
altBoundary: p = !1,
|
|
1224
1224
|
padding: d = 0
|
|
1225
|
-
} =
|
|
1225
|
+
} = le(t, e), h = Wt(d), g = c[p ? u === "floating" ? "reference" : "floating" : u], y = Se(await s.getClippingRect({
|
|
1226
1226
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
1227
1227
|
boundary: l,
|
|
1228
1228
|
rootBoundary: f,
|
|
@@ -1235,7 +1235,7 @@ async function go(t, e) {
|
|
|
1235
1235
|
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), v = await (s.isElement == null ? void 0 : s.isElement(x)) && await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
1236
1236
|
x: 1,
|
|
1237
1237
|
y: 1
|
|
1238
|
-
}, O =
|
|
1238
|
+
}, O = Se(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1239
1239
|
elements: c,
|
|
1240
1240
|
rect: w,
|
|
1241
1241
|
offsetParent: x,
|
|
@@ -1248,7 +1248,7 @@ async function go(t, e) {
|
|
|
1248
1248
|
right: (O.right - y.right + h.right) / v.x
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
const
|
|
1251
|
+
const go = 50, mo = async (e, t, n) => {
|
|
1252
1252
|
const {
|
|
1253
1253
|
placement: o = "bottom",
|
|
1254
1254
|
strategy: i = "absolute",
|
|
@@ -1256,16 +1256,16 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1256
1256
|
platform: r
|
|
1257
1257
|
} = n, c = r.detectOverflow ? r : {
|
|
1258
1258
|
...r,
|
|
1259
|
-
detectOverflow:
|
|
1260
|
-
}, a = await (r.isRTL == null ? void 0 : r.isRTL(
|
|
1259
|
+
detectOverflow: ho
|
|
1260
|
+
}, a = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
1261
1261
|
let l = await r.getElementRects({
|
|
1262
|
-
reference:
|
|
1263
|
-
floating:
|
|
1262
|
+
reference: e,
|
|
1263
|
+
floating: t,
|
|
1264
1264
|
strategy: i
|
|
1265
1265
|
}), {
|
|
1266
1266
|
x: f,
|
|
1267
1267
|
y: u
|
|
1268
|
-
} =
|
|
1268
|
+
} = gt(l, o, a), p = o, d = 0;
|
|
1269
1269
|
const h = {};
|
|
1270
1270
|
for (let m = 0; m < s.length; m++) {
|
|
1271
1271
|
const g = s[m];
|
|
@@ -1289,21 +1289,21 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1289
1289
|
rects: l,
|
|
1290
1290
|
platform: c,
|
|
1291
1291
|
elements: {
|
|
1292
|
-
reference:
|
|
1293
|
-
floating:
|
|
1292
|
+
reference: e,
|
|
1293
|
+
floating: t
|
|
1294
1294
|
}
|
|
1295
1295
|
});
|
|
1296
1296
|
f = x ?? f, u = v ?? u, h[y] = {
|
|
1297
1297
|
...h[y],
|
|
1298
1298
|
...O
|
|
1299
|
-
}, b && d <
|
|
1300
|
-
reference:
|
|
1301
|
-
floating:
|
|
1299
|
+
}, b && d < go && (d++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (l = b.rects === !0 ? await r.getElementRects({
|
|
1300
|
+
reference: e,
|
|
1301
|
+
floating: t,
|
|
1302
1302
|
strategy: i
|
|
1303
1303
|
}) : b.rects), {
|
|
1304
1304
|
x: f,
|
|
1305
1305
|
y: u
|
|
1306
|
-
} =
|
|
1306
|
+
} = gt(l, p, a)), m = -1);
|
|
1307
1307
|
}
|
|
1308
1308
|
return {
|
|
1309
1309
|
x: f,
|
|
@@ -1312,10 +1312,10 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1312
1312
|
strategy: i,
|
|
1313
1313
|
middlewareData: h
|
|
1314
1314
|
};
|
|
1315
|
-
},
|
|
1315
|
+
}, yo = (e) => ({
|
|
1316
1316
|
name: "arrow",
|
|
1317
|
-
options:
|
|
1318
|
-
async fn(
|
|
1317
|
+
options: e,
|
|
1318
|
+
async fn(t) {
|
|
1319
1319
|
const {
|
|
1320
1320
|
x: n,
|
|
1321
1321
|
y: o,
|
|
@@ -1324,24 +1324,24 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1324
1324
|
platform: r,
|
|
1325
1325
|
elements: c,
|
|
1326
1326
|
middlewareData: a
|
|
1327
|
-
} =
|
|
1327
|
+
} = t, {
|
|
1328
1328
|
element: l,
|
|
1329
1329
|
padding: f = 0
|
|
1330
|
-
} =
|
|
1330
|
+
} = le(e, t) || {};
|
|
1331
1331
|
if (l == null)
|
|
1332
1332
|
return {};
|
|
1333
|
-
const u =
|
|
1333
|
+
const u = Wt(f), p = {
|
|
1334
1334
|
x: n,
|
|
1335
1335
|
y: o
|
|
1336
|
-
}, d =
|
|
1336
|
+
}, d = Ge(i), h = Xe(d), m = await r.getDimensions(l), g = d === "y", y = g ? "top" : "left", w = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", v = s.reference[h] + s.reference[d] - p[d] - s.floating[h], O = p[d] - s.reference[d], b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
|
|
1337
1337
|
let T = b ? b[x] : 0;
|
|
1338
1338
|
(!T || !await (r.isElement == null ? void 0 : r.isElement(b))) && (T = c.floating[x] || s.floating[h]);
|
|
1339
|
-
const
|
|
1339
|
+
const E = v / 2 - O / 2, A = T / 2 - m[h] / 2 - 1, S = Y(u[y], A), ee = Y(u[w], A), te = T - m[h] - ee, P = T / 2 - m[h] / 2 + E, L = Bt(S, P, te), V = !a.arrow && ae(i) != null && P !== L && s.reference[h] / 2 - (P < S ? S : ee) - m[h] / 2 < 0, M = V ? P < S ? P - S : P - te : 0;
|
|
1340
1340
|
return {
|
|
1341
1341
|
[d]: p[d] + M,
|
|
1342
1342
|
data: {
|
|
1343
|
-
[d]:
|
|
1344
|
-
centerOffset: P -
|
|
1343
|
+
[d]: L,
|
|
1344
|
+
centerOffset: P - L - M,
|
|
1345
1345
|
...V && {
|
|
1346
1346
|
alignmentOffset: M
|
|
1347
1347
|
}
|
|
@@ -1349,11 +1349,11 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1349
1349
|
reset: V
|
|
1350
1350
|
};
|
|
1351
1351
|
}
|
|
1352
|
-
}),
|
|
1353
|
-
return
|
|
1352
|
+
}), bo = function(e) {
|
|
1353
|
+
return e === void 0 && (e = {}), {
|
|
1354
1354
|
name: "flip",
|
|
1355
|
-
options:
|
|
1356
|
-
async fn(
|
|
1355
|
+
options: e,
|
|
1356
|
+
async fn(t) {
|
|
1357
1357
|
var n, o;
|
|
1358
1358
|
const {
|
|
1359
1359
|
placement: i,
|
|
@@ -1362,7 +1362,7 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1362
1362
|
initialPlacement: c,
|
|
1363
1363
|
platform: a,
|
|
1364
1364
|
elements: l
|
|
1365
|
-
} =
|
|
1365
|
+
} = t, {
|
|
1366
1366
|
mainAxis: f = !0,
|
|
1367
1367
|
crossAxis: u = !0,
|
|
1368
1368
|
fallbackPlacements: p,
|
|
@@ -1370,49 +1370,49 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1370
1370
|
fallbackAxisSideDirection: h = "none",
|
|
1371
1371
|
flipAlignment: m = !0,
|
|
1372
1372
|
...g
|
|
1373
|
-
} =
|
|
1373
|
+
} = le(e, t);
|
|
1374
1374
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
1375
1375
|
return {};
|
|
1376
|
-
const y = Z(i), w = j(c), x = Z(c) === c, v = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), O = p || (x || !m ? [
|
|
1377
|
-
!p && b && O.push(...
|
|
1378
|
-
const T = [c, ...O],
|
|
1376
|
+
const y = Z(i), w = j(c), x = Z(c) === c, v = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), O = p || (x || !m ? [ve(c)] : co(c)), b = h !== "none";
|
|
1377
|
+
!p && b && O.push(...uo(c, m, h, v));
|
|
1378
|
+
const T = [c, ...O], E = await a.detectOverflow(t, g), A = [];
|
|
1379
1379
|
let S = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
1380
|
-
if (f && A.push(
|
|
1381
|
-
const
|
|
1382
|
-
A.push(
|
|
1380
|
+
if (f && A.push(E[y]), u) {
|
|
1381
|
+
const L = ro(i, r, v);
|
|
1382
|
+
A.push(E[L[0]], E[L[1]]);
|
|
1383
1383
|
}
|
|
1384
1384
|
if (S = [...S, {
|
|
1385
1385
|
placement: i,
|
|
1386
1386
|
overflows: A
|
|
1387
|
-
}], !A.every((
|
|
1388
|
-
var
|
|
1389
|
-
const
|
|
1387
|
+
}], !A.every((L) => L <= 0)) {
|
|
1388
|
+
var ee, te;
|
|
1389
|
+
const L = (((ee = s.flip) == null ? void 0 : ee.index) || 0) + 1, V = T[L];
|
|
1390
1390
|
if (V && (!(u === "alignment" ? w !== j(V) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1391
1391
|
// overflows the main axis.
|
|
1392
|
-
S.every((
|
|
1392
|
+
S.every((C) => j(C.placement) === w ? C.overflows[0] > 0 : !0)))
|
|
1393
1393
|
return {
|
|
1394
1394
|
data: {
|
|
1395
|
-
index:
|
|
1395
|
+
index: L,
|
|
1396
1396
|
overflows: S
|
|
1397
1397
|
},
|
|
1398
1398
|
reset: {
|
|
1399
1399
|
placement: V
|
|
1400
1400
|
}
|
|
1401
1401
|
};
|
|
1402
|
-
let M = (
|
|
1402
|
+
let M = (te = S.filter((H) => H.overflows[0] <= 0).sort((H, C) => H.overflows[1] - C.overflows[1])[0]) == null ? void 0 : te.placement;
|
|
1403
1403
|
if (!M)
|
|
1404
1404
|
switch (d) {
|
|
1405
1405
|
case "bestFit": {
|
|
1406
1406
|
var P;
|
|
1407
|
-
const H = (P = S.filter((
|
|
1407
|
+
const H = (P = S.filter((C) => {
|
|
1408
1408
|
if (b) {
|
|
1409
|
-
const _ = j(
|
|
1409
|
+
const _ = j(C.placement);
|
|
1410
1410
|
return _ === w || // Create a bias to the `y` side axis due to horizontal
|
|
1411
1411
|
// reading directions favoring greater width.
|
|
1412
1412
|
_ === "y";
|
|
1413
1413
|
}
|
|
1414
1414
|
return !0;
|
|
1415
|
-
}).map((
|
|
1415
|
+
}).map((C) => [C.placement, C.overflows.filter((_) => _ > 0).reduce((_, Yt) => _ + Yt, 0)]).sort((C, _) => C[1] - _[1])[0]) == null ? void 0 : P[0];
|
|
1416
1416
|
H && (M = H);
|
|
1417
1417
|
break;
|
|
1418
1418
|
}
|
|
@@ -1430,13 +1430,13 @@ const mo = 50, yo = async (t, e, n) => {
|
|
|
1430
1430
|
return {};
|
|
1431
1431
|
}
|
|
1432
1432
|
};
|
|
1433
|
-
},
|
|
1434
|
-
async function
|
|
1433
|
+
}, wo = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1434
|
+
async function xo(e, t) {
|
|
1435
1435
|
const {
|
|
1436
1436
|
placement: n,
|
|
1437
1437
|
platform: o,
|
|
1438
1438
|
elements: i
|
|
1439
|
-
} =
|
|
1439
|
+
} = e, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = Z(n), c = ae(n), a = j(n) === "y", l = wo.has(r) ? -1 : 1, f = s && a ? -1 : 1, u = le(t, e);
|
|
1440
1440
|
let {
|
|
1441
1441
|
mainAxis: p,
|
|
1442
1442
|
crossAxis: d,
|
|
@@ -1458,18 +1458,18 @@ async function vo(t, e) {
|
|
|
1458
1458
|
y: d * f
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1462
|
-
return
|
|
1461
|
+
const vo = function(e) {
|
|
1462
|
+
return e === void 0 && (e = 0), {
|
|
1463
1463
|
name: "offset",
|
|
1464
|
-
options:
|
|
1465
|
-
async fn(
|
|
1464
|
+
options: e,
|
|
1465
|
+
async fn(t) {
|
|
1466
1466
|
var n, o;
|
|
1467
1467
|
const {
|
|
1468
1468
|
x: i,
|
|
1469
1469
|
y: s,
|
|
1470
1470
|
placement: r,
|
|
1471
1471
|
middlewareData: c
|
|
1472
|
-
} =
|
|
1472
|
+
} = t, a = await xo(t, e);
|
|
1473
1473
|
return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
1474
1474
|
x: i + a.x,
|
|
1475
1475
|
y: s + a.y,
|
|
@@ -1480,17 +1480,17 @@ const So = function(t) {
|
|
|
1480
1480
|
};
|
|
1481
1481
|
}
|
|
1482
1482
|
};
|
|
1483
|
-
},
|
|
1484
|
-
return
|
|
1483
|
+
}, So = function(e) {
|
|
1484
|
+
return e === void 0 && (e = {}), {
|
|
1485
1485
|
name: "shift",
|
|
1486
|
-
options:
|
|
1487
|
-
async fn(
|
|
1486
|
+
options: e,
|
|
1487
|
+
async fn(t) {
|
|
1488
1488
|
const {
|
|
1489
1489
|
x: n,
|
|
1490
1490
|
y: o,
|
|
1491
1491
|
placement: i,
|
|
1492
1492
|
platform: s
|
|
1493
|
-
} =
|
|
1493
|
+
} = t, {
|
|
1494
1494
|
mainAxis: r = !0,
|
|
1495
1495
|
crossAxis: c = !1,
|
|
1496
1496
|
limiter: a = {
|
|
@@ -1506,15 +1506,15 @@ const So = function(t) {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
},
|
|
1508
1508
|
...l
|
|
1509
|
-
} =
|
|
1509
|
+
} = le(e, t), f = {
|
|
1510
1510
|
x: n,
|
|
1511
1511
|
y: o
|
|
1512
|
-
}, u = await s.detectOverflow(
|
|
1512
|
+
}, u = await s.detectOverflow(t, l), p = j(i), d = zt(p);
|
|
1513
1513
|
let h = f[d], m = f[p];
|
|
1514
|
-
const g = (w, x) =>
|
|
1514
|
+
const g = (w, x) => Bt(x + u[w === "y" ? "top" : "left"], x, x - u[w === "y" ? "bottom" : "right"]);
|
|
1515
1515
|
r && (h = g(d, h)), c && (m = g(p, m));
|
|
1516
1516
|
const y = a.fn({
|
|
1517
|
-
...
|
|
1517
|
+
...t,
|
|
1518
1518
|
[d]: h,
|
|
1519
1519
|
[p]: m
|
|
1520
1520
|
});
|
|
@@ -1532,200 +1532,200 @@ const So = function(t) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
};
|
|
1534
1534
|
};
|
|
1535
|
-
function
|
|
1535
|
+
function Ae() {
|
|
1536
1536
|
return typeof window < "u";
|
|
1537
1537
|
}
|
|
1538
|
-
function J(
|
|
1539
|
-
return
|
|
1538
|
+
function J(e) {
|
|
1539
|
+
return Vt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1542
|
-
var
|
|
1543
|
-
return (
|
|
1541
|
+
function I(e) {
|
|
1542
|
+
var t;
|
|
1543
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1544
1544
|
}
|
|
1545
|
-
function $(
|
|
1546
|
-
var
|
|
1547
|
-
return (
|
|
1545
|
+
function $(e) {
|
|
1546
|
+
var t;
|
|
1547
|
+
return (t = (Vt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return
|
|
1549
|
+
function Vt(e) {
|
|
1550
|
+
return Ae() ? e instanceof Node || e instanceof I(e).Node : !1;
|
|
1551
1551
|
}
|
|
1552
|
-
function D(
|
|
1553
|
-
return
|
|
1552
|
+
function D(e) {
|
|
1553
|
+
return Ae() ? e instanceof Element || e instanceof I(e).Element : !1;
|
|
1554
1554
|
}
|
|
1555
|
-
function W(
|
|
1556
|
-
return
|
|
1555
|
+
function W(e) {
|
|
1556
|
+
return Ae() ? e instanceof HTMLElement || e instanceof I(e).HTMLElement : !1;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
return !
|
|
1558
|
+
function mt(e) {
|
|
1559
|
+
return !Ae() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof I(e).ShadowRoot;
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Ee(e) {
|
|
1562
1562
|
const {
|
|
1563
|
-
overflow:
|
|
1563
|
+
overflow: t,
|
|
1564
1564
|
overflowX: n,
|
|
1565
1565
|
overflowY: o,
|
|
1566
1566
|
display: i
|
|
1567
|
-
} = F(
|
|
1568
|
-
return /auto|scroll|overlay|hidden|clip/.test(
|
|
1567
|
+
} = F(e);
|
|
1568
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && i !== "inline" && i !== "contents";
|
|
1569
1569
|
}
|
|
1570
|
-
function
|
|
1571
|
-
return /^(table|td|th)$/.test(J(
|
|
1570
|
+
function To(e) {
|
|
1571
|
+
return /^(table|td|th)$/.test(J(e));
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function Ie(e) {
|
|
1574
1574
|
try {
|
|
1575
|
-
if (
|
|
1575
|
+
if (e.matches(":popover-open"))
|
|
1576
1576
|
return !0;
|
|
1577
1577
|
} catch {
|
|
1578
1578
|
}
|
|
1579
1579
|
try {
|
|
1580
|
-
return
|
|
1580
|
+
return e.matches(":modal");
|
|
1581
1581
|
} catch {
|
|
1582
1582
|
return !1;
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
|
-
const
|
|
1586
|
-
let
|
|
1587
|
-
function
|
|
1588
|
-
const
|
|
1589
|
-
return U(
|
|
1585
|
+
const Oo = /transform|translate|scale|rotate|perspective|filter/, Ao = /paint|layout|strict|content/, U = (e) => !!e && e !== "none";
|
|
1586
|
+
let ke;
|
|
1587
|
+
function Qe(e) {
|
|
1588
|
+
const t = D(e) ? F(e) : e;
|
|
1589
|
+
return U(t.transform) || U(t.translate) || U(t.scale) || U(t.rotate) || U(t.perspective) || !Ke() && (U(t.backdropFilter) || U(t.filter)) || Oo.test(t.willChange || "") || Ao.test(t.contain || "");
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1592
|
-
let
|
|
1593
|
-
for (; W(
|
|
1594
|
-
if (
|
|
1595
|
-
return
|
|
1596
|
-
if (
|
|
1591
|
+
function Eo(e) {
|
|
1592
|
+
let t = X(e);
|
|
1593
|
+
for (; W(t) && !se(t); ) {
|
|
1594
|
+
if (Qe(t))
|
|
1595
|
+
return t;
|
|
1596
|
+
if (Ie(t))
|
|
1597
1597
|
return null;
|
|
1598
|
-
|
|
1598
|
+
t = X(t);
|
|
1599
1599
|
}
|
|
1600
1600
|
return null;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return
|
|
1602
|
+
function Ke() {
|
|
1603
|
+
return ke == null && (ke = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), ke;
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1606
|
-
return /^(html|body|#document)$/.test(J(
|
|
1605
|
+
function se(e) {
|
|
1606
|
+
return /^(html|body|#document)$/.test(J(e));
|
|
1607
1607
|
}
|
|
1608
|
-
function F(
|
|
1609
|
-
return
|
|
1608
|
+
function F(e) {
|
|
1609
|
+
return I(e).getComputedStyle(e);
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1612
|
-
return D(
|
|
1613
|
-
scrollLeft:
|
|
1614
|
-
scrollTop:
|
|
1611
|
+
function Re(e) {
|
|
1612
|
+
return D(e) ? {
|
|
1613
|
+
scrollLeft: e.scrollLeft,
|
|
1614
|
+
scrollTop: e.scrollTop
|
|
1615
1615
|
} : {
|
|
1616
|
-
scrollLeft:
|
|
1617
|
-
scrollTop:
|
|
1616
|
+
scrollLeft: e.scrollX,
|
|
1617
|
+
scrollTop: e.scrollY
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
|
-
function X(
|
|
1621
|
-
if (J(
|
|
1622
|
-
return
|
|
1623
|
-
const
|
|
1620
|
+
function X(e) {
|
|
1621
|
+
if (J(e) === "html")
|
|
1622
|
+
return e;
|
|
1623
|
+
const t = (
|
|
1624
1624
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
$(
|
|
1625
|
+
e.assignedSlot || // DOM Element detected.
|
|
1626
|
+
e.parentNode || // ShadowRoot detected.
|
|
1627
|
+
mt(e) && e.host || // Fallback.
|
|
1628
|
+
$(e)
|
|
1629
1629
|
);
|
|
1630
|
-
return
|
|
1630
|
+
return mt(t) ? t.host : t;
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1633
|
-
const
|
|
1634
|
-
return
|
|
1632
|
+
function Ht(e) {
|
|
1633
|
+
const t = X(e);
|
|
1634
|
+
return se(t) ? (e.ownerDocument || e).body : W(t) && Ee(t) ? t : Ht(t);
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function re(e, t, n) {
|
|
1637
1637
|
var o;
|
|
1638
|
-
|
|
1639
|
-
const i =
|
|
1638
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1639
|
+
const i = Ht(e), s = i === ((o = e.ownerDocument) == null ? void 0 : o.body), r = I(i);
|
|
1640
1640
|
if (s) {
|
|
1641
|
-
const c =
|
|
1642
|
-
return
|
|
1641
|
+
const c = Ve(r);
|
|
1642
|
+
return t.concat(r, r.visualViewport || [], Ee(i) ? i : [], c && n ? re(c) : []);
|
|
1643
1643
|
} else
|
|
1644
|
-
return
|
|
1644
|
+
return t.concat(i, re(i, [], n));
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1647
|
-
return
|
|
1646
|
+
function Ve(e) {
|
|
1647
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1650
|
-
const
|
|
1651
|
-
let n = parseFloat(
|
|
1652
|
-
const i = W(
|
|
1649
|
+
function Ut(e) {
|
|
1650
|
+
const t = F(e);
|
|
1651
|
+
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1652
|
+
const i = W(e), s = i ? e.offsetWidth : n, r = i ? e.offsetHeight : o, c = xe(n) !== s || xe(o) !== r;
|
|
1653
1653
|
return c && (n = s, o = r), {
|
|
1654
1654
|
width: n,
|
|
1655
1655
|
height: o,
|
|
1656
1656
|
$: c
|
|
1657
1657
|
};
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1660
|
-
return D(
|
|
1659
|
+
function Ye(e) {
|
|
1660
|
+
return D(e) ? e : e.contextElement;
|
|
1661
1661
|
}
|
|
1662
|
-
function Q(
|
|
1663
|
-
const
|
|
1664
|
-
if (!W(
|
|
1662
|
+
function Q(e) {
|
|
1663
|
+
const t = Ye(e);
|
|
1664
|
+
if (!W(t))
|
|
1665
1665
|
return N(1);
|
|
1666
|
-
const n =
|
|
1666
|
+
const n = t.getBoundingClientRect(), {
|
|
1667
1667
|
width: o,
|
|
1668
1668
|
height: i,
|
|
1669
1669
|
$: s
|
|
1670
|
-
} =
|
|
1671
|
-
let r = (s ?
|
|
1670
|
+
} = Ut(t);
|
|
1671
|
+
let r = (s ? xe(n.width) : n.width) / o, c = (s ? xe(n.height) : n.height) / i;
|
|
1672
1672
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1673
1673
|
x: r,
|
|
1674
1674
|
y: c
|
|
1675
1675
|
};
|
|
1676
1676
|
}
|
|
1677
|
-
const
|
|
1678
|
-
function
|
|
1679
|
-
const
|
|
1680
|
-
return !
|
|
1681
|
-
x:
|
|
1682
|
-
y:
|
|
1677
|
+
const Io = /* @__PURE__ */ N(0);
|
|
1678
|
+
function qt(e) {
|
|
1679
|
+
const t = I(e);
|
|
1680
|
+
return !Ke() || !t.visualViewport ? Io : {
|
|
1681
|
+
x: t.visualViewport.offsetLeft,
|
|
1682
|
+
y: t.visualViewport.offsetTop
|
|
1683
1683
|
};
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1686
|
-
return
|
|
1685
|
+
function Ro(e, t, n) {
|
|
1686
|
+
return t === void 0 && (t = !1), !!n && t && n === I(e);
|
|
1687
1687
|
}
|
|
1688
|
-
function G(
|
|
1689
|
-
|
|
1690
|
-
const i =
|
|
1688
|
+
function G(e, t, n, o) {
|
|
1689
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1690
|
+
const i = e.getBoundingClientRect(), s = Ye(e);
|
|
1691
1691
|
let r = N(1);
|
|
1692
|
-
|
|
1693
|
-
const c =
|
|
1692
|
+
t && (o ? D(o) && (r = Q(o)) : r = Q(e));
|
|
1693
|
+
const c = Ro(s, n, o) ? qt(s) : N(0);
|
|
1694
1694
|
let a = (i.left + c.x) / r.x, l = (i.top + c.y) / r.y, f = i.width / r.x, u = i.height / r.y;
|
|
1695
1695
|
if (s && o) {
|
|
1696
|
-
const p =
|
|
1697
|
-
let h = p, m =
|
|
1696
|
+
const p = I(s), d = D(o) ? I(o) : o;
|
|
1697
|
+
let h = p, m = Ve(h);
|
|
1698
1698
|
for (; m && d !== h; ) {
|
|
1699
1699
|
const g = Q(m), y = m.getBoundingClientRect(), w = F(m), x = y.left + (m.clientLeft + parseFloat(w.paddingLeft)) * g.x, v = y.top + (m.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
1700
|
-
a *= g.x, l *= g.y, f *= g.x, u *= g.y, a += x, l += v, h =
|
|
1700
|
+
a *= g.x, l *= g.y, f *= g.x, u *= g.y, a += x, l += v, h = I(m), m = Ve(h);
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
|
-
return
|
|
1703
|
+
return Se({
|
|
1704
1704
|
width: f,
|
|
1705
1705
|
height: u,
|
|
1706
1706
|
x: a,
|
|
1707
1707
|
y: l
|
|
1708
1708
|
});
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1711
|
-
const n =
|
|
1712
|
-
return
|
|
1710
|
+
function Le(e, t) {
|
|
1711
|
+
const n = Re(e).scrollLeft;
|
|
1712
|
+
return t ? t.left + n : G($(e)).left + n;
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1715
|
-
const n =
|
|
1714
|
+
function Xt(e, t) {
|
|
1715
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Le(e, n), i = n.top + t.scrollTop;
|
|
1716
1716
|
return {
|
|
1717
1717
|
x: o,
|
|
1718
1718
|
y: i
|
|
1719
1719
|
};
|
|
1720
1720
|
}
|
|
1721
|
-
function Lo(
|
|
1721
|
+
function Lo(e) {
|
|
1722
1722
|
let {
|
|
1723
|
-
elements:
|
|
1723
|
+
elements: t,
|
|
1724
1724
|
rect: n,
|
|
1725
1725
|
offsetParent: o,
|
|
1726
1726
|
strategy: i
|
|
1727
|
-
} =
|
|
1728
|
-
const s = i === "fixed", r = $(o), c =
|
|
1727
|
+
} = e;
|
|
1728
|
+
const s = i === "fixed", r = $(o), c = t ? Ie(t.floating) : !1;
|
|
1729
1729
|
if (o === r || c && s)
|
|
1730
1730
|
return n;
|
|
1731
1731
|
let a = {
|
|
@@ -1733,11 +1733,11 @@ function Lo(t) {
|
|
|
1733
1733
|
scrollTop: 0
|
|
1734
1734
|
}, l = N(1);
|
|
1735
1735
|
const f = N(0), u = W(o);
|
|
1736
|
-
if ((u || !s) && ((J(o) !== "body" ||
|
|
1736
|
+
if ((u || !s) && ((J(o) !== "body" || Ee(r)) && (a = Re(o)), u)) {
|
|
1737
1737
|
const d = G(o);
|
|
1738
1738
|
l = Q(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
|
|
1739
1739
|
}
|
|
1740
|
-
const p = r && !u && !s ?
|
|
1740
|
+
const p = r && !u && !s ? Xt(r, a) : N(0);
|
|
1741
1741
|
return {
|
|
1742
1742
|
width: n.width * l.x,
|
|
1743
1743
|
height: n.height * l.y,
|
|
@@ -1745,32 +1745,32 @@ function Lo(t) {
|
|
|
1745
1745
|
y: n.y * l.y - a.scrollTop * l.y + f.y + p.y
|
|
1746
1746
|
};
|
|
1747
1747
|
}
|
|
1748
|
-
function
|
|
1749
|
-
return
|
|
1748
|
+
function Co(e) {
|
|
1749
|
+
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
const
|
|
1753
|
-
let s = -
|
|
1754
|
-
const r = -
|
|
1755
|
-
return F(n).direction === "rtl" && (s += q(
|
|
1751
|
+
function Po(e) {
|
|
1752
|
+
const t = Re(e), n = e.ownerDocument.body, o = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1753
|
+
let s = -t.scrollLeft + Le(e);
|
|
1754
|
+
const r = -t.scrollTop;
|
|
1755
|
+
return F(n).direction === "rtl" && (s += q(e.clientWidth, n.clientWidth) - o), {
|
|
1756
1756
|
width: o,
|
|
1757
1757
|
height: i,
|
|
1758
1758
|
x: s,
|
|
1759
1759
|
y: r
|
|
1760
1760
|
};
|
|
1761
1761
|
}
|
|
1762
|
-
const
|
|
1763
|
-
function
|
|
1762
|
+
const ko = 25;
|
|
1763
|
+
function Do(e, t, n) {
|
|
1764
1764
|
n === void 0 && (n = "viewport");
|
|
1765
|
-
const o = n === "layoutViewport", i =
|
|
1765
|
+
const o = n === "layoutViewport", i = I(e), s = $(e), r = i.visualViewport;
|
|
1766
1766
|
let c = s.clientWidth, a = s.clientHeight, l = 0, f = 0;
|
|
1767
1767
|
if (r) {
|
|
1768
|
-
const p = !
|
|
1768
|
+
const p = !Ke() || t === "fixed";
|
|
1769
1769
|
o ? p || (l = -r.offsetLeft, f = -r.offsetTop) : (c = r.width, a = r.height, p && (l = r.offsetLeft, f = r.offsetTop));
|
|
1770
1770
|
}
|
|
1771
|
-
if (
|
|
1771
|
+
if (Le(s) <= 0) {
|
|
1772
1772
|
const p = s.ownerDocument, d = p.body, h = getComputedStyle(d), m = p.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, g = Math.abs(s.clientWidth - d.clientWidth - m), y = getComputedStyle(s).scrollbarGutter === "stable both-edges" ? g / 2 : g;
|
|
1773
|
-
y <=
|
|
1773
|
+
y <= ko && (c -= y);
|
|
1774
1774
|
}
|
|
1775
1775
|
return {
|
|
1776
1776
|
width: c,
|
|
@@ -1779,8 +1779,8 @@ function Fo(t, e, n) {
|
|
|
1779
1779
|
y: f
|
|
1780
1780
|
};
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1783
|
-
const n = G(
|
|
1782
|
+
function Fo(e, t) {
|
|
1783
|
+
const n = G(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, s = Q(e), r = e.clientWidth * s.x, c = e.clientHeight * s.y, a = i * s.x, l = o * s.y;
|
|
1784
1784
|
return {
|
|
1785
1785
|
width: r,
|
|
1786
1786
|
height: c,
|
|
@@ -1788,49 +1788,49 @@ function Mo(t, e) {
|
|
|
1788
1788
|
y: l
|
|
1789
1789
|
};
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function yt(e, t, n) {
|
|
1792
1792
|
let o;
|
|
1793
|
-
if (
|
|
1794
|
-
o =
|
|
1795
|
-
else if (
|
|
1796
|
-
o =
|
|
1797
|
-
else if (D(
|
|
1798
|
-
o =
|
|
1793
|
+
if (t === "viewport" || t === "layoutViewport")
|
|
1794
|
+
o = Do(e, n, t);
|
|
1795
|
+
else if (t === "document")
|
|
1796
|
+
o = Po($(e));
|
|
1797
|
+
else if (D(t))
|
|
1798
|
+
o = Fo(t, n);
|
|
1799
1799
|
else {
|
|
1800
|
-
const i =
|
|
1800
|
+
const i = qt(e);
|
|
1801
1801
|
o = {
|
|
1802
|
-
x:
|
|
1803
|
-
y:
|
|
1804
|
-
width:
|
|
1805
|
-
height:
|
|
1802
|
+
x: t.x - i.x,
|
|
1803
|
+
y: t.y - i.y,
|
|
1804
|
+
width: t.width,
|
|
1805
|
+
height: t.height
|
|
1806
1806
|
};
|
|
1807
1807
|
}
|
|
1808
|
-
return
|
|
1808
|
+
return Se(o);
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1811
|
-
const n =
|
|
1810
|
+
function Mo(e, t) {
|
|
1811
|
+
const n = t.get(e);
|
|
1812
1812
|
if (n)
|
|
1813
1813
|
return n;
|
|
1814
|
-
let o =
|
|
1815
|
-
const s = F(
|
|
1816
|
-
let r = s ? X(
|
|
1817
|
-
for (; D(r) && !
|
|
1818
|
-
const c = F(r), a =
|
|
1814
|
+
let o = re(e, [], !1).filter((c) => D(c) && J(c) !== "body"), i = null;
|
|
1815
|
+
const s = F(e).position === "fixed";
|
|
1816
|
+
let r = s ? X(e) : e;
|
|
1817
|
+
for (; D(r) && !se(r); ) {
|
|
1818
|
+
const c = F(r), a = Qe(r), l = i ? i.position : s ? "fixed" : "";
|
|
1819
1819
|
!a && (l === "fixed" || l === "absolute" && c.position === "static") ? o = o.filter((u) => u !== r) : i = c, r = X(r);
|
|
1820
1820
|
}
|
|
1821
|
-
return
|
|
1821
|
+
return t.set(e, o), o;
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function No(e) {
|
|
1824
1824
|
let {
|
|
1825
|
-
element:
|
|
1825
|
+
element: t,
|
|
1826
1826
|
boundary: n,
|
|
1827
1827
|
rootBoundary: o,
|
|
1828
1828
|
strategy: i
|
|
1829
|
-
} =
|
|
1830
|
-
const r = [...n === "clippingAncestors" ?
|
|
1829
|
+
} = e;
|
|
1830
|
+
const r = [...n === "clippingAncestors" ? Ie(t) ? [] : Mo(t, this._c) : [].concat(n), o], c = yt(t, r[0], i);
|
|
1831
1831
|
let a = c.top, l = c.right, f = c.bottom, u = c.left;
|
|
1832
1832
|
for (let p = 1; p < r.length; p++) {
|
|
1833
|
-
const d =
|
|
1833
|
+
const d = yt(t, r[p], i);
|
|
1834
1834
|
a = q(d.top, a), l = Y(d.right, l), f = Y(d.bottom, f), u = q(d.left, u);
|
|
1835
1835
|
}
|
|
1836
1836
|
return {
|
|
@@ -1840,29 +1840,29 @@ function $o(t) {
|
|
|
1840
1840
|
y: a
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function $o(e) {
|
|
1844
1844
|
const {
|
|
1845
|
-
width:
|
|
1845
|
+
width: t,
|
|
1846
1846
|
height: n
|
|
1847
|
-
} =
|
|
1847
|
+
} = Ut(e);
|
|
1848
1848
|
return {
|
|
1849
|
-
width:
|
|
1849
|
+
width: t,
|
|
1850
1850
|
height: n
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1854
|
-
const o = W(
|
|
1853
|
+
function _o(e, t, n) {
|
|
1854
|
+
const o = W(t), i = $(t), s = n === "fixed", r = G(e, !0, s, t);
|
|
1855
1855
|
let c = {
|
|
1856
1856
|
scrollLeft: 0,
|
|
1857
1857
|
scrollTop: 0
|
|
1858
1858
|
};
|
|
1859
1859
|
const a = N(0);
|
|
1860
|
-
if ((o || !s) && ((J(
|
|
1861
|
-
const p = G(
|
|
1862
|
-
a.x = p.x +
|
|
1860
|
+
if ((o || !s) && ((J(t) !== "body" || Ee(i)) && (c = Re(t)), o)) {
|
|
1861
|
+
const p = G(t, !0, s, t);
|
|
1862
|
+
a.x = p.x + t.clientLeft, a.y = p.y + t.clientTop;
|
|
1863
1863
|
}
|
|
1864
|
-
!o && i && (a.x =
|
|
1865
|
-
const l = i && !o && !s ?
|
|
1864
|
+
!o && i && (a.x = Le(i));
|
|
1865
|
+
const l = i && !o && !s ? Xt(i, c) : N(0), f = r.left + c.scrollLeft - a.x - l.x, u = r.top + c.scrollTop - a.y - l.y;
|
|
1866
1866
|
return {
|
|
1867
1867
|
x: f,
|
|
1868
1868
|
y: u,
|
|
@@ -1870,39 +1870,39 @@ function jo(t, e, n) {
|
|
|
1870
1870
|
height: r.height
|
|
1871
1871
|
};
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1874
|
-
return F(
|
|
1873
|
+
function De(e) {
|
|
1874
|
+
return F(e).position === "static";
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1877
|
-
if (!W(
|
|
1876
|
+
function bt(e, t) {
|
|
1877
|
+
if (!W(e) || F(e).position === "fixed")
|
|
1878
1878
|
return null;
|
|
1879
|
-
if (
|
|
1880
|
-
return e
|
|
1881
|
-
let n =
|
|
1882
|
-
return $(
|
|
1883
|
-
}
|
|
1884
|
-
function
|
|
1885
|
-
const n =
|
|
1886
|
-
if (
|
|
1879
|
+
if (t)
|
|
1880
|
+
return t(e);
|
|
1881
|
+
let n = e.offsetParent;
|
|
1882
|
+
return $(e) === n && (n = n.ownerDocument.body), n;
|
|
1883
|
+
}
|
|
1884
|
+
function Gt(e, t) {
|
|
1885
|
+
const n = I(e);
|
|
1886
|
+
if (Ie(e))
|
|
1887
1887
|
return n;
|
|
1888
|
-
if (!W(
|
|
1889
|
-
let i = X(
|
|
1890
|
-
for (; i && !
|
|
1891
|
-
if (D(i) && !
|
|
1888
|
+
if (!W(e)) {
|
|
1889
|
+
let i = X(e);
|
|
1890
|
+
for (; i && !se(i); ) {
|
|
1891
|
+
if (D(i) && !De(i))
|
|
1892
1892
|
return i;
|
|
1893
1893
|
i = X(i);
|
|
1894
1894
|
}
|
|
1895
1895
|
return n;
|
|
1896
1896
|
}
|
|
1897
|
-
let o =
|
|
1898
|
-
for (; o &&
|
|
1899
|
-
o =
|
|
1900
|
-
return o &&
|
|
1897
|
+
let o = bt(e, t);
|
|
1898
|
+
for (; o && To(o) && De(o); )
|
|
1899
|
+
o = bt(o, t);
|
|
1900
|
+
return o && se(o) && De(o) && !Qe(o) ? n : o || Eo(e) || n;
|
|
1901
1901
|
}
|
|
1902
|
-
const
|
|
1903
|
-
const
|
|
1902
|
+
const jo = async function(e) {
|
|
1903
|
+
const t = this.getOffsetParent || Gt, n = this.getDimensions, o = await n(e.floating);
|
|
1904
1904
|
return {
|
|
1905
|
-
reference:
|
|
1905
|
+
reference: _o(e.reference, await t(e.floating), e.strategy),
|
|
1906
1906
|
floating: {
|
|
1907
1907
|
x: 0,
|
|
1908
1908
|
y: 0,
|
|
@@ -1911,49 +1911,49 @@ const Bo = async function(t) {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
};
|
|
1913
1913
|
};
|
|
1914
|
-
function
|
|
1915
|
-
return F(
|
|
1914
|
+
function Bo(e) {
|
|
1915
|
+
return F(e).direction === "rtl";
|
|
1916
1916
|
}
|
|
1917
|
-
const
|
|
1917
|
+
const zo = {
|
|
1918
1918
|
convertOffsetParentRelativeRectToViewportRelativeRect: Lo,
|
|
1919
1919
|
getDocumentElement: $,
|
|
1920
|
-
getClippingRect:
|
|
1921
|
-
getOffsetParent:
|
|
1922
|
-
getElementRects:
|
|
1923
|
-
getClientRects:
|
|
1924
|
-
getDimensions:
|
|
1920
|
+
getClippingRect: No,
|
|
1921
|
+
getOffsetParent: Gt,
|
|
1922
|
+
getElementRects: jo,
|
|
1923
|
+
getClientRects: Co,
|
|
1924
|
+
getDimensions: $o,
|
|
1925
1925
|
getScale: Q,
|
|
1926
1926
|
isElement: D,
|
|
1927
|
-
isRTL:
|
|
1927
|
+
isRTL: Bo
|
|
1928
1928
|
};
|
|
1929
|
-
function
|
|
1930
|
-
return
|
|
1929
|
+
function Qt(e, t) {
|
|
1930
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Wo(e, t, n) {
|
|
1933
1933
|
let o = null, i;
|
|
1934
|
-
const s = $(
|
|
1934
|
+
const s = $(e);
|
|
1935
1935
|
function r() {
|
|
1936
1936
|
var f;
|
|
1937
1937
|
clearTimeout(i), (f = o) == null || f.disconnect(), o = null;
|
|
1938
1938
|
}
|
|
1939
1939
|
function c(f, u) {
|
|
1940
1940
|
f === void 0 && (f = !1), u === void 0 && (u = 1), r();
|
|
1941
|
-
const p =
|
|
1941
|
+
const p = e.getBoundingClientRect(), {
|
|
1942
1942
|
left: d,
|
|
1943
1943
|
top: h,
|
|
1944
1944
|
width: m,
|
|
1945
1945
|
height: g
|
|
1946
1946
|
} = p;
|
|
1947
|
-
if (f ||
|
|
1947
|
+
if (f || t(), !m || !g)
|
|
1948
1948
|
return;
|
|
1949
|
-
const y =
|
|
1949
|
+
const y = fe(h), w = fe(s.clientWidth - (d + m)), x = fe(s.clientHeight - (h + g)), v = fe(d), b = {
|
|
1950
1950
|
rootMargin: -y + "px " + -w + "px " + -x + "px " + -v + "px",
|
|
1951
1951
|
threshold: q(0, Y(1, u)) || 1
|
|
1952
1952
|
};
|
|
1953
1953
|
let T = !0;
|
|
1954
|
-
function
|
|
1954
|
+
function E(A) {
|
|
1955
1955
|
const S = A[0].intersectionRatio;
|
|
1956
|
-
if (!
|
|
1956
|
+
if (!Qt(p, e.getBoundingClientRect()))
|
|
1957
1957
|
return c();
|
|
1958
1958
|
if (S !== u) {
|
|
1959
1959
|
if (!T)
|
|
@@ -1965,22 +1965,22 @@ function Vo(t, e, n) {
|
|
|
1965
1965
|
T = !1;
|
|
1966
1966
|
}
|
|
1967
1967
|
try {
|
|
1968
|
-
o = new IntersectionObserver(
|
|
1968
|
+
o = new IntersectionObserver(E, {
|
|
1969
1969
|
...b,
|
|
1970
1970
|
// Handle <iframe>s
|
|
1971
1971
|
root: s.ownerDocument
|
|
1972
1972
|
});
|
|
1973
1973
|
} catch {
|
|
1974
|
-
o = new IntersectionObserver(
|
|
1974
|
+
o = new IntersectionObserver(E, b);
|
|
1975
1975
|
}
|
|
1976
|
-
o.observe(
|
|
1976
|
+
o.observe(e);
|
|
1977
1977
|
}
|
|
1978
|
-
const a =
|
|
1978
|
+
const a = I(e), l = () => c(n);
|
|
1979
1979
|
return a.addEventListener("resize", l), c(!0), () => {
|
|
1980
1980
|
a.removeEventListener("resize", l), r();
|
|
1981
1981
|
};
|
|
1982
1982
|
}
|
|
1983
|
-
function
|
|
1983
|
+
function Vo(e, t, n, o) {
|
|
1984
1984
|
o === void 0 && (o = {});
|
|
1985
1985
|
const {
|
|
1986
1986
|
ancestorScroll: i = !0,
|
|
@@ -1988,24 +1988,24 @@ function Ho(t, e, n, o) {
|
|
|
1988
1988
|
elementResize: r = typeof ResizeObserver == "function",
|
|
1989
1989
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1990
1990
|
animationFrame: a = !1
|
|
1991
|
-
} = o, l =
|
|
1991
|
+
} = o, l = Ye(e), f = i || s ? [...l ? re(l) : [], ...t ? re(t) : []] : [];
|
|
1992
1992
|
f.forEach((y) => {
|
|
1993
1993
|
i && y.addEventListener("scroll", n), s && y.addEventListener("resize", n);
|
|
1994
1994
|
});
|
|
1995
|
-
const u = l && c ?
|
|
1995
|
+
const u = l && c ? Wo(l, n, s) : null;
|
|
1996
1996
|
let p = -1, d = null;
|
|
1997
1997
|
r && (d = new ResizeObserver((y) => {
|
|
1998
1998
|
let [w] = y;
|
|
1999
|
-
w && w.target === l && d &&
|
|
1999
|
+
w && w.target === l && d && t && (d.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
2000
2000
|
var x;
|
|
2001
|
-
(x = d) == null || x.observe(
|
|
2001
|
+
(x = d) == null || x.observe(t);
|
|
2002
2002
|
})), n();
|
|
2003
|
-
}), l && !a && d.observe(l),
|
|
2004
|
-
let h, m = a ? G(
|
|
2003
|
+
}), l && !a && d.observe(l), t && d.observe(t));
|
|
2004
|
+
let h, m = a ? G(e) : null;
|
|
2005
2005
|
a && g();
|
|
2006
2006
|
function g() {
|
|
2007
|
-
const y = G(
|
|
2008
|
-
m && !
|
|
2007
|
+
const y = G(e);
|
|
2008
|
+
m && !Qt(m, y) && n(), m = y, h = requestAnimationFrame(g);
|
|
2009
2009
|
}
|
|
2010
2010
|
return n(), () => {
|
|
2011
2011
|
var y;
|
|
@@ -2014,13 +2014,13 @@ function Ho(t, e, n, o) {
|
|
|
2014
2014
|
}), u?.(), (y = d) == null || y.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
2015
2015
|
};
|
|
2016
2016
|
}
|
|
2017
|
-
const Uo = So, qo =
|
|
2017
|
+
const Ho = vo, Uo = So, qo = bo, Xo = yo, Go = (e, t, n) => {
|
|
2018
2018
|
const o = /* @__PURE__ */ new Map(), i = n ?? {}, s = {
|
|
2019
|
-
...
|
|
2019
|
+
...zo,
|
|
2020
2020
|
...i.platform,
|
|
2021
2021
|
_c: o
|
|
2022
2022
|
};
|
|
2023
|
-
return
|
|
2023
|
+
return mo(e, t, {
|
|
2024
2024
|
...i,
|
|
2025
2025
|
platform: s
|
|
2026
2026
|
});
|
|
@@ -2029,76 +2029,88 @@ const Uo = So, qo = To, Xo = wo, Go = bo, Qo = (t, e, n) => {
|
|
|
2029
2029
|
Right: "right",
|
|
2030
2030
|
Bottom: "bottom",
|
|
2031
2031
|
Left: "left"
|
|
2032
|
-
},
|
|
2032
|
+
}, Qo = 8, Ko = 8, Yo = 8, Zo = /* @__PURE__ */ ce({
|
|
2033
2033
|
name: "FloatingLayer",
|
|
2034
2034
|
__name: "FloatingLayer",
|
|
2035
2035
|
props: {
|
|
2036
2036
|
referenceElement: {},
|
|
2037
2037
|
isOpen: { type: Boolean },
|
|
2038
2038
|
placement: { default: R.Top },
|
|
2039
|
-
zIndex: { default:
|
|
2039
|
+
zIndex: { default: jt.default }
|
|
2040
2040
|
},
|
|
2041
|
-
setup(
|
|
2042
|
-
const
|
|
2041
|
+
setup(e) {
|
|
2042
|
+
const t = e, n = {
|
|
2043
2043
|
[R.Top]: R.Bottom,
|
|
2044
2044
|
[R.Right]: R.Left,
|
|
2045
2045
|
[R.Bottom]: R.Top,
|
|
2046
2046
|
[R.Left]: R.Right
|
|
2047
|
-
}, o =
|
|
2047
|
+
}, o = Me("floatingElement"), i = Me("arrowElement"), s = B({ top: "0px", left: "0px" }), r = B({}), c = B(t.placement);
|
|
2048
2048
|
let a = null;
|
|
2049
|
-
|
|
2050
|
-
|
|
2049
|
+
function l(d) {
|
|
2050
|
+
let h = d;
|
|
2051
|
+
for (; h && getComputedStyle(h).display === "contents"; )
|
|
2052
|
+
h = h.firstElementChild;
|
|
2053
|
+
return h;
|
|
2054
|
+
}
|
|
2055
|
+
function f() {
|
|
2056
|
+
return t.referenceElement instanceof Element ? l(t.referenceElement) : t.referenceElement;
|
|
2057
|
+
}
|
|
2058
|
+
async function u() {
|
|
2059
|
+
const d = f();
|
|
2060
|
+
if (!d || !o.value)
|
|
2051
2061
|
return;
|
|
2052
|
-
const
|
|
2053
|
-
i.value &&
|
|
2054
|
-
const { x:
|
|
2055
|
-
placement:
|
|
2062
|
+
const h = [Ho(Qo), qo({ fallbackAxisSideDirection: "start" }), Uo({ padding: Ko })];
|
|
2063
|
+
i.value && h.push(Xo({ element: i.value, padding: Yo }));
|
|
2064
|
+
const { x: m, y: g, placement: y, middlewareData: w } = await Go(d, o.value, {
|
|
2065
|
+
placement: t.placement,
|
|
2056
2066
|
strategy: "fixed",
|
|
2057
|
-
middleware:
|
|
2067
|
+
middleware: h
|
|
2058
2068
|
});
|
|
2059
|
-
s.value = { top: `${
|
|
2060
|
-
const
|
|
2061
|
-
if (c.value =
|
|
2062
|
-
const
|
|
2069
|
+
s.value = { top: `${g}px`, left: `${m}px` };
|
|
2070
|
+
const x = y;
|
|
2071
|
+
if (c.value = x, w.arrow && i.value) {
|
|
2072
|
+
const v = n[x], O = v === R.Top || v === R.Bottom ? i.value.offsetHeight : i.value.offsetWidth;
|
|
2063
2073
|
r.value = {
|
|
2064
|
-
left:
|
|
2065
|
-
top:
|
|
2074
|
+
left: w.arrow.x != null ? `${w.arrow.x}px` : "",
|
|
2075
|
+
top: w.arrow.y != null ? `${w.arrow.y}px` : "",
|
|
2066
2076
|
// Pulls the arrow half its own thickness past the static side so it sits flush against the floating content's edge.
|
|
2067
|
-
[
|
|
2077
|
+
[v]: `${-O / 2}px`
|
|
2068
2078
|
};
|
|
2069
2079
|
}
|
|
2070
2080
|
}
|
|
2071
|
-
function
|
|
2081
|
+
function p() {
|
|
2072
2082
|
a?.(), a = null;
|
|
2073
2083
|
}
|
|
2074
|
-
return
|
|
2075
|
-
() => [
|
|
2076
|
-
([
|
|
2077
|
-
|
|
2084
|
+
return vt(
|
|
2085
|
+
() => [t.referenceElement, t.isOpen, o.value],
|
|
2086
|
+
([, d, h]) => {
|
|
2087
|
+
p();
|
|
2088
|
+
const m = f();
|
|
2089
|
+
m && d && h && (a = Vo(m, h, u));
|
|
2078
2090
|
},
|
|
2079
2091
|
{ immediate: !0 }
|
|
2080
|
-
),
|
|
2081
|
-
|
|
2092
|
+
), St(p), (d, h) => (z(), ge(nn, { to: "body" }, [
|
|
2093
|
+
t.isOpen ? (z(), me("div", {
|
|
2082
2094
|
key: 0,
|
|
2083
2095
|
ref_key: "floatingElement",
|
|
2084
2096
|
ref: o,
|
|
2085
2097
|
class: "fixed",
|
|
2086
|
-
style:
|
|
2098
|
+
style: Je({ zIndex: t.zIndex, ...s.value })
|
|
2087
2099
|
}, [
|
|
2088
|
-
|
|
2089
|
-
|
|
2100
|
+
Ne(d.$slots, "default", { placement: c.value }),
|
|
2101
|
+
d.$slots.arrow ? (z(), me("div", {
|
|
2090
2102
|
key: 0,
|
|
2091
2103
|
ref_key: "arrowElement",
|
|
2092
2104
|
ref: i,
|
|
2093
2105
|
class: "absolute",
|
|
2094
|
-
style:
|
|
2106
|
+
style: Je(r.value)
|
|
2095
2107
|
}, [
|
|
2096
|
-
|
|
2097
|
-
], 4)) :
|
|
2098
|
-
], 4)) :
|
|
2108
|
+
Ne(d.$slots, "arrow")
|
|
2109
|
+
], 4)) : ye("", !0)
|
|
2110
|
+
], 4)) : ye("", !0)
|
|
2099
2111
|
]));
|
|
2100
2112
|
}
|
|
2101
|
-
}),
|
|
2113
|
+
}), Jo = ["aria-describedby"], ei = ["id"], ti = { class: "whitespace-pre-wrap text-sm text-white" }, Kt = /* @__PURE__ */ ce({
|
|
2102
2114
|
name: "AlpineTooltip",
|
|
2103
2115
|
__name: "Tooltip",
|
|
2104
2116
|
props: {
|
|
@@ -2107,82 +2119,67 @@ const Uo = So, qo = To, Xo = wo, Go = bo, Qo = (t, e, n) => {
|
|
|
2107
2119
|
openDelay: { default: 0 },
|
|
2108
2120
|
isDisabled: { type: Boolean, default: !1 }
|
|
2109
2121
|
},
|
|
2110
|
-
setup(
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
h = h.firstElementChild;
|
|
2116
|
-
return h;
|
|
2117
|
-
}
|
|
2118
|
-
const s = bt(() => {
|
|
2119
|
-
const d = i(o.value?.firstElementChild ?? null);
|
|
2120
|
-
return d ? {
|
|
2121
|
-
getBoundingClientRect: () => d.getBoundingClientRect(),
|
|
2122
|
-
contextElement: d
|
|
2123
|
-
} : null;
|
|
2124
|
-
}), r = B(!1);
|
|
2125
|
-
let c = null;
|
|
2126
|
-
function a() {
|
|
2127
|
-
c !== null && (clearTimeout(c), c = null);
|
|
2122
|
+
setup(e) {
|
|
2123
|
+
const t = e, n = on(), o = Me("triggerWrapper"), i = B(!1);
|
|
2124
|
+
let s = null;
|
|
2125
|
+
function r() {
|
|
2126
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2128
2127
|
}
|
|
2129
|
-
function
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
},
|
|
2128
|
+
function c() {
|
|
2129
|
+
t.isDisabled || t.label && (r(), s = setTimeout(() => {
|
|
2130
|
+
i.value = !0;
|
|
2131
|
+
}, t.openDelay));
|
|
2133
2132
|
}
|
|
2134
|
-
function
|
|
2135
|
-
|
|
2133
|
+
function a() {
|
|
2134
|
+
r(), i.value = !1;
|
|
2136
2135
|
}
|
|
2137
|
-
function u
|
|
2138
|
-
o.value?.contains(
|
|
2136
|
+
function l(u) {
|
|
2137
|
+
o.value?.contains(u.relatedTarget) || c();
|
|
2139
2138
|
}
|
|
2140
|
-
function
|
|
2141
|
-
o.value?.contains(
|
|
2139
|
+
function f(u) {
|
|
2140
|
+
o.value?.contains(u.relatedTarget) || a();
|
|
2142
2141
|
}
|
|
2143
|
-
return
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
"
|
|
2160
|
-
placement: e.placement,
|
|
2161
|
-
"z-index": k(je).tooltip
|
|
2142
|
+
return St(r), (u, p) => (z(), me("div", {
|
|
2143
|
+
ref_key: "triggerWrapper",
|
|
2144
|
+
ref: o,
|
|
2145
|
+
class: "contents",
|
|
2146
|
+
"aria-describedby": i.value ? k(n) : void 0,
|
|
2147
|
+
onMouseover: l,
|
|
2148
|
+
onMouseout: f,
|
|
2149
|
+
onFocusin: c,
|
|
2150
|
+
onFocusout: a,
|
|
2151
|
+
onKeydown: sn(a, ["esc"])
|
|
2152
|
+
}, [
|
|
2153
|
+
Ne(u.$slots, "default"),
|
|
2154
|
+
Tt(k(Zo), {
|
|
2155
|
+
"reference-element": o.value,
|
|
2156
|
+
"is-open": i.value,
|
|
2157
|
+
placement: t.placement,
|
|
2158
|
+
"z-index": k(jt).tooltip
|
|
2162
2159
|
}, {
|
|
2163
|
-
arrow:
|
|
2164
|
-
|
|
2160
|
+
arrow: be(() => [...p[0] || (p[0] = [
|
|
2161
|
+
ue("div", { class: "size-2 rotate-45 bg-gray-900" }, null, -1)
|
|
2165
2162
|
])]),
|
|
2166
|
-
default:
|
|
2167
|
-
|
|
2163
|
+
default: be(() => [
|
|
2164
|
+
ue("div", {
|
|
2168
2165
|
id: k(n),
|
|
2169
2166
|
role: "tooltip",
|
|
2170
2167
|
class: "max-w-xs rounded-lg bg-gray-900 px-3 py-2 shadow-lg"
|
|
2171
2168
|
}, [
|
|
2172
|
-
|
|
2169
|
+
ue("span", ti, Ot(t.label), 1)
|
|
2173
2170
|
], 8, ei)
|
|
2174
2171
|
]),
|
|
2175
2172
|
_: 1
|
|
2176
2173
|
}, 8, ["reference-element", "is-open", "placement", "z-index"])
|
|
2177
|
-
],
|
|
2174
|
+
], 40, Jo));
|
|
2178
2175
|
}
|
|
2179
|
-
}),
|
|
2180
|
-
function
|
|
2181
|
-
|
|
2182
|
-
|
|
2176
|
+
}), wt = ["mdi:", "line-md:"];
|
|
2177
|
+
function ni(e) {
|
|
2178
|
+
e.filter((t) => !!t).forEach((t) => {
|
|
2179
|
+
wt.some((n) => t.startsWith(n)) || console.warn(`[AlpineIcon] "${t}" is not from an allowed collection (${wt.join(", ")}).`);
|
|
2183
2180
|
});
|
|
2184
2181
|
}
|
|
2185
|
-
const
|
|
2182
|
+
const oi = /* @__PURE__ */ ce({
|
|
2186
2183
|
name: "AlpineIcon",
|
|
2187
2184
|
inheritAttrs: !1,
|
|
2188
2185
|
__name: "Icon",
|
|
@@ -2194,8 +2191,8 @@ const ii = /* @__PURE__ */ lt({
|
|
|
2194
2191
|
tooltip: {},
|
|
2195
2192
|
tooltipPosition: { default: "top" }
|
|
2196
2193
|
},
|
|
2197
|
-
setup(
|
|
2198
|
-
const
|
|
2194
|
+
setup(e) {
|
|
2195
|
+
const t = e, n = Et({
|
|
2199
2196
|
variants: {
|
|
2200
2197
|
size: {
|
|
2201
2198
|
xs: "size-3",
|
|
@@ -2207,16 +2204,16 @@ const ii = /* @__PURE__ */ lt({
|
|
|
2207
2204
|
}
|
|
2208
2205
|
}
|
|
2209
2206
|
});
|
|
2210
|
-
|
|
2211
|
-
const o = B(!1), i =
|
|
2212
|
-
return (s, r) => (z(),
|
|
2213
|
-
label:
|
|
2214
|
-
placement:
|
|
2207
|
+
ni([t.icon, t.hoverIcon]);
|
|
2208
|
+
const o = B(!1), i = $e(() => t.isLoading ? It.loader : t.hoverIcon && o.value ? t.hoverIcon : t.icon);
|
|
2209
|
+
return (s, r) => (z(), ge(k(Kt), {
|
|
2210
|
+
label: e.tooltip,
|
|
2211
|
+
placement: e.tooltipPosition
|
|
2215
2212
|
}, {
|
|
2216
|
-
default:
|
|
2217
|
-
|
|
2213
|
+
default: be(() => [
|
|
2214
|
+
Tt(k(io), At(s.$attrs, {
|
|
2218
2215
|
icon: i.value,
|
|
2219
|
-
class: k(n)({ size:
|
|
2216
|
+
class: k(n)({ size: e.size }),
|
|
2220
2217
|
onMouseover: r[0] || (r[0] = (c) => o.value = !0),
|
|
2221
2218
|
onMouseleave: r[1] || (r[1] = (c) => o.value = !1)
|
|
2222
2219
|
}), null, 16, ["icon", "class"])
|
|
@@ -2224,7 +2221,7 @@ const ii = /* @__PURE__ */ lt({
|
|
|
2224
2221
|
_: 1
|
|
2225
2222
|
}, 8, ["label", "placement"]));
|
|
2226
2223
|
}
|
|
2227
|
-
}),
|
|
2224
|
+
}), ii = Et({
|
|
2228
2225
|
base: "rounded-lg flex items-center justify-center gap-2 font-medium transition-all max-w-full border",
|
|
2229
2226
|
variants: {
|
|
2230
2227
|
iconPosition: {
|
|
@@ -2337,10 +2334,10 @@ const ii = /* @__PURE__ */ lt({
|
|
|
2337
2334
|
class: "cursor-pointer"
|
|
2338
2335
|
}
|
|
2339
2336
|
]
|
|
2340
|
-
}),
|
|
2337
|
+
}), si = ["type", "aria-label", "disabled"], ri = {
|
|
2341
2338
|
key: 1,
|
|
2342
2339
|
class: "min-w-0 truncate"
|
|
2343
|
-
},
|
|
2340
|
+
}, hi = /* @__PURE__ */ ce({
|
|
2344
2341
|
name: "AlpineButton",
|
|
2345
2342
|
inheritAttrs: !1,
|
|
2346
2343
|
__name: "Button",
|
|
@@ -2356,58 +2353,58 @@ const ii = /* @__PURE__ */ lt({
|
|
|
2356
2353
|
disabledTooltip: { default: void 0 },
|
|
2357
2354
|
tooltipPosition: { default: "top" }
|
|
2358
2355
|
},
|
|
2359
|
-
setup(
|
|
2360
|
-
const
|
|
2361
|
-
return (i, s) => (z(),
|
|
2362
|
-
label:
|
|
2363
|
-
"is-disabled": !
|
|
2364
|
-
placement:
|
|
2356
|
+
setup(e) {
|
|
2357
|
+
const t = e, n = $e(() => t.isLoading ? It.loader : t.icon), o = $e(() => !t.icon && !t.label ? "-" : t.label);
|
|
2358
|
+
return (i, s) => (z(), ge(k(Kt), {
|
|
2359
|
+
label: e.disabledTooltip,
|
|
2360
|
+
"is-disabled": !t.isDisabled,
|
|
2361
|
+
placement: e.tooltipPosition
|
|
2365
2362
|
}, {
|
|
2366
|
-
default:
|
|
2367
|
-
|
|
2368
|
-
type:
|
|
2369
|
-
"aria-label":
|
|
2370
|
-
class: k(
|
|
2371
|
-
design:
|
|
2372
|
-
iconPosition:
|
|
2373
|
-
isLoading:
|
|
2374
|
-
isDisabled:
|
|
2375
|
-
isDanger:
|
|
2363
|
+
default: be(() => [
|
|
2364
|
+
ue("button", At(i.$attrs, {
|
|
2365
|
+
type: t.type,
|
|
2366
|
+
"aria-label": t.label ?? t.icon ?? "Button without label or icon",
|
|
2367
|
+
class: k(ii)({
|
|
2368
|
+
design: t.design,
|
|
2369
|
+
iconPosition: t.iconPosition,
|
|
2370
|
+
isLoading: t.isLoading,
|
|
2371
|
+
isDisabled: t.isDisabled,
|
|
2372
|
+
isDanger: t.isDanger,
|
|
2376
2373
|
hasLabel: !!o.value
|
|
2377
2374
|
}),
|
|
2378
|
-
disabled:
|
|
2375
|
+
disabled: t.isDisabled || t.isLoading
|
|
2379
2376
|
}), [
|
|
2380
|
-
n.value ? (z(),
|
|
2377
|
+
n.value ? (z(), ge(k(oi), {
|
|
2381
2378
|
key: 0,
|
|
2382
2379
|
"aria-hidden": !0,
|
|
2383
2380
|
icon: n.value,
|
|
2384
2381
|
class: "shrink-0"
|
|
2385
|
-
}, null, 8, ["icon"])) :
|
|
2386
|
-
o.value ? (z(),
|
|
2387
|
-
], 16,
|
|
2382
|
+
}, null, 8, ["icon"])) : ye("", !0),
|
|
2383
|
+
o.value ? (z(), me("span", ri, Ot(o.value), 1)) : ye("", !0)
|
|
2384
|
+
], 16, si)
|
|
2388
2385
|
]),
|
|
2389
2386
|
_: 1
|
|
2390
2387
|
}, 8, ["label", "is-disabled", "placement"]));
|
|
2391
2388
|
}
|
|
2392
2389
|
});
|
|
2393
|
-
function
|
|
2394
|
-
const
|
|
2395
|
-
return
|
|
2396
|
-
r: Number.parseInt(
|
|
2397
|
-
g: Number.parseInt(
|
|
2398
|
-
b: Number.parseInt(
|
|
2390
|
+
function ci(e) {
|
|
2391
|
+
const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
2392
|
+
return t ? {
|
|
2393
|
+
r: Number.parseInt(t[1], 16),
|
|
2394
|
+
g: Number.parseInt(t[2], 16),
|
|
2395
|
+
b: Number.parseInt(t[3], 16)
|
|
2399
2396
|
} : { r: 0, g: 0, b: 0 };
|
|
2400
2397
|
}
|
|
2401
|
-
function
|
|
2402
|
-
const
|
|
2403
|
-
return
|
|
2398
|
+
function Fe(e) {
|
|
2399
|
+
const t = e / 255;
|
|
2400
|
+
return t <= 0.04045 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
|
|
2404
2401
|
}
|
|
2405
|
-
function
|
|
2406
|
-
const { r:
|
|
2402
|
+
function li(e) {
|
|
2403
|
+
const { r: t, g: n, b: o } = ci(e), i = Fe(t), s = Fe(n), r = Fe(o), c = 0.4122214708 * i + 0.5363325363 * s + 0.0514459929 * r, a = 0.2119034982 * i + 0.6806995451 * s + 0.1073969566 * r, l = 0.0883024619 * i + 0.2817188376 * s + 0.6299787005 * r, f = Math.cbrt(c), u = Math.cbrt(a), p = Math.cbrt(l), d = 0.2104542553 * f + 0.793617785 * u - 0.0040720468 * p, h = 1.9779984951 * f - 2.428592205 * u + 0.4505937099 * p, m = 0.0259040371 * f + 0.7827717662 * u - 0.808675766 * p, g = Math.sqrt(h * h + m * m);
|
|
2407
2404
|
let y = Math.atan2(m, h) * 180 / Math.PI;
|
|
2408
2405
|
return y < 0 && (y += 360), { lightness: d, chroma: g, hue: y };
|
|
2409
2406
|
}
|
|
2410
|
-
const
|
|
2407
|
+
const xt = {
|
|
2411
2408
|
50: 1.4208,
|
|
2412
2409
|
100: 1.3779,
|
|
2413
2410
|
200: 1.314,
|
|
@@ -2418,7 +2415,7 @@ const xe = {
|
|
|
2418
2415
|
700: 0.754,
|
|
2419
2416
|
800: 0.6501,
|
|
2420
2417
|
900: 0.5749
|
|
2421
|
-
},
|
|
2418
|
+
}, ai = {
|
|
2422
2419
|
50: 0.0549,
|
|
2423
2420
|
100: 0.135,
|
|
2424
2421
|
200: 0.262,
|
|
@@ -2430,28 +2427,28 @@ const xe = {
|
|
|
2430
2427
|
800: 0.747,
|
|
2431
2428
|
900: 0.595
|
|
2432
2429
|
};
|
|
2433
|
-
function
|
|
2434
|
-
const { lightness:
|
|
2435
|
-
for (const s of Object.keys(
|
|
2436
|
-
const r = Math.min(1, Math.max(0,
|
|
2430
|
+
function fi(e) {
|
|
2431
|
+
const { lightness: t, chroma: n, hue: o } = li(e), i = {};
|
|
2432
|
+
for (const s of Object.keys(xt)) {
|
|
2433
|
+
const r = Math.min(1, Math.max(0, t * xt[s])), c = Math.max(0, n * ai[s]);
|
|
2437
2434
|
i[`--color-accent-${s}`] = `oklch(${(r * 100).toFixed(1)}% ${c.toFixed(3)} ${o.toFixed(1)})`;
|
|
2438
2435
|
}
|
|
2439
2436
|
return i;
|
|
2440
2437
|
}
|
|
2441
|
-
function
|
|
2442
|
-
const
|
|
2443
|
-
for (const [o, i] of Object.entries(
|
|
2438
|
+
function gi(e) {
|
|
2439
|
+
const t = fi(e), n = document.documentElement;
|
|
2440
|
+
for (const [o, i] of Object.entries(t))
|
|
2444
2441
|
n.style.setProperty(o, i);
|
|
2445
2442
|
}
|
|
2446
|
-
function
|
|
2447
|
-
document.documentElement.style.setProperty("--button-text-color",
|
|
2443
|
+
function mi(e) {
|
|
2444
|
+
document.documentElement.style.setProperty("--button-text-color", e);
|
|
2448
2445
|
}
|
|
2449
2446
|
export {
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2447
|
+
hi as AlpineButton,
|
|
2448
|
+
oi as AlpineIcon,
|
|
2449
|
+
Kt as AlpineTooltip,
|
|
2450
|
+
fi as generateAccentScale,
|
|
2451
|
+
pi as iconSizes,
|
|
2452
|
+
gi as setAccentColorTheme,
|
|
2453
|
+
mi as setButtonTextColor
|
|
2457
2454
|
};
|