@vue/devtools-electron 7.3.3 → 7.3.5

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.
@@ -1,2076 +0,0 @@
1
- const ze = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, Ve = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, He = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
2
- function Be(e, t) {
3
- if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
4
- qe(e);
5
- return;
6
- }
7
- return t;
8
- }
9
- function qe(e) {
10
- console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);
11
- }
12
- function Ge(e, t = {}) {
13
- if (typeof e != "string")
14
- return e;
15
- const n = e.trim();
16
- if (
17
- // eslint-disable-next-line unicorn/prefer-at
18
- e[0] === '"' && e.endsWith('"') && !e.includes("\\")
19
- )
20
- return n.slice(1, -1);
21
- if (n.length <= 9) {
22
- const r = n.toLowerCase();
23
- if (r === "true")
24
- return !0;
25
- if (r === "false")
26
- return !1;
27
- if (r === "undefined")
28
- return;
29
- if (r === "null")
30
- return null;
31
- if (r === "nan")
32
- return Number.NaN;
33
- if (r === "infinity")
34
- return Number.POSITIVE_INFINITY;
35
- if (r === "-infinity")
36
- return Number.NEGATIVE_INFINITY;
37
- }
38
- if (!He.test(e)) {
39
- if (t.strict)
40
- throw new SyntaxError("[destr] Invalid JSON");
41
- return e;
42
- }
43
- try {
44
- if (ze.test(e) || Ve.test(e)) {
45
- if (t.strict)
46
- throw new Error("[destr] Possible prototype pollution");
47
- return JSON.parse(e, Be);
48
- }
49
- return JSON.parse(e);
50
- } catch (r) {
51
- if (t.strict)
52
- throw r;
53
- return e;
54
- }
55
- }
56
- const We = /#/g, Je = /&/g, Qe = /\//g, Ke = /=/g, se = /\+/g, Ye = /%5e/gi, Xe = /%60/gi, Ze = /%7c/gi, et = /%20/gi;
57
- function tt(e) {
58
- return encodeURI("" + e).replace(Ze, "|");
59
- }
60
- function te(e) {
61
- return tt(typeof e == "string" ? e : JSON.stringify(e)).replace(se, "%2B").replace(et, "+").replace(We, "%23").replace(Je, "%26").replace(Xe, "`").replace(Ye, "^").replace(Qe, "%2F");
62
- }
63
- function K(e) {
64
- return te(e).replace(Ke, "%3D");
65
- }
66
- function Ee(e = "") {
67
- try {
68
- return decodeURIComponent("" + e);
69
- } catch {
70
- return "" + e;
71
- }
72
- }
73
- function nt(e) {
74
- return Ee(e.replace(se, " "));
75
- }
76
- function rt(e) {
77
- return Ee(e.replace(se, " "));
78
- }
79
- function st(e = "") {
80
- const t = {};
81
- e[0] === "?" && (e = e.slice(1));
82
- for (const n of e.split("&")) {
83
- const r = n.match(/([^=]+)=?(.*)/) || [];
84
- if (r.length < 2)
85
- continue;
86
- const s = nt(r[1]);
87
- if (s === "__proto__" || s === "constructor")
88
- continue;
89
- const o = rt(r[2] || "");
90
- t[s] === void 0 ? t[s] = o : Array.isArray(t[s]) ? t[s].push(o) : t[s] = [t[s], o];
91
- }
92
- return t;
93
- }
94
- function ot(e, t) {
95
- return (typeof t == "number" || typeof t == "boolean") && (t = String(t)), t ? Array.isArray(t) ? t.map((n) => `${K(e)}=${te(n)}`).join("&") : `${K(e)}=${te(t)}` : K(e);
96
- }
97
- function it(e) {
98
- return Object.keys(e).filter((t) => e[t] !== void 0).map((t) => ot(t, e[t])).filter(Boolean).join("&");
99
- }
100
- const at = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/, ct = /^[\s\w\0+.-]{2,}:([/\\]{2})?/, lt = /^([/\\]\s*){2,}[^/\\]/, ut = /\/$|\/\?|\/#/, ft = /^\.?\//;
101
- function ke(e, t = {}) {
102
- return typeof t == "boolean" && (t = { acceptRelative: t }), t.strict ? at.test(e) : ct.test(e) || (t.acceptRelative ? lt.test(e) : !1);
103
- }
104
- function ne(e = "", t) {
105
- return t ? ut.test(e) : e.endsWith("/");
106
- }
107
- function pt(e = "", t) {
108
- if (!t)
109
- return (ne(e) ? e.slice(0, -1) : e) || "/";
110
- if (!ne(e, !0))
111
- return e || "/";
112
- let n = e, r = "";
113
- const s = e.indexOf("#");
114
- s >= 0 && (n = e.slice(0, s), r = e.slice(s));
115
- const [o, ...a] = n.split("?");
116
- return ((o.endsWith("/") ? o.slice(0, -1) : o) || "/") + (a.length > 0 ? `?${a.join("?")}` : "") + r;
117
- }
118
- function dt(e = "", t) {
119
- if (!t)
120
- return e.endsWith("/") ? e : e + "/";
121
- if (ne(e, !0))
122
- return e || "/";
123
- let n = e, r = "";
124
- const s = e.indexOf("#");
125
- if (s >= 0 && (n = e.slice(0, s), r = e.slice(s), !n))
126
- return r;
127
- const [o, ...a] = n.split("?");
128
- return o + "/" + (a.length > 0 ? `?${a.join("?")}` : "") + r;
129
- }
130
- function ht(e, t) {
131
- if (gt(t) || ke(e))
132
- return e;
133
- const n = pt(t);
134
- return e.startsWith(n) ? e : yt(n, e);
135
- }
136
- function mt(e, t) {
137
- const n = Ae(e), r = { ...st(n.search), ...t };
138
- return n.search = it(r), bt(n);
139
- }
140
- function gt(e) {
141
- return !e || e === "/";
142
- }
143
- function _t(e) {
144
- return e && e !== "/";
145
- }
146
- function yt(e, ...t) {
147
- let n = e || "";
148
- for (const r of t.filter((s) => _t(s)))
149
- if (n) {
150
- const s = r.replace(ft, "");
151
- n = dt(n) + s;
152
- } else
153
- n = r;
154
- return n;
155
- }
156
- const $e = Symbol.for("ufo:protocolRelative");
157
- function Ae(e = "", t) {
158
- const n = e.match(
159
- /^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i
160
- );
161
- if (n) {
162
- const [, u, d = ""] = n;
163
- return {
164
- protocol: u.toLowerCase(),
165
- pathname: d,
166
- href: u + d,
167
- auth: "",
168
- host: "",
169
- search: "",
170
- hash: ""
171
- };
172
- }
173
- if (!ke(e, { acceptRelative: !0 }))
174
- return t ? Ae(t + e) : ce(e);
175
- const [, r = "", s, o = ""] = e.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [], [, a = "", l = ""] = o.match(/([^#/?]*)(.*)?/) || [], { pathname: c, search: f, hash: i } = ce(
176
- l.replace(/\/(?=[A-Za-z]:)/, "")
177
- );
178
- return {
179
- protocol: r.toLowerCase(),
180
- auth: s ? s.slice(0, Math.max(0, s.length - 1)) : "",
181
- host: a,
182
- pathname: c,
183
- search: f,
184
- hash: i,
185
- [$e]: !r
186
- };
187
- }
188
- function ce(e = "") {
189
- const [t = "", n = "", r = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
190
- return {
191
- pathname: t,
192
- search: n,
193
- hash: r
194
- };
195
- }
196
- function bt(e) {
197
- const t = e.pathname || "", n = e.search ? (e.search.startsWith("?") ? "" : "?") + e.search : "", r = e.hash || "", s = e.auth ? e.auth + "@" : "", o = e.host || "";
198
- return (e.protocol || e[$e] ? (e.protocol || "") + "//" : "") + s + o + t + n + r;
199
- }
200
- class vt extends Error {
201
- constructor(t, n) {
202
- super(t, n), this.name = "FetchError", n != null && n.cause && !this.cause && (this.cause = n.cause);
203
- }
204
- }
205
- function wt(e) {
206
- var c, f, i, u, d;
207
- const t = ((c = e.error) == null ? void 0 : c.message) || ((f = e.error) == null ? void 0 : f.toString()) || "", n = ((i = e.request) == null ? void 0 : i.method) || ((u = e.options) == null ? void 0 : u.method) || "GET", r = ((d = e.request) == null ? void 0 : d.url) || String(e.request) || "/", s = `[${n}] ${JSON.stringify(r)}`, o = e.response ? `${e.response.status} ${e.response.statusText}` : "<no response>", a = `${s}: ${o}${t ? ` ${t}` : ""}`, l = new vt(
208
- a,
209
- e.error ? { cause: e.error } : void 0
210
- );
211
- for (const m of ["request", "options", "response"])
212
- Object.defineProperty(l, m, {
213
- get() {
214
- return e[m];
215
- }
216
- });
217
- for (const [m, _] of [
218
- ["data", "_data"],
219
- ["status", "status"],
220
- ["statusCode", "status"],
221
- ["statusText", "statusText"],
222
- ["statusMessage", "statusText"]
223
- ])
224
- Object.defineProperty(l, m, {
225
- get() {
226
- return e.response && e.response[_];
227
- }
228
- });
229
- return l;
230
- }
231
- const St = new Set(
232
- Object.freeze(["PATCH", "POST", "PUT", "DELETE"])
233
- );
234
- function le(e = "GET") {
235
- return St.has(e.toUpperCase());
236
- }
237
- function xt(e) {
238
- if (e === void 0)
239
- return !1;
240
- const t = typeof e;
241
- return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t !== "object" ? !1 : Array.isArray(e) ? !0 : e.buffer ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function";
242
- }
243
- const Et = /* @__PURE__ */ new Set([
244
- "image/svg",
245
- "application/xml",
246
- "application/xhtml",
247
- "application/html"
248
- ]), kt = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
249
- function $t(e = "") {
250
- if (!e)
251
- return "json";
252
- const t = e.split(";").shift() || "";
253
- return kt.test(t) ? "json" : Et.has(t) || t.startsWith("text/") ? "text" : "blob";
254
- }
255
- function At(e, t, n = globalThis.Headers) {
256
- const r = {
257
- ...t,
258
- ...e
259
- };
260
- if (t != null && t.params && (e != null && e.params) && (r.params = {
261
- ...t == null ? void 0 : t.params,
262
- ...e == null ? void 0 : e.params
263
- }), t != null && t.query && (e != null && e.query) && (r.query = {
264
- ...t == null ? void 0 : t.query,
265
- ...e == null ? void 0 : e.query
266
- }), t != null && t.headers && (e != null && e.headers)) {
267
- r.headers = new n((t == null ? void 0 : t.headers) || {});
268
- for (const [s, o] of new n((e == null ? void 0 : e.headers) || {}))
269
- r.headers.set(s, o);
270
- }
271
- return r;
272
- }
273
- const Ct = /* @__PURE__ */ new Set([
274
- 408,
275
- // Request Timeout
276
- 409,
277
- // Conflict
278
- 425,
279
- // Too Early
280
- 429,
281
- // Too Many Requests
282
- 500,
283
- // Internal Server Error
284
- 502,
285
- // Bad Gateway
286
- 503,
287
- // Service Unavailable
288
- 504
289
- // Gateway Timeout
290
- ]), Ot = /* @__PURE__ */ new Set([101, 204, 205, 304]);
291
- function Ce(e = {}) {
292
- const {
293
- fetch: t = globalThis.fetch,
294
- Headers: n = globalThis.Headers,
295
- AbortController: r = globalThis.AbortController
296
- } = e;
297
- async function s(l) {
298
- const c = l.error && l.error.name === "AbortError" && !l.options.timeout || !1;
299
- if (l.options.retry !== !1 && !c) {
300
- let i;
301
- typeof l.options.retry == "number" ? i = l.options.retry : i = le(l.options.method) ? 0 : 1;
302
- const u = l.response && l.response.status || 500;
303
- if (i > 0 && (Array.isArray(l.options.retryStatusCodes) ? l.options.retryStatusCodes.includes(u) : Ct.has(u))) {
304
- const d = l.options.retryDelay || 0;
305
- return d > 0 && await new Promise((m) => setTimeout(m, d)), o(l.request, {
306
- ...l.options,
307
- retry: i - 1
308
- });
309
- }
310
- }
311
- const f = wt(l);
312
- throw Error.captureStackTrace && Error.captureStackTrace(f, o), f;
313
- }
314
- const o = async function(c, f = {}) {
315
- var m;
316
- const i = {
317
- request: c,
318
- options: At(f, e.defaults, n),
319
- response: void 0,
320
- error: void 0
321
- };
322
- i.options.method = (m = i.options.method) == null ? void 0 : m.toUpperCase(), i.options.onRequest && await i.options.onRequest(i), typeof i.request == "string" && (i.options.baseURL && (i.request = ht(i.request, i.options.baseURL)), (i.options.query || i.options.params) && (i.request = mt(i.request, {
323
- ...i.options.params,
324
- ...i.options.query
325
- }))), i.options.body && le(i.options.method) && (xt(i.options.body) ? (i.options.body = typeof i.options.body == "string" ? i.options.body : JSON.stringify(i.options.body), i.options.headers = new n(i.options.headers || {}), i.options.headers.has("content-type") || i.options.headers.set("content-type", "application/json"), i.options.headers.has("accept") || i.options.headers.set("accept", "application/json")) : (
326
- // ReadableStream Body
327
- ("pipeTo" in i.options.body && typeof i.options.body.pipeTo == "function" || // Node.js Stream Body
328
- typeof i.options.body.pipe == "function") && ("duplex" in i.options || (i.options.duplex = "half"))
329
- ));
330
- let u;
331
- if (!i.options.signal && i.options.timeout) {
332
- const _ = new r();
333
- u = setTimeout(
334
- () => _.abort(),
335
- i.options.timeout
336
- ), i.options.signal = _.signal;
337
- }
338
- try {
339
- i.response = await t(
340
- i.request,
341
- i.options
342
- );
343
- } catch (_) {
344
- return i.error = _, i.options.onRequestError && await i.options.onRequestError(i), await s(i);
345
- } finally {
346
- u && clearTimeout(u);
347
- }
348
- if (i.response.body && !Ot.has(i.response.status) && i.options.method !== "HEAD") {
349
- const _ = (i.options.parseResponse ? "json" : i.options.responseType) || $t(i.response.headers.get("content-type") || "");
350
- switch (_) {
351
- case "json": {
352
- const y = await i.response.text(), w = i.options.parseResponse || Ge;
353
- i.response._data = w(y);
354
- break;
355
- }
356
- case "stream": {
357
- i.response._data = i.response.body;
358
- break;
359
- }
360
- default:
361
- i.response._data = await i.response[_]();
362
- }
363
- }
364
- return i.options.onResponse && await i.options.onResponse(i), !i.options.ignoreResponseError && i.response.status >= 400 && i.response.status < 600 ? (i.options.onResponseError && await i.options.onResponseError(i), await s(i)) : i.response;
365
- }, a = async function(c, f) {
366
- return (await o(c, f))._data;
367
- };
368
- return a.raw = o, a.native = (...l) => t(...l), a.create = (l = {}) => Ce({
369
- ...e,
370
- defaults: {
371
- ...e.defaults,
372
- ...l
373
- }
374
- }), a;
375
- }
376
- const oe = function() {
377
- if (typeof globalThis < "u")
378
- return globalThis;
379
- if (typeof self < "u")
380
- return self;
381
- if (typeof window < "u")
382
- return window;
383
- if (typeof global < "u")
384
- return global;
385
- throw new Error("unable to locate global object");
386
- }(), Rt = oe.fetch || (() => Promise.reject(new Error("[ofetch] global.fetch is not supported!"))), Tt = oe.Headers, jt = oe.AbortController, Mt = Ce({ fetch: Rt, Headers: Tt, AbortController: jt }), Lt = Mt;
387
- function Ut(e) {
388
- const t = e.length;
389
- let n = -1, r, s = "";
390
- const o = e.charCodeAt(0);
391
- for (; ++n < t; ) {
392
- if (r = e.charCodeAt(n), r === 0) {
393
- s += "�";
394
- continue;
395
- }
396
- if (r === 37) {
397
- s += "\\%";
398
- continue;
399
- }
400
- if (r === 44) {
401
- s += "\\,";
402
- continue;
403
- }
404
- if (
405
- // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
406
- // U+007F, […]
407
- r >= 1 && r <= 31 || r === 127 || n === 0 && r >= 48 && r <= 57 || n === 1 && r >= 48 && r <= 57 && o === 45
408
- ) {
409
- s += `\\${r.toString(16)} `;
410
- continue;
411
- }
412
- if (
413
- // If the character is the first character and is a `-` (U+002D), and
414
- // there is no second character, […]
415
- n === 0 && t === 1 && r === 45
416
- ) {
417
- s += `\\${e.charAt(n)}`;
418
- continue;
419
- }
420
- if (r >= 128 || r === 45 || r === 95 || r >= 48 && r <= 57 || r >= 65 && r <= 90 || r >= 97 && r <= 122) {
421
- s += e.charAt(n);
422
- continue;
423
- }
424
- s += `\\${e.charAt(n)}`;
425
- }
426
- return s;
427
- }
428
- const Y = Ut;
429
- function U(e = []) {
430
- return Array.isArray(e) ? e : [e];
431
- }
432
- function J(e) {
433
- return Array.from(new Set(e));
434
- }
435
- function Pt(e, t) {
436
- return e.reduce((n, r) => (n.findIndex((o) => t(r, o)) === -1 && n.push(r), n), []);
437
- }
438
- function M(e) {
439
- return typeof e == "string";
440
- }
441
- function H(e) {
442
- return M(e) ? e : (Array.isArray(e) ? e : Object.entries(e)).filter((t) => t[1] != null);
443
- }
444
- function Nt(e) {
445
- return Array.isArray(e) ? e.find((t) => !Array.isArray(t) || Array.isArray(t[0])) ? e.map((t) => H(t)) : [e] : [H(e)];
446
- }
447
- function Dt(e) {
448
- return e.filter(([t, n], r) => {
449
- if (t.startsWith("$$"))
450
- return !1;
451
- for (let s = r - 1; s >= 0; s--)
452
- if (e[s][0] === t && e[s][1] === n)
453
- return !1;
454
- return !0;
455
- });
456
- }
457
- function X(e) {
458
- return e == null ? "" : Dt(e).map(([t, n]) => n != null ? `${t}:${n};` : void 0).filter(Boolean).join("");
459
- }
460
- function B(e) {
461
- return e && typeof e == "object" && !Array.isArray(e);
462
- }
463
- function Oe(e, t, n = !1) {
464
- const r = e, s = t;
465
- if (Array.isArray(s))
466
- return n && Array.isArray(s) ? [...r, ...s] : [...s];
467
- const o = { ...r };
468
- return B(r) && B(s) && Object.keys(s).forEach((a) => {
469
- B(r[a]) && B(s[a]) || Array.isArray(r[a]) && Array.isArray(s[a]) ? o[a] = Oe(r[a], s[a], n) : Object.assign(o, { [a]: s[a] });
470
- }), o;
471
- }
472
- function G(e) {
473
- let t, n, r;
474
- if (Array.isArray(e)) {
475
- for (n = Array(t = e.length); t--; )
476
- n[t] = (r = e[t]) && typeof r == "object" ? G(r) : r;
477
- return n;
478
- }
479
- if (Object.prototype.toString.call(e) === "[object Object]") {
480
- n = {};
481
- for (t in e)
482
- t === "__proto__" ? Object.defineProperty(n, t, {
483
- value: G(e[t]),
484
- configurable: !0,
485
- enumerable: !0,
486
- writable: !0
487
- }) : n[t] = (r = e[t]) && typeof r == "object" ? G(r) : r;
488
- return n;
489
- }
490
- return e;
491
- }
492
- function It(e) {
493
- return M(e[0]);
494
- }
495
- function Ft(e) {
496
- return M(e[0]);
497
- }
498
- function zt(e) {
499
- return typeof e == "function" ? { match: e } : e;
500
- }
501
- function ue(e) {
502
- return e.length === 3;
503
- }
504
- function fe(e) {
505
- return e != null;
506
- }
507
- function Vt() {
508
- }
509
- var Ht = Object.defineProperty, Bt = (e, t, n) => t in e ? Ht(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, qt = (e, t, n) => (Bt(e, t + "", n), n);
510
- class Gt {
511
- constructor() {
512
- qt(this, "_map", /* @__PURE__ */ new Map());
513
- }
514
- get(t, n) {
515
- const r = this._map.get(t);
516
- if (r)
517
- return r.get(n);
518
- }
519
- getFallback(t, n, r) {
520
- let s = this._map.get(t);
521
- return s || (s = /* @__PURE__ */ new Map(), this._map.set(t, s)), s.has(n) || s.set(n, r), s.get(n);
522
- }
523
- set(t, n, r) {
524
- let s = this._map.get(t);
525
- return s || (s = /* @__PURE__ */ new Map(), this._map.set(t, s)), s.set(n, r), this;
526
- }
527
- has(t, n) {
528
- var r;
529
- return (r = this._map.get(t)) == null ? void 0 : r.has(n);
530
- }
531
- delete(t, n) {
532
- var r;
533
- return ((r = this._map.get(t)) == null ? void 0 : r.delete(n)) || !1;
534
- }
535
- deleteTop(t) {
536
- return this._map.delete(t);
537
- }
538
- map(t) {
539
- return Array.from(this._map.entries()).flatMap(([n, r]) => Array.from(r.entries()).map(([s, o]) => t(o, n, s)));
540
- }
541
- }
542
- class Wt extends Map {
543
- getFallback(t, n) {
544
- const r = this.get(t);
545
- return r === void 0 ? (this.set(t, n), n) : r;
546
- }
547
- map(t) {
548
- const n = [];
549
- return this.forEach((r, s) => {
550
- n.push(t(r, s));
551
- }), n;
552
- }
553
- flatMap(t) {
554
- const n = [];
555
- return this.forEach((r, s) => {
556
- n.push(...t(r, s));
557
- }), n;
558
- }
559
- }
560
- var Jt = Object.defineProperty, Qt = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Kt = (e, t, n) => (Qt(e, t + "", n), n);
561
- class Re extends Set {
562
- constructor(t) {
563
- super(t), Kt(this, "_map"), this._map ?? (this._map = /* @__PURE__ */ new Map());
564
- }
565
- add(t) {
566
- return this._map ?? (this._map = /* @__PURE__ */ new Map()), this._map.set(t, (this._map.get(t) ?? 0) + 1), super.add(t);
567
- }
568
- delete(t) {
569
- return this._map.delete(t), super.delete(t);
570
- }
571
- clear() {
572
- this._map.clear(), super.clear();
573
- }
574
- getCount(t) {
575
- return this._map.get(t) ?? 0;
576
- }
577
- setCount(t, n) {
578
- return this._map.set(t, n), super.add(t);
579
- }
580
- }
581
- function Z(e) {
582
- return e instanceof Re;
583
- }
584
- const q = {};
585
- function Yt(e = ["-", ":"]) {
586
- const t = e.join("|");
587
- return q[t] || (q[t] = new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`, "gm")), q[t].lastIndex = 0, q[t];
588
- }
589
- function Xt(e, t = ["-", ":"], n = 5) {
590
- const r = Yt(t);
591
- let s, o = e.toString();
592
- const a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
593
- do
594
- s = !1, o = o.replace(
595
- r,
596
- (f, i, u, d, m) => {
597
- var w;
598
- if (!t.includes(u))
599
- return f;
600
- s = !0, a.add(i + u);
601
- const _ = m + i.length + u.length + 1, y = { length: f.length, items: [] };
602
- l.set(m, y);
603
- for (const E of [...d.matchAll(/\S+/g)]) {
604
- const $ = _ + E.index;
605
- let h = (w = l.get($)) == null ? void 0 : w.items;
606
- h ? l.delete($) : h = [{
607
- offset: $,
608
- length: E[0].length,
609
- className: E[0]
610
- }];
611
- for (const g of h)
612
- g.className = g.className === "~" ? i : g.className.replace(/^(!?)(.*)/, `$1${i}${u}$2`), y.items.push(g);
613
- }
614
- return "$".repeat(f.length);
615
- }
616
- ), n -= 1;
617
- while (s && n);
618
- let c;
619
- if (typeof e == "string") {
620
- c = "";
621
- let f = 0;
622
- for (const [i, u] of l)
623
- c += e.slice(f, i), c += u.items.map((d) => d.className).join(" "), f = i + u.length;
624
- c += e.slice(f);
625
- } else {
626
- c = e;
627
- for (const [f, i] of l)
628
- c.overwrite(
629
- f,
630
- f + i.length,
631
- i.items.map((u) => u.className).join(" ")
632
- );
633
- }
634
- return {
635
- prefixes: Array.from(a),
636
- hasChanged: s,
637
- groupsByOffset: l,
638
- // Computed lazily because MagicString's toString does a lot of work
639
- get expanded() {
640
- return c.toString();
641
- }
642
- };
643
- }
644
- function Zt(e, t = ["-", ":"], n = 5) {
645
- const r = Xt(e, t, n);
646
- return typeof e == "string" ? r.expanded : e;
647
- }
648
- const pe = /* @__PURE__ */ new Set();
649
- function Te(e) {
650
- pe.has(e) || (console.warn("[unocss]", e), pe.add(e));
651
- }
652
- const en = /[\\:]?[\s'"`;{}]+/g;
653
- function tn(e) {
654
- return e.split(en);
655
- }
656
- const nn = {
657
- name: "@unocss/core/extractor-split",
658
- order: 0,
659
- extract({ code: e }) {
660
- return tn(e);
661
- }
662
- };
663
- function rn() {
664
- return {
665
- events: {},
666
- emit(e, ...t) {
667
- (this.events[e] || []).forEach((n) => n(...t));
668
- },
669
- on(e, t) {
670
- return (this.events[e] = this.events[e] || []).push(t), () => this.events[e] = (this.events[e] || []).filter((n) => n !== t);
671
- }
672
- };
673
- }
674
- const W = "default", re = "preflights", sn = "shortcuts", on = "imports", an = {
675
- [on]: -200,
676
- [re]: -100,
677
- [sn]: -10,
678
- [W]: 0
679
- };
680
- function je(e) {
681
- return U(e).flatMap((t) => Array.isArray(t) ? [t] : Object.entries(t));
682
- }
683
- const de = "_uno_resolved";
684
- function cn(e) {
685
- var r;
686
- let t = typeof e == "function" ? e() : e;
687
- if (de in t)
688
- return t;
689
- t = { ...t }, Object.defineProperty(t, de, {
690
- value: !0,
691
- enumerable: !1
692
- });
693
- const n = t.shortcuts ? je(t.shortcuts) : void 0;
694
- if (t.shortcuts = n, t.prefix || t.layer) {
695
- const s = (o) => {
696
- o[2] || (o[2] = {});
697
- const a = o[2];
698
- a.prefix == null && t.prefix && (a.prefix = U(t.prefix)), a.layer == null && t.layer && (a.layer = t.layer);
699
- };
700
- n == null || n.forEach(s), (r = t.rules) == null || r.forEach(s);
701
- }
702
- return t;
703
- }
704
- function Me(e) {
705
- const t = cn(e);
706
- if (!t.presets)
707
- return [t];
708
- const n = (t.presets || []).flatMap(U).flatMap(Me);
709
- return [t, ...n];
710
- }
711
- function he(e = {}, t = {}) {
712
- var g, b;
713
- const n = Object.assign({}, t, e), r = Pt((n.presets || []).flatMap(U).flatMap(Me), (p, S) => p.name === S.name), s = [
714
- ...r.filter((p) => p.enforce === "pre"),
715
- ...r.filter((p) => !p.enforce),
716
- ...r.filter((p) => p.enforce === "post")
717
- ], o = [
718
- ...s,
719
- n
720
- ], a = [...o].reverse(), l = Object.assign({}, an, ...o.map((p) => p.layers));
721
- function c(p) {
722
- return J(o.flatMap((S) => U(S[p] || [])));
723
- }
724
- const f = c("extractors");
725
- let i = (g = a.find((p) => p.extractorDefault !== void 0)) == null ? void 0 : g.extractorDefault;
726
- i === void 0 && (i = nn), i && !f.includes(i) && f.unshift(i), f.sort((p, S) => (p.order || 0) - (S.order || 0));
727
- const u = c("rules"), d = {}, m = u.length, _ = u.map((p, S) => {
728
- var C;
729
- if (It(p)) {
730
- U(((C = p[2]) == null ? void 0 : C.prefix) || "").forEach((R) => {
731
- d[R + p[0]] = [S, p[1], p[2], p];
732
- });
733
- return;
734
- }
735
- return [S, ...p];
736
- }).filter(Boolean).reverse();
737
- let y = ln(o.map((p) => p.theme));
738
- const w = c("extendTheme");
739
- for (const p of w)
740
- y = p(y) || y;
741
- const E = {
742
- templates: J(o.flatMap((p) => {
743
- var S;
744
- return U((S = p.autocomplete) == null ? void 0 : S.templates);
745
- })),
746
- extractors: o.flatMap((p) => {
747
- var S;
748
- return U((S = p.autocomplete) == null ? void 0 : S.extractors);
749
- }).sort((p, S) => (p.order || 0) - (S.order || 0)),
750
- shorthands: un(o.map((p) => {
751
- var S;
752
- return ((S = p.autocomplete) == null ? void 0 : S.shorthands) || {};
753
- }))
754
- };
755
- let $ = c("separators");
756
- $.length || ($ = [":", "-"]);
757
- const h = {
758
- mergeSelectors: !0,
759
- warn: !0,
760
- sortLayers: (p) => p,
761
- ...n,
762
- blocklist: c("blocklist"),
763
- presets: s,
764
- envMode: n.envMode || "build",
765
- shortcutsLayer: n.shortcutsLayer || "shortcuts",
766
- layers: l,
767
- theme: y,
768
- rulesSize: m,
769
- rulesDynamic: _,
770
- rulesStaticMap: d,
771
- preprocess: c("preprocess"),
772
- postprocess: c("postprocess"),
773
- preflights: c("preflights"),
774
- autocomplete: E,
775
- variants: c("variants").map(zt).sort((p, S) => (p.order || 0) - (S.order || 0)),
776
- shortcuts: je(c("shortcuts")).reverse(),
777
- extractors: f,
778
- safelist: c("safelist"),
779
- separators: $,
780
- details: n.details ?? n.envMode === "dev"
781
- };
782
- for (const p of o)
783
- (b = p == null ? void 0 : p.configResolved) == null || b.call(p, h);
784
- return h;
785
- }
786
- function ln(e) {
787
- return e.map((t) => t ? G(t) : {}).reduce((t, n) => Oe(t, n), {});
788
- }
789
- function un(e) {
790
- return e.reduce((t, n) => {
791
- const r = {};
792
- for (const s in n) {
793
- const o = n[s];
794
- Array.isArray(o) ? r[s] = `(${o.join("|")})` : r[s] = o;
795
- }
796
- return {
797
- ...t,
798
- ...r
799
- };
800
- }, {});
801
- }
802
- const fn = "0.61.0";
803
- var pn = Object.defineProperty, dn = (e, t, n) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, D = (e, t, n) => (dn(e, typeof t != "symbol" ? t + "" : t, n), n);
804
- const I = {
805
- shortcutsNoMerge: "$$symbol-shortcut-no-merge",
806
- variants: "$$symbol-variants",
807
- parent: "$$symbol-parent",
808
- selector: "$$symbol-selector"
809
- };
810
- class hn {
811
- constructor(t = {}, n = {}) {
812
- this.userConfig = t, this.defaults = n, D(this, "version", fn), D(this, "_cache", /* @__PURE__ */ new Map()), D(this, "config"), D(this, "blocked", /* @__PURE__ */ new Set()), D(this, "parentOrders", /* @__PURE__ */ new Map()), D(this, "events", rn()), this.config = he(t, n), this.events.emit("config", this.config);
813
- }
814
- setConfig(t, n) {
815
- t && (n && (this.defaults = n), this.userConfig = t, this.blocked.clear(), this.parentOrders.clear(), this._cache.clear(), this.config = he(t, this.defaults), this.events.emit("config", this.config));
816
- }
817
- async applyExtractors(t, n, r = /* @__PURE__ */ new Set()) {
818
- var o;
819
- const s = {
820
- original: t,
821
- code: t,
822
- id: n,
823
- extracted: r,
824
- envMode: this.config.envMode
825
- };
826
- for (const a of this.config.extractors) {
827
- const l = await ((o = a.extract) == null ? void 0 : o.call(a, s));
828
- if (l)
829
- if (Z(l) && Z(r))
830
- for (const c of l)
831
- r.setCount(c, r.getCount(c) + l.getCount(c));
832
- else
833
- for (const c of l)
834
- r.add(c);
835
- }
836
- return r;
837
- }
838
- makeContext(t, n) {
839
- const r = {
840
- rawSelector: t,
841
- currentSelector: n[1],
842
- theme: this.config.theme,
843
- generator: this,
844
- symbols: I,
845
- variantHandlers: n[2],
846
- constructCSS: (...s) => this.constructCustomCSS(r, ...s),
847
- variantMatch: n
848
- };
849
- return r;
850
- }
851
- async parseToken(t, n) {
852
- var f;
853
- if (this.blocked.has(t))
854
- return;
855
- const r = `${t}${n ? ` ${n}` : ""}`;
856
- if (this._cache.has(r))
857
- return this._cache.get(r);
858
- let s = t;
859
- for (const i of this.config.preprocess)
860
- s = i(t);
861
- if (this.isBlocked(s)) {
862
- this.blocked.add(t), this._cache.set(r, null);
863
- return;
864
- }
865
- const o = await this.matchVariants(t, s);
866
- if (!o || this.isBlocked(o[1])) {
867
- this.blocked.add(t), this._cache.set(r, null);
868
- return;
869
- }
870
- const a = this.makeContext(t, [n || o[0], o[1], o[2], o[3]]);
871
- this.config.details && (a.variants = [...o[3]]);
872
- const l = await this.expandShortcut(a.currentSelector, a), c = l ? await this.stringifyShortcuts(a.variantMatch, a, l[0], l[1]) : (f = await this.parseUtil(a.variantMatch, a)) == null ? void 0 : f.map((i) => this.stringifyUtil(i, a)).filter(fe);
873
- if (c != null && c.length)
874
- return this._cache.set(r, c), c;
875
- this._cache.set(r, null);
876
- }
877
- async generate(t, n = {}) {
878
- const {
879
- id: r,
880
- scope: s,
881
- preflights: o = !0,
882
- safelist: a = !0,
883
- minify: l = !1,
884
- extendedInfo: c = !1
885
- } = n, f = this.config.outputToCssLayers, i = M(t) ? await this.applyExtractors(
886
- t,
887
- r,
888
- c ? new Re() : /* @__PURE__ */ new Set()
889
- ) : Array.isArray(t) ? new Set(t) : t;
890
- if (a) {
891
- const b = {
892
- generator: this,
893
- theme: this.config.theme
894
- };
895
- this.config.safelist.flatMap((p) => typeof p == "function" ? p(b) : p).forEach((p) => {
896
- i.has(p) || i.add(p);
897
- });
898
- }
899
- const u = l ? "" : `
900
- `, d = /* @__PURE__ */ new Set([W]), m = c ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Map();
901
- let y = {};
902
- const w = Array.from(i).map(async (b) => {
903
- var S;
904
- if (m.has(b))
905
- return;
906
- const p = await this.parseToken(b);
907
- if (p != null) {
908
- m instanceof Map ? m.set(b, {
909
- data: p,
910
- count: Z(i) ? i.getCount(b) : -1
911
- }) : m.add(b);
912
- for (const C of p) {
913
- const A = C[3] || "", R = (S = C[4]) == null ? void 0 : S.layer;
914
- _.has(A) || _.set(A, []), _.get(A).push(C), R && d.add(R);
915
- }
916
- }
917
- });
918
- await Promise.all(w), await (async () => {
919
- if (!o)
920
- return;
921
- const b = {
922
- generator: this,
923
- theme: this.config.theme
924
- }, p = /* @__PURE__ */ new Set([]);
925
- this.config.preflights.forEach(({ layer: S = re }) => {
926
- d.add(S), p.add(S);
927
- }), y = Object.fromEntries(
928
- await Promise.all(Array.from(p).map(
929
- async (S) => {
930
- const A = (await Promise.all(
931
- this.config.preflights.filter((R) => (R.layer || re) === S).map(async (R) => await R.getCSS(b))
932
- )).filter(Boolean).join(u);
933
- return [S, A];
934
- }
935
- ))
936
- );
937
- })();
938
- const E = this.config.sortLayers(Array.from(d).sort((b, p) => (this.config.layers[b] ?? 0) - (this.config.layers[p] ?? 0) || b.localeCompare(p))), $ = {}, h = (b = W) => {
939
- var C;
940
- if ($[b])
941
- return $[b];
942
- let p = Array.from(_).sort((A, R) => {
943
- var P;
944
- return (this.parentOrders.get(A[0]) ?? 0) - (this.parentOrders.get(R[0]) ?? 0) || ((P = A[0]) == null ? void 0 : P.localeCompare(R[0] || "")) || 0;
945
- }).map(([A, R]) => {
946
- const P = R.length, N = R.filter((O) => {
947
- var v;
948
- return (((v = O[4]) == null ? void 0 : v.layer) || W) === b;
949
- }).sort((O, v) => {
950
- var x, k, L, T, j, V, ae;
951
- return O[0] - v[0] || (((x = O[4]) == null ? void 0 : x.sort) || 0) - (((k = v[4]) == null ? void 0 : k.sort) || 0) || ((j = (L = O[5]) == null ? void 0 : L.currentSelector) == null ? void 0 : j.localeCompare(((T = v[5]) == null ? void 0 : T.currentSelector) ?? "")) || ((V = O[1]) == null ? void 0 : V.localeCompare(v[1] || "")) || ((ae = O[2]) == null ? void 0 : ae.localeCompare(v[2] || "")) || 0;
952
- }).map(([, O, v, , x, , k]) => [
953
- [[(O && _n(O, s)) ?? "", (x == null ? void 0 : x.sort) ?? 0]],
954
- v,
955
- !!(k ?? (x == null ? void 0 : x.noMerge))
956
- ]);
957
- if (!N.length)
958
- return;
959
- const F = N.reverse().map(([O, v, x], k) => {
960
- if (!x && this.config.mergeSelectors)
961
- for (let T = k + 1; T < P; T++) {
962
- const j = N[T];
963
- if (j && !j[2] && (O && j[0] || O == null && j[0] == null) && j[1] === v)
964
- return O && j[0] && j[0].push(...O), null;
965
- }
966
- const L = O ? J(O.sort((T, j) => {
967
- var V;
968
- return T[1] - j[1] || ((V = T[0]) == null ? void 0 : V.localeCompare(j[0] || "")) || 0;
969
- }).map((T) => T[0]).filter(Boolean)) : [];
970
- return L.length ? `${L.join(`,${u}`)}{${v}}` : v;
971
- }).filter(Boolean).reverse().join(u);
972
- if (!A)
973
- return F;
974
- const z = A.split(" $$ ");
975
- return `${z.join("{")}{${u}${F}${u}${"}".repeat(z.length)}`;
976
- }).filter(Boolean).join(u);
977
- if (o && (p = [y[b], p].filter(Boolean).join(u)), f && p) {
978
- let A = typeof f == "object" ? (C = f.cssLayerName) == null ? void 0 : C.call(f, b) : void 0;
979
- A !== null && (A || (A = b), p = `@layer ${A}{${u}${p}${u}}`);
980
- }
981
- const S = l ? "" : `/* layer: ${b} */${u}`;
982
- return $[b] = p ? S + p : "";
983
- }, g = (b = E, p) => b.filter((S) => !(p != null && p.includes(S))).map((S) => h(S) || "").filter(Boolean).join(u);
984
- return {
985
- get css() {
986
- return g();
987
- },
988
- layers: E,
989
- matched: m,
990
- getLayers: g,
991
- getLayer: h
992
- };
993
- }
994
- async matchVariants(t, n) {
995
- const r = /* @__PURE__ */ new Set(), s = [];
996
- let o = n || t, a = !0;
997
- const l = {
998
- rawSelector: t,
999
- theme: this.config.theme,
1000
- generator: this
1001
- };
1002
- for (; a; ) {
1003
- a = !1;
1004
- for (const c of this.config.variants) {
1005
- if (!c.multiPass && r.has(c))
1006
- continue;
1007
- let f = await c.match(o, l);
1008
- if (f) {
1009
- if (M(f)) {
1010
- if (f === o)
1011
- continue;
1012
- f = { matcher: f };
1013
- }
1014
- o = f.matcher ?? o, s.unshift(f), r.add(c), a = !0;
1015
- break;
1016
- }
1017
- }
1018
- if (!a)
1019
- break;
1020
- if (s.length > 500)
1021
- throw new Error(`Too many variants applied to "${t}"`);
1022
- }
1023
- return [t, o, s, r];
1024
- }
1025
- applyVariants(t, n = t[4], r = t[1]) {
1026
- const o = n.slice().sort((f, i) => (f.order || 0) - (i.order || 0)).reduceRight(
1027
- (f, i) => (u) => {
1028
- var _, y;
1029
- const d = ((_ = i.body) == null ? void 0 : _.call(i, u.entries)) || u.entries, m = Array.isArray(i.parent) ? i.parent : [i.parent, void 0];
1030
- return (i.handle ?? bn)({
1031
- ...u,
1032
- entries: d,
1033
- selector: ((y = i.selector) == null ? void 0 : y.call(i, u.selector, d)) || u.selector,
1034
- parent: m[0] || u.parent,
1035
- parentOrder: m[1] || u.parentOrder,
1036
- layer: i.layer || u.layer,
1037
- sort: i.sort || u.sort
1038
- }, f);
1039
- },
1040
- (f) => f
1041
- )({
1042
- prefix: "",
1043
- selector: yn(r),
1044
- pseudo: "",
1045
- entries: t[2]
1046
- }), { parent: a, parentOrder: l } = o;
1047
- a != null && l != null && this.parentOrders.set(a, l);
1048
- const c = {
1049
- selector: [
1050
- o.prefix,
1051
- o.selector,
1052
- o.pseudo
1053
- ].join(""),
1054
- entries: o.entries,
1055
- parent: a,
1056
- layer: o.layer,
1057
- sort: o.sort,
1058
- noMerge: o.noMerge
1059
- };
1060
- for (const f of this.config.postprocess)
1061
- f(c);
1062
- return c;
1063
- }
1064
- constructCustomCSS(t, n, r) {
1065
- const s = H(n);
1066
- if (M(s))
1067
- return s;
1068
- const { selector: o, entries: a, parent: l } = this.applyVariants([0, r || t.rawSelector, s, void 0, t.variantHandlers]), c = `${o}{${X(a)}}`;
1069
- return l ? `${l}{${c}}` : c;
1070
- }
1071
- async parseUtil(t, n, r = !1, s) {
1072
- var i;
1073
- const [o, a, l] = M(t) ? await this.matchVariants(t) : t;
1074
- this.config.details && (n.rules = n.rules ?? []);
1075
- const c = this.config.rulesStaticMap[a];
1076
- if (c && c[1] && (r || !((i = c[2]) != null && i.internal))) {
1077
- this.config.details && n.rules.push(c[3]);
1078
- const u = c[0], d = H(c[1]), m = c[2];
1079
- return M(d) ? [[u, d, m]] : [[u, o, d, m, l]];
1080
- }
1081
- n.variantHandlers = l;
1082
- const { rulesDynamic: f } = this.config;
1083
- for (const [u, d, m, _] of f) {
1084
- if (_ != null && _.internal && !r)
1085
- continue;
1086
- let y = a;
1087
- if (_ != null && _.prefix) {
1088
- const h = U(_.prefix);
1089
- if (s) {
1090
- const g = U(s);
1091
- if (!h.some((b) => g.includes(b)))
1092
- continue;
1093
- } else {
1094
- const g = h.find((b) => a.startsWith(b));
1095
- if (g == null)
1096
- continue;
1097
- y = a.slice(g.length);
1098
- }
1099
- }
1100
- const w = y.match(d);
1101
- if (!w)
1102
- continue;
1103
- let E = await m(w, n);
1104
- if (!E)
1105
- continue;
1106
- if (this.config.details && n.rules.push([d, m, _]), typeof E != "string")
1107
- if (Symbol.asyncIterator in E) {
1108
- const h = [];
1109
- for await (const g of E)
1110
- g && h.push(g);
1111
- E = h;
1112
- } else Symbol.iterator in E && !Array.isArray(E) && (E = Array.from(E).filter(fe));
1113
- const $ = Nt(E).filter((h) => h.length);
1114
- if ($.length)
1115
- return $.map((h) => {
1116
- if (M(h))
1117
- return [u, h, _];
1118
- let g = l;
1119
- for (const b of h)
1120
- b[0] === I.variants ? g = [
1121
- ...U(b[1]),
1122
- ...g
1123
- ] : b[0] === I.parent ? g = [
1124
- { parent: b[1] },
1125
- ...g
1126
- ] : b[0] === I.selector && (g = [
1127
- { selector: b[1] },
1128
- ...g
1129
- ]);
1130
- return [u, o, h, _, g];
1131
- });
1132
- }
1133
- }
1134
- stringifyUtil(t, n) {
1135
- if (!t)
1136
- return;
1137
- if (ue(t))
1138
- return [t[0], void 0, t[1], void 0, t[2], this.config.details ? n : void 0, void 0];
1139
- const {
1140
- selector: r,
1141
- entries: s,
1142
- parent: o,
1143
- layer: a,
1144
- sort: l,
1145
- noMerge: c
1146
- } = this.applyVariants(t), f = X(s);
1147
- if (!f)
1148
- return;
1149
- const { layer: i, sort: u, ...d } = t[3] ?? {}, m = {
1150
- ...d,
1151
- layer: a ?? i,
1152
- sort: l ?? u
1153
- };
1154
- return [t[0], r, f, o, m, this.config.details ? n : void 0, c];
1155
- }
1156
- async expandShortcut(t, n, r = 5) {
1157
- var l;
1158
- if (r === 0)
1159
- return;
1160
- const s = this.config.details ? (c) => {
1161
- n.shortcuts = n.shortcuts ?? [], n.shortcuts.push(c);
1162
- } : Vt;
1163
- let o, a;
1164
- for (const c of this.config.shortcuts) {
1165
- let f = t;
1166
- if ((l = c[2]) != null && l.prefix) {
1167
- const u = U(c[2].prefix).find((d) => t.startsWith(d));
1168
- if (u == null)
1169
- continue;
1170
- f = t.slice(u.length);
1171
- }
1172
- if (Ft(c)) {
1173
- if (c[0] === f) {
1174
- o = o || c[2], a = c[1], s(c);
1175
- break;
1176
- }
1177
- } else {
1178
- const i = f.match(c[0]);
1179
- if (i && (a = c[1](i, n)), a) {
1180
- o = o || c[2], s(c);
1181
- break;
1182
- }
1183
- }
1184
- }
1185
- if (M(a) && (a = Zt(a.trim()).split(/\s+/g)), !a) {
1186
- const [c, f] = M(t) ? await this.matchVariants(t) : t;
1187
- if (c !== f) {
1188
- const i = await this.expandShortcut(f, n, r - 1);
1189
- i && (a = i[0].map((u) => M(u) ? c.replace(f, u) : u));
1190
- }
1191
- }
1192
- if (a)
1193
- return [
1194
- (await Promise.all(a.map(async (c) => {
1195
- var f;
1196
- return (M(c) ? (f = await this.expandShortcut(c, n, r - 1)) == null ? void 0 : f[0] : void 0) || [c];
1197
- }))).flat(1).filter(Boolean),
1198
- o
1199
- ];
1200
- }
1201
- async stringifyShortcuts(t, n, r, s = { layer: this.config.shortcutsLayer }) {
1202
- var i;
1203
- const o = new Wt(), a = (await Promise.all(J(r).map(async (u) => {
1204
- const d = M(u) ? await this.parseUtil(u, n, !0, s.prefix) : [[Number.POSITIVE_INFINITY, "{inline}", H(u), void 0, []]];
1205
- return !d && this.config.warn && Te(`unmatched utility "${u}" in shortcut "${t[1]}"`), d || [];
1206
- }))).flat(1).filter(Boolean).sort((u, d) => u[0] - d[0]), [l, , c] = t, f = [];
1207
- for (const u of a) {
1208
- if (ue(u)) {
1209
- f.push([u[0], void 0, u[1], void 0, u[2], n, void 0]);
1210
- continue;
1211
- }
1212
- const { selector: d, entries: m, parent: _, sort: y, noMerge: w, layer: E } = this.applyVariants(u, [...u[4], ...c], l);
1213
- o.getFallback(E ?? s.layer, new Gt()).getFallback(d, _, [[], u[0]])[0].push([m, !!(w ?? ((i = u[3]) == null ? void 0 : i.noMerge)), y ?? 0]);
1214
- }
1215
- return f.concat(o.flatMap(
1216
- (u, d) => u.map(([m, _], y, w) => {
1217
- const E = (h, g, b) => {
1218
- const p = Math.max(...b.map((C) => C[1])), S = b.map((C) => C[0]);
1219
- return (h ? [S.flat(1)] : S).map((C) => {
1220
- const A = X(C);
1221
- if (A)
1222
- return [_, y, A, w, { ...s, noMerge: g, sort: p, layer: d }, n, void 0];
1223
- });
1224
- };
1225
- return [
1226
- [m.filter(([, h]) => h).map(([h, , g]) => [h, g]), !0],
1227
- [m.filter(([, h]) => !h).map(([h, , g]) => [h, g]), !1]
1228
- ].map(([h, g]) => [
1229
- ...E(!1, g, h.filter(([b]) => b.some((p) => p[0] === I.shortcutsNoMerge))),
1230
- ...E(!0, g, h.filter(([b]) => b.every((p) => p[0] !== I.shortcutsNoMerge)))
1231
- ]);
1232
- }).flat(2).filter(Boolean)
1233
- ));
1234
- }
1235
- isBlocked(t) {
1236
- return !t || this.config.blocklist.map((n) => Array.isArray(n) ? n[0] : n).some((n) => typeof n == "function" ? n(t) : M(n) ? n === t : n.test(t));
1237
- }
1238
- getBlocked(t) {
1239
- const n = this.config.blocklist.find((r) => {
1240
- const s = Array.isArray(r) ? r[0] : r;
1241
- return typeof s == "function" ? s(t) : M(s) ? s === t : s.test(t);
1242
- });
1243
- return n ? Array.isArray(n) ? n : [n, void 0] : void 0;
1244
- }
1245
- }
1246
- function mn(e, t) {
1247
- return new hn(e, t);
1248
- }
1249
- const Le = /\s\$\$\s+/g;
1250
- function gn(e) {
1251
- return Le.test(e);
1252
- }
1253
- function _n(e, t) {
1254
- return gn(e) ? e.replace(Le, t ? ` ${t} ` : " ") : t ? `${t} ${e}` : e;
1255
- }
1256
- const me = /^\[(.+?)(~?=)"(.*)"\]$/;
1257
- function yn(e) {
1258
- return me.test(e) ? e.replace(me, (t, n, r, s) => `[${Y(n)}${r}"${Y(s)}"]`) : `.${Y(e)}`;
1259
- }
1260
- function bn(e, t) {
1261
- return t(e);
1262
- }
1263
- var ge = { npm_package_dependencies__vueuse_core: "^10.11.0", TERM_PROGRAM: "vscode", npm_package_devDependencies__types_splitpanes: "^2.2.6", NODE: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.12.2/installation/bin/node", INIT_CWD: "/Users/arlo/g/devtools-next/packages/client", npm_package_devDependencies_vite: "^5.3.1", SHELL: "/bin/zsh", TERM: "xterm-256color", npm_config_shamefully_hoist: "true", npm_package_devDependencies_ohash: "^1.1.3", npm_package_devDependencies_floating_vue: "5.2.2", npm_package_dependencies__vue_devtools_shared: "workspace:^", npm_package_dependencies__unocss_runtime: "^0.61.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", npm_package_devDependencies_unplugin_vue_components: "^0.27.0", npm_config_registry: "https://registry.npmjs.org/", npm_package_private: "true", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^4.0.0", npm_package_license: "MIT", PNPM_SCRIPT_SRC_DIR: "/Users/arlo/g/devtools-next/packages/client", npm_config_strict_peer_dependencies: "", npm_package_devDependencies_dayjs: "^1.11.11", __CF_USER_TEXT_ENCODING: "0x1F5:0x19:0x34", npm_execpath: "/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/bin/pnpm.cjs", npm_package_devDependencies_unplugin_auto_import: "^0.17.6", npm_package_scripts_build_lib: "vite build --config vite.lib.config.ts", npm_config_frozen_lockfile: "", npm_package_dependencies_vue_virtual_scroller: "2.0.0-beta.8", npm_package_dependencies_fuse_js: "^7.0.0", PATH: "/Users/arlo/g/devtools-next/packages/client/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/packages/client/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/.cache/node/corepack/v1/pnpm/9.4.0/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/Library/Caches/fnm_multishells/48959_1718990693549/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/arlo/Library/pnpm:/Users/arlo/Library/Caches/fnm_multishells/44228_1718979175400/bin:/opt/homebrew/bin:/Users/arlo/.cargo/bin:/Applications/WebStorm.app/Contents/MacOS:/Applications/WebStorm.app/Contents/MacOS", npm_package_dependencies__vue_devtools_ui: "workspace:*", npm_package_scripts_stub_lib: "vite build --config vite.lib.config.ts --watch", npm_package_dependencies_splitpanes: "^3.1.5", npm_package_author: "webfansplz", npm_command: "run-script", PWD: "/Users/arlo/g/devtools-next/packages/client", npm_package_exports____: "./dist/*", npm_lifecycle_event: "build:lib", npm_package_devDependencies_vue: "^3.4.29", npm_package_name: "@vue/devtools-client", LANG: "zh_CN.UTF-8", npm_package_devDependencies_simple_git_hooks: "^2.11.1", npm_package_devDependencies_sass: "^1.77.6", npm_package_devDependencies__unocss_reset: "^0.61.0", npm_package_scripts_build: "tsx ./scripts/pre-build.ts && (nr build:lib & vite build)", NODE_PATH: "/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.5_sass@1.77.6_terser@5.26.0/node_modules/vite/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.5_sass@1.77.6_terser@5.26.0/node_modules/vite/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.3.1_@types+node@20.14.5_sass@1.77.6_terser@5.26.0/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules", npm_package_devDependencies_pinia: "^2.1.7", TURBO_HASH: "58636861aba21f9e", npm_package_devDependencies__unocss_core: "^0.61.0", npm_package_engines_node: ">=v14.21.3", npm_config_node_gyp: "/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@9.4.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", npm_config_side_effects_cache: "", npm_package_dependencies_colord: "^2.9.3", npm_package_devDependencies__iconify_json: "^2.2.220", npm_package_dependencies_minimatch: "^9.0.4", npm_package_version: "7.3.3", npm_package_dependencies__vue_devtools_applet: "workspace:^", npm_package_devDependencies_unocss: "^0.61.0", npm_package_dependencies__vue_devtools_core: "workspace:^", npm_package_type: "module", HOME: "/Users/arlo", SHLVL: "0", npm_package_dependencies_vite_hot_client: "^0.2.3", npm_package_dependencies_vis_network: "^9.1.9", npm_package_peerDependencies_vite: "^3.1.0 || ^4.0.0-0 || ^5.0.0-0", npm_lifecycle_script: "vite build --config vite.lib.config.ts", npm_package_dependencies__vue_devtools_kit: "workspace:^", npm_package_dependencies__vueuse_integrations: "^10.11.0", npm_config_user_agent: "pnpm/9.4.0 npm/? node/v20.12.2 darwin arm64", npm_package_devDependencies__types_node: "^20.14.5", npm_package_scripts_stub: "nr stub:lib & vite build --watch", npm_package_files_0: "dist", npm_package_devDependencies_unplugin: "^1.10.1", npm_package_dependencies_vue_router: "^4.3.3", npm_package_dependencies_shiki: "^1.9.0", npm_package_dependencies__unocss_preset_icons: "^0.61.0", npm_node_execpath: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.12.2/installation/bin/node", npm_config_shell_emulator: "true", COLORTERM: "truecolor", NODE_ENV: "production" };
1264
- const vn = Object.freeze(
1265
- {
1266
- left: 0,
1267
- top: 0,
1268
- width: 16,
1269
- height: 16
1270
- }
1271
- ), Q = Object.freeze({
1272
- rotate: 0,
1273
- vFlip: !1,
1274
- hFlip: !1
1275
- }), Ue = Object.freeze({
1276
- ...vn,
1277
- ...Q
1278
- }), wn = Object.freeze({
1279
- ...Ue,
1280
- body: "",
1281
- hidden: !1
1282
- }), Sn = Object.freeze({
1283
- width: null,
1284
- height: null
1285
- }), Pe = Object.freeze({
1286
- // Dimensions
1287
- ...Sn,
1288
- // Transformations
1289
- ...Q
1290
- });
1291
- function xn(e, t) {
1292
- const n = {};
1293
- !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
1294
- const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
1295
- return r && (n.rotate = r), n;
1296
- }
1297
- function _e(e, t) {
1298
- const n = xn(e, t);
1299
- for (const r in wn)
1300
- r in Q ? r in e && !(r in n) && (n[r] = Q[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
1301
- return n;
1302
- }
1303
- function En(e, t) {
1304
- const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null);
1305
- function o(a) {
1306
- if (n[a])
1307
- return s[a] = [];
1308
- if (!(a in s)) {
1309
- s[a] = null;
1310
- const l = r[a] && r[a].parent, c = l && o(l);
1311
- c && (s[a] = [l].concat(c));
1312
- }
1313
- return s[a];
1314
- }
1315
- return (t || Object.keys(n).concat(Object.keys(r))).forEach(o), s;
1316
- }
1317
- function ye(e, t, n) {
1318
- const r = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null);
1319
- let o = {};
1320
- function a(l) {
1321
- o = _e(
1322
- r[l] || s[l],
1323
- o
1324
- );
1325
- }
1326
- return a(t), n.forEach(a), _e(e, o);
1327
- }
1328
- function kn(e, t) {
1329
- if (e.icons[t])
1330
- return ye(e, t, []);
1331
- const n = En(e, [t])[t];
1332
- return n ? ye(e, t, n) : null;
1333
- }
1334
- const $n = /(-?[0-9.]*[0-9]+[0-9.]*)/g, An = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
1335
- function be(e, t, n) {
1336
- if (t === 1)
1337
- return e;
1338
- if (n = n || 100, typeof e == "number")
1339
- return Math.ceil(e * t * n) / n;
1340
- if (typeof e != "string")
1341
- return e;
1342
- const r = e.split($n);
1343
- if (r === null || !r.length)
1344
- return e;
1345
- const s = [];
1346
- let o = r.shift(), a = An.test(o);
1347
- for (; ; ) {
1348
- if (a) {
1349
- const l = parseFloat(o);
1350
- isNaN(l) ? s.push(o) : s.push(Math.ceil(l * t * n) / n);
1351
- } else
1352
- s.push(o);
1353
- if (o = r.shift(), o === void 0)
1354
- return s.join("");
1355
- a = !a;
1356
- }
1357
- }
1358
- function Cn(e, t = "defs") {
1359
- let n = "";
1360
- const r = e.indexOf("<" + t);
1361
- for (; r >= 0; ) {
1362
- const s = e.indexOf(">", r), o = e.indexOf("</" + t);
1363
- if (s === -1 || o === -1)
1364
- break;
1365
- const a = e.indexOf(">", o);
1366
- if (a === -1)
1367
- break;
1368
- n += e.slice(s + 1, o).trim(), e = e.slice(0, r).trim() + e.slice(a + 1);
1369
- }
1370
- return {
1371
- defs: n,
1372
- content: e
1373
- };
1374
- }
1375
- function On(e, t) {
1376
- return e ? "<defs>" + e + "</defs>" + t : t;
1377
- }
1378
- function Rn(e, t, n) {
1379
- const r = Cn(e);
1380
- return On(r.defs, t + r.content + n);
1381
- }
1382
- const ie = (e) => e === "unset" || e === "undefined" || e === "none";
1383
- function Tn(e, t) {
1384
- const n = {
1385
- ...Ue,
1386
- ...e
1387
- }, r = {
1388
- ...Pe,
1389
- ...t
1390
- }, s = {
1391
- left: n.left,
1392
- top: n.top,
1393
- width: n.width,
1394
- height: n.height
1395
- };
1396
- let o = n.body;
1397
- [n, r].forEach((y) => {
1398
- const w = [], E = y.hFlip, $ = y.vFlip;
1399
- let h = y.rotate;
1400
- E ? $ ? h += 2 : (w.push(
1401
- "translate(" + (s.width + s.left).toString() + " " + (0 - s.top).toString() + ")"
1402
- ), w.push("scale(-1 1)"), s.top = s.left = 0) : $ && (w.push(
1403
- "translate(" + (0 - s.left).toString() + " " + (s.height + s.top).toString() + ")"
1404
- ), w.push("scale(1 -1)"), s.top = s.left = 0);
1405
- let g;
1406
- switch (h < 0 && (h -= Math.floor(h / 4) * 4), h = h % 4, h) {
1407
- case 1:
1408
- g = s.height / 2 + s.top, w.unshift(
1409
- "rotate(90 " + g.toString() + " " + g.toString() + ")"
1410
- );
1411
- break;
1412
- case 2:
1413
- w.unshift(
1414
- "rotate(180 " + (s.width / 2 + s.left).toString() + " " + (s.height / 2 + s.top).toString() + ")"
1415
- );
1416
- break;
1417
- case 3:
1418
- g = s.width / 2 + s.left, w.unshift(
1419
- "rotate(-90 " + g.toString() + " " + g.toString() + ")"
1420
- );
1421
- break;
1422
- }
1423
- h % 2 === 1 && (s.left !== s.top && (g = s.left, s.left = s.top, s.top = g), s.width !== s.height && (g = s.width, s.width = s.height, s.height = g)), w.length && (o = Rn(
1424
- o,
1425
- '<g transform="' + w.join(" ") + '">',
1426
- "</g>"
1427
- ));
1428
- });
1429
- const a = r.width, l = r.height, c = s.width, f = s.height;
1430
- let i, u;
1431
- a === null ? (u = l === null ? "1em" : l === "auto" ? f : l, i = be(u, c / f)) : (i = a === "auto" ? c : a, u = l === null ? be(i, f / c) : l === "auto" ? f : l);
1432
- const d = {}, m = (y, w) => {
1433
- ie(w) || (d[y] = w.toString());
1434
- };
1435
- m("width", i), m("height", u);
1436
- const _ = [s.left, s.top, c, f];
1437
- return d.viewBox = _.join(" "), {
1438
- attributes: d,
1439
- viewBox: _,
1440
- body: o
1441
- };
1442
- }
1443
- function jn(e) {
1444
- return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1445
- }
1446
- function Mn(e) {
1447
- let t = e.startsWith("<svg>") ? e.replace("<svg>", "<svg >") : e;
1448
- return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace(
1449
- "<svg ",
1450
- '<svg xmlns:xlink="http://www.w3.org/1999/xlink" '
1451
- )), t.includes(" xmlns=") || (t = t.replace(
1452
- "<svg ",
1453
- '<svg xmlns="http://www.w3.org/2000/svg" '
1454
- )), jn(t);
1455
- }
1456
- function Ln(e) {
1457
- return e.replace(/(['"])\s*\n\s*([^>\\/\s])/g, "$1 $2").replace(/(["';{}><])\s*\n\s*/g, "$1").replace(/\s*\n\s*/g, " ").replace(/\s+"/g, '"').replace(/="\s+/g, '="').replace(/(\s)+\/>/g, "/>").trim();
1458
- }
1459
- const Un = /\swidth\s*=\s*["']([\w.]+)["']/, Pn = /\sheight\s*=\s*["']([\w.]+)["']/, ee = /<svg\s+/;
1460
- function Nn(e, t, n) {
1461
- const r = e.slice(0, e.indexOf(">")), s = (o, a) => {
1462
- const l = a.exec(r), c = l != null, f = t[o];
1463
- return !f && !ie(f) && (typeof n == "number" ? n > 0 && (t[o] = `${n}em`) : l && (t[o] = l[1])), c;
1464
- };
1465
- return [s("width", Un), s("height", Pn)];
1466
- }
1467
- async function Ne(e, t, n, r, s, o) {
1468
- const { scale: a, addXmlNs: l = !1 } = r ?? {}, { additionalProps: c = {}, iconCustomizer: f } = (r == null ? void 0 : r.customizations) ?? {}, i = await (s == null ? void 0 : s()) ?? {};
1469
- await (f == null ? void 0 : f(t, n, i)), Object.keys(c).forEach((y) => {
1470
- const w = c[y];
1471
- w != null && (i[y] = w);
1472
- }), o == null || o(i);
1473
- const [u, d] = Nn(e, i, a);
1474
- l && (!e.includes("xmlns=") && !i.xmlns && (i.xmlns = "http://www.w3.org/2000/svg"), !e.includes("xmlns:xlink=") && e.includes("xlink:") && !i["xmlns:xlink"] && (i["xmlns:xlink"] = "http://www.w3.org/1999/xlink"));
1475
- const m = Object.keys(i).map(
1476
- (y) => y === "width" && u || y === "height" && d ? null : `${y}="${i[y]}"`
1477
- ).filter((y) => y != null);
1478
- if (m.length && (e = e.replace(ee, `<svg ${m.join(" ")} `)), r) {
1479
- const { defaultStyle: y, defaultClass: w } = r;
1480
- w && !e.includes("class=") && (e = e.replace(ee, `<svg class="${w}" `)), y && !e.includes("style=") && (e = e.replace(ee, `<svg style="${y}" `));
1481
- }
1482
- const _ = r == null ? void 0 : r.usedProps;
1483
- return _ && (Object.keys(c).forEach((y) => {
1484
- const w = i[y];
1485
- w != null && (_[y] = w);
1486
- }), typeof i.width < "u" && i.width !== null && (_.width = i.width), typeof i.height < "u" && i.height !== null && (_.height = i.height)), e;
1487
- }
1488
- async function ve(e, t, n, r) {
1489
- var o;
1490
- let s;
1491
- try {
1492
- if (typeof e == "function")
1493
- s = await e(n);
1494
- else {
1495
- const a = e[n];
1496
- s = typeof a == "function" ? await a() : a;
1497
- }
1498
- } catch (a) {
1499
- console.warn(
1500
- `Failed to load custom icon "${n}" in "${t}":`,
1501
- a
1502
- );
1503
- return;
1504
- }
1505
- if (s) {
1506
- const a = s.indexOf("<svg");
1507
- a > 0 && (s = s.slice(a));
1508
- const { transform: l } = (r == null ? void 0 : r.customizations) ?? {};
1509
- return s = typeof l == "function" ? await l(s, t, n) : s, s.startsWith("<svg") ? await Ne(
1510
- ((o = r == null ? void 0 : r.customizations) == null ? void 0 : o.trimCustomSvg) === !0 ? Ln(s) : s,
1511
- t,
1512
- n,
1513
- r,
1514
- void 0
1515
- ) : (console.warn(
1516
- `Custom icon "${n}" in "${t}" is not a valid SVG`
1517
- ), s);
1518
- }
1519
- }
1520
- async function De(e, t, n, r) {
1521
- let s;
1522
- const { customize: o } = (r == null ? void 0 : r.customizations) ?? {};
1523
- for (const a of n)
1524
- if (s = kn(e, a), s) {
1525
- let l = { ...Pe };
1526
- typeof o == "function" && (l = o(l));
1527
- const {
1528
- attributes: { width: c, height: f, ...i },
1529
- body: u
1530
- } = Tn(s, l), d = r == null ? void 0 : r.scale;
1531
- return await Ne(
1532
- // DON'T remove space on <svg >
1533
- `<svg >${u}</svg>`,
1534
- t,
1535
- a,
1536
- r,
1537
- () => ({ ...i }),
1538
- (m) => {
1539
- const _ = (y, w) => {
1540
- const E = m[y];
1541
- let $;
1542
- if (!ie(E)) {
1543
- if (E)
1544
- return;
1545
- typeof d == "number" ? d && ($ = `${d}em`) : $ = w;
1546
- }
1547
- $ ? m[y] = $ : delete m[y];
1548
- };
1549
- _("width", c), _("height", f);
1550
- }
1551
- );
1552
- }
1553
- }
1554
- const Ie = async (e, t, n) => {
1555
- var s;
1556
- const r = (s = n == null ? void 0 : n.customCollections) == null ? void 0 : s[e];
1557
- if (r)
1558
- if (typeof r == "function") {
1559
- let o;
1560
- try {
1561
- o = await r(t);
1562
- } catch (a) {
1563
- console.warn(
1564
- `Failed to load custom icon "${t}" in "${e}":`,
1565
- a
1566
- );
1567
- return;
1568
- }
1569
- if (o) {
1570
- if (typeof o == "string")
1571
- return await ve(
1572
- () => o,
1573
- e,
1574
- t,
1575
- n
1576
- );
1577
- if ("icons" in o) {
1578
- const a = [
1579
- t,
1580
- t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
1581
- t.replace(/([a-z])(\d+)/g, "$1-$2")
1582
- ];
1583
- return await De(
1584
- o,
1585
- e,
1586
- a,
1587
- n
1588
- );
1589
- }
1590
- }
1591
- } else
1592
- return await ve(r, e, t, n);
1593
- };
1594
- function Dn(e) {
1595
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1596
- }
1597
- var In = [
1598
- "academicons",
1599
- "akar-icons",
1600
- "ant-design",
1601
- "arcticons",
1602
- "basil",
1603
- "bi",
1604
- "bitcoin-icons",
1605
- "bpmn",
1606
- "brandico",
1607
- "bx",
1608
- "bxl",
1609
- "bxs",
1610
- "bytesize",
1611
- "carbon",
1612
- "cbi",
1613
- "charm",
1614
- "ci",
1615
- "cib",
1616
- "cif",
1617
- "cil",
1618
- "circle-flags",
1619
- "circum",
1620
- "clarity",
1621
- "codicon",
1622
- "covid",
1623
- "cryptocurrency-color",
1624
- "cryptocurrency",
1625
- "dashicons",
1626
- "devicon-line",
1627
- "devicon-original",
1628
- "devicon-plain",
1629
- "devicon",
1630
- "ei",
1631
- "el",
1632
- "emblemicons",
1633
- "emojione-monotone",
1634
- "emojione-v1",
1635
- "emojione",
1636
- "entypo-social",
1637
- "entypo",
1638
- "eos-icons",
1639
- "ep",
1640
- "et",
1641
- "eva",
1642
- "f7",
1643
- "fa-brands",
1644
- "fa-regular",
1645
- "fa-solid",
1646
- "fa",
1647
- "fa6-brands",
1648
- "fa6-regular",
1649
- "fa6-solid",
1650
- "fad",
1651
- "fe",
1652
- "feather",
1653
- "file-icons",
1654
- "flag",
1655
- "flagpack",
1656
- "flat-color-icons",
1657
- "flat-ui",
1658
- "flowbite",
1659
- "fluent-emoji-flat",
1660
- "fluent-emoji-high-contrast",
1661
- "fluent-emoji",
1662
- "fluent-mdl2",
1663
- "fluent",
1664
- "fontelico",
1665
- "fontisto",
1666
- "formkit",
1667
- "foundation",
1668
- "fxemoji",
1669
- "gala",
1670
- "game-icons",
1671
- "geo",
1672
- "gg",
1673
- "gis",
1674
- "gravity-ui",
1675
- "gridicons",
1676
- "grommet-icons",
1677
- "guidance",
1678
- "healthicons",
1679
- "heroicons-outline",
1680
- "heroicons-solid",
1681
- "heroicons",
1682
- "hugeicons",
1683
- "humbleicons",
1684
- "ic",
1685
- "icomoon-free",
1686
- "icon-park-outline",
1687
- "icon-park-solid",
1688
- "icon-park-twotone",
1689
- "icon-park",
1690
- "iconamoon",
1691
- "iconoir",
1692
- "icons8",
1693
- "il",
1694
- "ion",
1695
- "iwwa",
1696
- "jam",
1697
- "la",
1698
- "lets-icons",
1699
- "line-md",
1700
- "logos",
1701
- "ls",
1702
- "lucide",
1703
- "mage",
1704
- "majesticons",
1705
- "maki",
1706
- "map",
1707
- "marketeq",
1708
- "material-symbols-light",
1709
- "material-symbols",
1710
- "mdi-light",
1711
- "mdi",
1712
- "medical-icon",
1713
- "memory",
1714
- "meteocons",
1715
- "mi",
1716
- "mingcute",
1717
- "mono-icons",
1718
- "mynaui",
1719
- "nimbus",
1720
- "nonicons",
1721
- "noto-v1",
1722
- "noto",
1723
- "octicon",
1724
- "oi",
1725
- "ooui",
1726
- "openmoji",
1727
- "oui",
1728
- "pajamas",
1729
- "pepicons-pencil",
1730
- "pepicons-pop",
1731
- "pepicons-print",
1732
- "pepicons",
1733
- "ph",
1734
- "pixelarticons",
1735
- "prime",
1736
- "ps",
1737
- "quill",
1738
- "radix-icons",
1739
- "raphael",
1740
- "ri",
1741
- "si-glyph",
1742
- "simple-icons",
1743
- "simple-line-icons",
1744
- "skill-icons",
1745
- "solar",
1746
- "streamline-emojis",
1747
- "streamline",
1748
- "subway",
1749
- "svg-spinners",
1750
- "system-uicons",
1751
- "tabler",
1752
- "tdesign",
1753
- "teenyicons",
1754
- "token-branded",
1755
- "token",
1756
- "topcoat",
1757
- "twemoji",
1758
- "typcn",
1759
- "uil",
1760
- "uim",
1761
- "uis",
1762
- "uit",
1763
- "uiw",
1764
- "unjs",
1765
- "vaadin",
1766
- "vs",
1767
- "vscode-icons",
1768
- "websymbol",
1769
- "whh",
1770
- "wi",
1771
- "wpf",
1772
- "zmdi",
1773
- "zondicons"
1774
- ];
1775
- const Fn = /* @__PURE__ */ Dn(In), zn = 3;
1776
- function Vn(e) {
1777
- return (t = {}) => {
1778
- const {
1779
- scale: n = 1,
1780
- mode: r = "auto",
1781
- prefix: s = "i-",
1782
- warn: o = !1,
1783
- collections: a,
1784
- extraProperties: l = {},
1785
- customizations: c = {},
1786
- autoInstall: f = !1,
1787
- collectionsNodeResolvePath: i,
1788
- layer: u = "icons",
1789
- unit: d,
1790
- processor: m
1791
- } = t, _ = Hn(), y = {
1792
- addXmlNs: !0,
1793
- scale: n,
1794
- customCollections: a,
1795
- autoInstall: f,
1796
- cwd: i,
1797
- // avoid warn from @iconify/loader: we'll warn below if not found
1798
- warn: void 0,
1799
- customizations: {
1800
- ...c,
1801
- additionalProps: { ...l },
1802
- trimCustomSvg: !0,
1803
- async iconCustomizer(E, $, h) {
1804
- var g;
1805
- await ((g = c.iconCustomizer) == null ? void 0 : g.call(c, E, $, h)), d && (h.width || (h.width = `${n}${d}`), h.height || (h.height = `${n}${d}`));
1806
- }
1807
- }
1808
- };
1809
- let w;
1810
- return {
1811
- name: "@unocss/preset-icons",
1812
- enforce: "pre",
1813
- options: t,
1814
- layers: { icons: -30 },
1815
- rules: [[
1816
- /^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,
1817
- async (E) => {
1818
- let [$, h, g = r] = E, b = "", p = "", S;
1819
- w = w || await e(t);
1820
- const C = {};
1821
- if (h.includes(":"))
1822
- [b, p] = h.split(":"), S = await w(b, p, { ...y, usedProps: C });
1823
- else {
1824
- const P = h.split(/-/g);
1825
- for (let N = zn; N >= 1 && (b = P.slice(0, N).join("-"), p = P.slice(N).join("-"), S = await w(b, p, { ...y, usedProps: C }), !S); N--)
1826
- ;
1827
- }
1828
- if (!S) {
1829
- o && !_.isESLint && Te(`failed to load icon "${$}"`);
1830
- return;
1831
- }
1832
- let A;
1833
- const R = `url("data:image/svg+xml;utf8,${Mn(S)}")`;
1834
- return g === "auto" && (g = S.includes("currentColor") ? "mask" : "bg"), g === "mask" ? A = {
1835
- "--un-icon": R,
1836
- "-webkit-mask": "var(--un-icon) no-repeat",
1837
- mask: "var(--un-icon) no-repeat",
1838
- "-webkit-mask-size": "100% 100%",
1839
- "mask-size": "100% 100%",
1840
- "background-color": "currentColor",
1841
- // for Safari https://github.com/elk-zone/elk/pull/264
1842
- color: "inherit",
1843
- ...C
1844
- } : A = {
1845
- background: `${R} no-repeat`,
1846
- "background-size": "100% 100%",
1847
- "background-color": "transparent",
1848
- ...C
1849
- }, m == null || m(A, { collection: b, icon: p, svg: S, mode: g }), A;
1850
- },
1851
- { layer: u, prefix: s }
1852
- ]]
1853
- };
1854
- };
1855
- }
1856
- function Fe(e, t) {
1857
- const n = /* @__PURE__ */ new Map();
1858
- function r(s) {
1859
- if (Fn.includes(s))
1860
- return n.has(s) || n.set(s, e(`${t}@iconify-json/${s}/icons.json`)), n.get(s);
1861
- }
1862
- return async (s, o, a) => {
1863
- let l = await Ie(s, o, a);
1864
- if (l)
1865
- return l;
1866
- const c = await r(s);
1867
- if (c) {
1868
- const f = [
1869
- o,
1870
- o.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
1871
- o.replace(/([a-z])(\d+)/g, "$1-$2")
1872
- ];
1873
- l = await De(c, s, f, a);
1874
- }
1875
- return l;
1876
- };
1877
- }
1878
- function Hn() {
1879
- const e = typeof process < "u" && process.stdout && !process.versions.deno, t = e && !!ge.VSCODE_CWD, n = e && !!ge.ESLINT;
1880
- return {
1881
- isNode: e,
1882
- isVSCode: t,
1883
- isESLint: n
1884
- };
1885
- }
1886
- function Bn(e) {
1887
- return Fe(Lt, e);
1888
- }
1889
- const qn = Vn(async (e) => {
1890
- const t = e == null ? void 0 : e.customFetch, n = e == null ? void 0 : e.cdn;
1891
- return t && n ? Fe(t, n) : n ? Bn(n) : Ie;
1892
- });
1893
- function Gn(e) {
1894
- return e.replace(/-(\w)/g, (t, n) => n ? n.toUpperCase() : "");
1895
- }
1896
- function we(e) {
1897
- return e.charAt(0).toUpperCase() + e.slice(1);
1898
- }
1899
- function Se(e) {
1900
- return e.replace(/(?:^|\B)([A-Z])/g, "-$1").toLowerCase();
1901
- }
1902
- var xe = ["Webkit", "Moz", "ms"];
1903
- function Wn(e) {
1904
- const t = {};
1905
- function n(r) {
1906
- const s = t[r];
1907
- if (s)
1908
- return s;
1909
- let o = Gn(r);
1910
- if (o !== "filter" && o in e)
1911
- return t[r] = Se(o);
1912
- o = we(o);
1913
- for (let a = 0; a < xe.length; a++) {
1914
- const l = `${xe[a]}${o}`;
1915
- if (l in e)
1916
- return t[r] = Se(we(l));
1917
- }
1918
- return r;
1919
- }
1920
- return ({ entries: r }) => r.forEach((s) => {
1921
- s[0].startsWith("--") || (s[0] = n(s[0]));
1922
- });
1923
- }
1924
- function Jn(e) {
1925
- return e.replace(/&amp;/g, "&").replace(/&gt;/g, ">").replace(/&lt;/g, "<");
1926
- }
1927
- function Qn(e = {}) {
1928
- var F, z, O;
1929
- if (typeof window > "u") {
1930
- console.warn("@unocss/runtime been used in non-browser environment, skipped.");
1931
- return;
1932
- }
1933
- const t = window, n = window.document, r = () => n.documentElement, s = t.__unocss || {}, o = Object.assign({}, e, s.runtime), a = o.defaults || {}, l = o.cloakAttribute ?? "un-cloak";
1934
- o.autoPrefix && (a.postprocess = U(a.postprocess)).unshift(Wn(n.createElement("div").style)), (F = o.configResolved) == null || F.call(o, s, a);
1935
- const c = mn(s, a), f = (v) => o.inject ? o.inject(v) : r().prepend(v), i = () => o.rootElement ? o.rootElement() : n.body, u = /* @__PURE__ */ new Map();
1936
- let d = !0, m = /* @__PURE__ */ new Set(), _, y, w = [];
1937
- const E = () => new Promise((v) => {
1938
- w.push(v), y != null && clearTimeout(y), y = setTimeout(() => g().then(() => {
1939
- const x = w;
1940
- w = [], x.forEach((k) => k());
1941
- }), 0);
1942
- });
1943
- function $(v) {
1944
- if (v.nodeType !== 1)
1945
- return;
1946
- const x = v;
1947
- x.hasAttribute(l) && x.removeAttribute(l), x.querySelectorAll(`[${l}]`).forEach((k) => {
1948
- k.removeAttribute(l);
1949
- });
1950
- }
1951
- function h(v, x) {
1952
- let k = u.get(v);
1953
- if (!k)
1954
- if (k = n.createElement("style"), k.setAttribute("data-unocss-runtime-layer", v), u.set(v, k), x == null)
1955
- f(k);
1956
- else {
1957
- const L = h(x), T = L.parentNode;
1958
- T ? T.insertBefore(k, L.nextSibling) : f(k);
1959
- }
1960
- return k;
1961
- }
1962
- async function g() {
1963
- const v = await c.generate(m);
1964
- return v.layers.reduce((x, k) => (h(k, x).innerHTML = v.getLayer(k) ?? "", k), void 0), m = v.matched, {
1965
- ...v,
1966
- getStyleElement: (x) => u.get(x),
1967
- getStyleElements: () => u
1968
- };
1969
- }
1970
- async function b(v) {
1971
- const x = m.size;
1972
- await c.applyExtractors(v, void 0, m), x !== m.size && await E();
1973
- }
1974
- async function p(v = i()) {
1975
- const x = v && v.outerHTML;
1976
- x && (await b(`${x} ${Jn(x)}`), $(r()), $(v));
1977
- }
1978
- const S = new MutationObserver((v) => {
1979
- d || v.forEach(async (x) => {
1980
- if (x.target.nodeType !== 1)
1981
- return;
1982
- const k = x.target;
1983
- for (const L of u)
1984
- if (k === L[1])
1985
- return;
1986
- if (x.type === "childList")
1987
- x.addedNodes.forEach(async (L) => {
1988
- if (L.nodeType !== 1)
1989
- return;
1990
- const T = L;
1991
- _ && !_(T) || (await b(T.outerHTML), $(T));
1992
- });
1993
- else {
1994
- if (_ && !_(k))
1995
- return;
1996
- if (x.attributeName !== l) {
1997
- const L = Array.from(k.attributes).map((j) => j.value ? `${j.name}="${j.value}"` : j.name).join(" "), T = `<${k.tagName.toLowerCase()} ${L}>`;
1998
- await b(T);
1999
- }
2000
- k.hasAttribute(l) && k.removeAttribute(l);
2001
- }
2002
- });
2003
- });
2004
- let C = !1;
2005
- function A() {
2006
- var x, k;
2007
- if (C)
2008
- return;
2009
- const v = (x = o.observer) != null && x.target ? o.observer.target() : i();
2010
- v && (S.observe(v, {
2011
- childList: !0,
2012
- subtree: !0,
2013
- attributes: !0,
2014
- attributeFilter: (k = o.observer) == null ? void 0 : k.attributeFilter
2015
- }), C = !0);
2016
- }
2017
- function R() {
2018
- o.bypassDefined && Kn(c.blocked), p(), A();
2019
- }
2020
- function P() {
2021
- n.readyState === "loading" ? t.addEventListener("DOMContentLoaded", R) : R();
2022
- }
2023
- const N = t.__unocss_runtime = t.__unocss_runtime = {
2024
- version: c.version,
2025
- uno: c,
2026
- async extract(v) {
2027
- M(v) || (v.forEach((x) => m.add(x)), v = ""), await b(v);
2028
- },
2029
- extractAll: p,
2030
- inspect(v) {
2031
- _ = v;
2032
- },
2033
- toggleObserver(v) {
2034
- v === void 0 ? d = !d : d = !!v, !C && !d && P();
2035
- },
2036
- update: g,
2037
- presets: ((z = t.__unocss_runtime) == null ? void 0 : z.presets) ?? {}
2038
- };
2039
- ((O = o.ready) == null ? void 0 : O.call(o, N)) !== !1 && (d = !1, P());
2040
- }
2041
- function Kn(e = /* @__PURE__ */ new Set()) {
2042
- for (let t = 0; t < document.styleSheets.length; t++) {
2043
- const n = document.styleSheets[t];
2044
- let r;
2045
- try {
2046
- if (r = n.cssRules || n.rules, !r)
2047
- continue;
2048
- Array.from(r).flatMap((s) => {
2049
- var o;
2050
- return ((o = s.selectorText) == null ? void 0 : o.split(/,/g)) || [];
2051
- }).forEach((s) => {
2052
- s && (s = s.trim(), s.startsWith(".") && (s = s.slice(1)), e.add(s));
2053
- });
2054
- } catch {
2055
- continue;
2056
- }
2057
- }
2058
- return e;
2059
- }
2060
- Qn({
2061
- defaults: {
2062
- presets: [
2063
- qn({
2064
- prefix: ["i-", ""],
2065
- collections: {},
2066
- cdn: "https://esm.sh/",
2067
- scale: 1.2,
2068
- extraProperties: {
2069
- display: "inline-block",
2070
- "vertical-align": "middle"
2071
- }
2072
- })
2073
- ]
2074
- },
2075
- bypassDefined: !0
2076
- });