@music-lyric-player/base 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.comm.js +1 -1
- package/dist/index.comm.js.map +1 -1
- package/dist/index.ecma.js +841 -827
- package/dist/index.ecma.js.map +1 -1
- package/package.json +3 -3
package/dist/index.ecma.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { freezeObjectDeep as
|
|
2
|
-
|
|
3
|
-
const Ht = fr({
|
|
1
|
+
import { freezeObjectDeep as mr, ConfigManager as dr, Event as pr } from "@music-lyric-player/utils";
|
|
2
|
+
const Ht = mr({
|
|
4
3
|
driver: "animation",
|
|
5
4
|
bridgeActive: !0,
|
|
6
5
|
mergeWindow: 300,
|
|
@@ -10,32 +9,47 @@ const Ht = fr({
|
|
|
10
9
|
useMeta: !0,
|
|
11
10
|
resetTempOnLyricChange: !0
|
|
12
11
|
}
|
|
13
|
-
}),
|
|
12
|
+
}), os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
13
|
__proto__: null,
|
|
15
14
|
DEFAULT: Ht
|
|
16
|
-
}, Symbol.toStringTag, { value: "Module" }))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
e += Math.random().toString(36).slice(2);
|
|
20
|
-
return e.slice(0, s);
|
|
21
|
-
};
|
|
22
|
-
var zt = /* @__PURE__ */ ((s) => (s.ChineseSimplified = "zh-hans", s.ChineseTraditional = "zh-hant", s.English = "en", s.Japanese = "ja", s.Korean = "ko", s.Russian = "ru", s.French = "fr", s.German = "de", s.Spanish = "es", s.Italian = "it", s.Portuguese = "pt", s))(zt || {});
|
|
23
|
-
class dr {
|
|
15
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
16
|
+
var zt = /* @__PURE__ */ ((r) => (r.ChineseSimplified = "zh-hans", r.ChineseTraditional = "zh-hant", r.English = "en", r.Japanese = "ja", r.Korean = "ko", r.Russian = "ru", r.French = "fr", r.German = "de", r.Spanish = "es", r.Italian = "it", r.Portuguese = "pt", r))(zt || {});
|
|
17
|
+
class Er {
|
|
24
18
|
/**
|
|
25
19
|
* Language tag.
|
|
26
20
|
*/
|
|
27
|
-
tag
|
|
21
|
+
tag;
|
|
28
22
|
/**
|
|
29
23
|
* Share within the lyric, ranging from 0 to 100.
|
|
30
24
|
* Recommended to be computed from word-level language counts.
|
|
31
25
|
*/
|
|
32
|
-
percent
|
|
26
|
+
percent;
|
|
27
|
+
constructor(e = {}) {
|
|
28
|
+
this.tag = e.tag ?? "", this.percent = e.percent ?? 0;
|
|
29
|
+
}
|
|
33
30
|
}
|
|
34
31
|
class Yt {
|
|
35
32
|
/**
|
|
36
33
|
* All languages with their shares.
|
|
34
|
+
*
|
|
35
|
+
* Shares are a snapshot filled by the language transform; stale after lines change.
|
|
37
36
|
*/
|
|
38
|
-
list
|
|
37
|
+
list;
|
|
38
|
+
constructor(e = {}) {
|
|
39
|
+
this.list = e.list ?? [];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether a language of the given tag is present.
|
|
43
|
+
*/
|
|
44
|
+
has(e) {
|
|
45
|
+
return this.list.some((t) => t.tag === e);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The language entry of the given tag.
|
|
49
|
+
*/
|
|
50
|
+
byType(e) {
|
|
51
|
+
return this.list.find((t) => t.tag === e);
|
|
52
|
+
}
|
|
39
53
|
/**
|
|
40
54
|
* The language with the highest share.
|
|
41
55
|
*/
|
|
@@ -50,11 +64,14 @@ class Kt {
|
|
|
50
64
|
/**
|
|
51
65
|
* Start time in milliseconds.
|
|
52
66
|
*/
|
|
53
|
-
start
|
|
67
|
+
start;
|
|
54
68
|
/**
|
|
55
69
|
* End time in milliseconds.
|
|
56
70
|
*/
|
|
57
|
-
end
|
|
71
|
+
end;
|
|
72
|
+
constructor(e = 0, t = 0) {
|
|
73
|
+
this.start = e, this.end = t;
|
|
74
|
+
}
|
|
58
75
|
/**
|
|
59
76
|
* Duration in milliseconds, derived from end minus start.
|
|
60
77
|
*/
|
|
@@ -62,11 +79,7 @@ class Kt {
|
|
|
62
79
|
return this.end - this.start;
|
|
63
80
|
}
|
|
64
81
|
}
|
|
65
|
-
class
|
|
66
|
-
/**
|
|
67
|
-
* Unique identifier of the token.
|
|
68
|
-
*/
|
|
69
|
-
id = B(6).toUpperCase();
|
|
82
|
+
class gr {
|
|
70
83
|
/**
|
|
71
84
|
* Time range of the token.
|
|
72
85
|
*/
|
|
@@ -74,13 +87,12 @@ class Er {
|
|
|
74
87
|
/**
|
|
75
88
|
* Text content of the token.
|
|
76
89
|
*/
|
|
77
|
-
content
|
|
90
|
+
content;
|
|
91
|
+
constructor(e = {}) {
|
|
92
|
+
this.time = e.time, this.content = e.content ?? "";
|
|
93
|
+
}
|
|
78
94
|
}
|
|
79
|
-
class
|
|
80
|
-
/**
|
|
81
|
-
* Unique identifier of the item.
|
|
82
|
-
*/
|
|
83
|
-
id = B(6).toUpperCase();
|
|
95
|
+
class ze {
|
|
84
96
|
/**
|
|
85
97
|
* Time range of the item, independent from its words.
|
|
86
98
|
*/
|
|
@@ -88,14 +100,19 @@ class Jt {
|
|
|
88
100
|
/**
|
|
89
101
|
* Tokens composing the item in order.
|
|
90
102
|
*/
|
|
91
|
-
words
|
|
103
|
+
words;
|
|
92
104
|
/**
|
|
93
105
|
* Language or transliteration scheme of this item.
|
|
94
106
|
* Should be set when multiple languages coexist, since line-level aggregation groups items by it.
|
|
95
107
|
*/
|
|
96
108
|
language;
|
|
109
|
+
constructor(e = {}) {
|
|
110
|
+
this.time = e.time, this.words = e.words ?? [], this.language = e.language;
|
|
111
|
+
}
|
|
97
112
|
/**
|
|
98
113
|
* Flat text joined from every word.
|
|
114
|
+
*
|
|
115
|
+
* Live: recomputed on each access.
|
|
99
116
|
*/
|
|
100
117
|
get content() {
|
|
101
118
|
let e = "";
|
|
@@ -104,13 +121,25 @@ class Jt {
|
|
|
104
121
|
return e;
|
|
105
122
|
}
|
|
106
123
|
}
|
|
107
|
-
class
|
|
124
|
+
class Rr extends ze {
|
|
125
|
+
/**
|
|
126
|
+
* Whether this ruby marks the start of a phrase.
|
|
127
|
+
*/
|
|
128
|
+
phraseStart;
|
|
129
|
+
constructor(e = {}) {
|
|
130
|
+
super(e), this.phraseStart = e.phraseStart ?? !1;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
class vr extends ze {
|
|
108
134
|
/**
|
|
109
135
|
* Original annotation type name.
|
|
110
136
|
*/
|
|
111
|
-
key
|
|
137
|
+
key;
|
|
138
|
+
constructor(e = {}) {
|
|
139
|
+
super(e), this.key = e.key ?? "";
|
|
140
|
+
}
|
|
112
141
|
}
|
|
113
|
-
class
|
|
142
|
+
class Ir {
|
|
114
143
|
/**
|
|
115
144
|
* Ruby annotation such as furigana.
|
|
116
145
|
*/
|
|
@@ -123,13 +152,12 @@ class Rr {
|
|
|
123
152
|
* Unknown annotations keyed by their original type name.
|
|
124
153
|
*/
|
|
125
154
|
unknowns;
|
|
155
|
+
constructor(e = {}) {
|
|
156
|
+
this.ruby = e.ruby, this.romans = e.romans, this.unknowns = e.unknowns;
|
|
157
|
+
}
|
|
126
158
|
}
|
|
127
|
-
var k = /* @__PURE__ */ ((
|
|
128
|
-
class
|
|
129
|
-
/**
|
|
130
|
-
* Unique identifier of the word.
|
|
131
|
-
*/
|
|
132
|
-
id = B(6).toUpperCase();
|
|
159
|
+
var k = /* @__PURE__ */ ((r) => (r.Normal = "Normal", r.Space = "Space", r))(k || {});
|
|
160
|
+
class $r {
|
|
133
161
|
/**
|
|
134
162
|
* Discriminant marking this as a normal word.
|
|
135
163
|
*/
|
|
@@ -141,7 +169,7 @@ class vr {
|
|
|
141
169
|
/**
|
|
142
170
|
* Text content of the word.
|
|
143
171
|
*/
|
|
144
|
-
content
|
|
172
|
+
content;
|
|
145
173
|
/**
|
|
146
174
|
* Language of this word.
|
|
147
175
|
*/
|
|
@@ -153,9 +181,12 @@ class vr {
|
|
|
153
181
|
/**
|
|
154
182
|
* Whether the word is stressed.
|
|
155
183
|
*/
|
|
156
|
-
stress
|
|
184
|
+
stress;
|
|
185
|
+
constructor(e = {}) {
|
|
186
|
+
this.time = e.time, this.content = e.content ?? "", this.language = e.language, this.annotation = e.annotation, this.stress = e.stress ?? !1;
|
|
187
|
+
}
|
|
157
188
|
}
|
|
158
|
-
class
|
|
189
|
+
class Lr {
|
|
159
190
|
/**
|
|
160
191
|
* Discriminant marking this as a space.
|
|
161
192
|
*/
|
|
@@ -163,182 +194,134 @@ class Ir {
|
|
|
163
194
|
/**
|
|
164
195
|
* Number of consecutive space characters.
|
|
165
196
|
*/
|
|
166
|
-
count
|
|
197
|
+
count;
|
|
198
|
+
constructor(e = {}) {
|
|
199
|
+
this.count = e.count ?? 1;
|
|
200
|
+
}
|
|
167
201
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
202
|
+
var Zt = /* @__PURE__ */ ((r) => (r.Ruby = "Ruby", r.Roman = "Roman", r.Translate = "Translate", r.Unknown = "Unknown", r))(Zt || {});
|
|
203
|
+
const Tr = [
|
|
204
|
+
"Ruby",
|
|
205
|
+
"Roman",
|
|
206
|
+
"Unknown"
|
|
207
|
+
/* Unknown */
|
|
208
|
+
];
|
|
209
|
+
class Jt {
|
|
174
210
|
/**
|
|
175
|
-
*
|
|
211
|
+
* All annotation items in order.
|
|
212
|
+
*
|
|
213
|
+
* Derived items are a snapshot from `deriveLineAnnotation`; re-run it after words change.
|
|
176
214
|
*/
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
215
|
+
list;
|
|
216
|
+
constructor(e = {}) {
|
|
217
|
+
this.list = e.list ?? [];
|
|
218
|
+
}
|
|
180
219
|
/**
|
|
181
|
-
*
|
|
220
|
+
* Whether any item of a kind exists.
|
|
182
221
|
*/
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
class Qt {
|
|
186
|
-
#e;
|
|
187
|
-
constructor(e) {
|
|
188
|
-
this.#e = e;
|
|
222
|
+
has(e) {
|
|
223
|
+
return this.list.some((t) => t.kind === e);
|
|
189
224
|
}
|
|
190
225
|
/**
|
|
191
|
-
*
|
|
226
|
+
* All items of a kind.
|
|
192
227
|
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
for (let h = 0, o = this.#e.words.length; h < o; h++) {
|
|
196
|
-
const a = this.#e.words[h];
|
|
197
|
-
if (a.type === k.Space) {
|
|
198
|
-
n += a.count;
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
const r = e(a);
|
|
202
|
-
r && (c && (t += " ".repeat(n)), t += r.content, i ??= r.language, n = 0, c = !0);
|
|
203
|
-
}
|
|
204
|
-
if (!c)
|
|
205
|
-
return;
|
|
206
|
-
const l = new Y();
|
|
207
|
-
return l.content = t, l.language = i, l;
|
|
228
|
+
all(e) {
|
|
229
|
+
return this.list.filter((t) => t.kind === e);
|
|
208
230
|
}
|
|
209
231
|
/**
|
|
210
|
-
*
|
|
232
|
+
* The first item of a kind, preferring a language match then falling back to the first.
|
|
211
233
|
*/
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
|
|
218
|
-
const h = e(l);
|
|
219
|
-
if (h)
|
|
220
|
-
for (const o of h) {
|
|
221
|
-
const a = o.language ?? "";
|
|
222
|
-
t.includes(a) || t.push(a);
|
|
223
|
-
}
|
|
234
|
+
first(e, t) {
|
|
235
|
+
const n = this.all(e);
|
|
236
|
+
if (t !== void 0) {
|
|
237
|
+
const i = n.find((c) => c.language === t);
|
|
238
|
+
if (i)
|
|
239
|
+
return i;
|
|
224
240
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
241
|
+
return n[0];
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const H = (r, e) => ({
|
|
245
|
+
derived: !1,
|
|
246
|
+
...e,
|
|
247
|
+
kind: r
|
|
248
|
+
}), se = (r, e, t, n) => {
|
|
249
|
+
const i = [];
|
|
250
|
+
for (let o = 0, h = r.length; o < h; o++) {
|
|
251
|
+
const a = r[o];
|
|
252
|
+
if (a.type === k.Space)
|
|
253
|
+
continue;
|
|
254
|
+
const l = e(a);
|
|
255
|
+
if (l)
|
|
256
|
+
for (const s of l) {
|
|
257
|
+
const u = t(s);
|
|
258
|
+
i.includes(u) || i.push(u);
|
|
238
259
|
}
|
|
239
|
-
const o = new Y();
|
|
240
|
-
o.content = c, o.language = i || void 0, n.push(o);
|
|
241
|
-
}
|
|
242
|
-
return n;
|
|
243
260
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
if (c.type === k.Space)
|
|
261
|
+
const c = [];
|
|
262
|
+
for (const o of i) {
|
|
263
|
+
let h = "", a = 0, l, s = !1;
|
|
264
|
+
for (let u = 0, f = r.length; u < f; u++) {
|
|
265
|
+
const E = r[u];
|
|
266
|
+
if (E.type === k.Space) {
|
|
267
|
+
a += E.count;
|
|
252
268
|
continue;
|
|
253
|
-
const l = c.annotation?.unknowns;
|
|
254
|
-
if (l)
|
|
255
|
-
for (const h of l)
|
|
256
|
-
e.includes(h.key) || e.push(h.key);
|
|
257
|
-
}
|
|
258
|
-
if (!e.length)
|
|
259
|
-
return;
|
|
260
|
-
const t = [];
|
|
261
|
-
for (const n of e) {
|
|
262
|
-
let i = "", c = 0, l, h = !1;
|
|
263
|
-
for (let a = 0, r = this.#e.words.length; a < r; a++) {
|
|
264
|
-
const u = this.#e.words[a];
|
|
265
|
-
if (u.type === k.Space) {
|
|
266
|
-
c += u.count;
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
|
-
const f = u.annotation?.unknowns?.find((E) => E.key === n);
|
|
270
|
-
f && (h && (i += " ".repeat(c)), i += f.content, l ??= f.language, c = 0, h = !0);
|
|
271
269
|
}
|
|
272
|
-
const
|
|
273
|
-
|
|
270
|
+
const S = e(E)?.find((d) => t(d) === o);
|
|
271
|
+
S && (s && (h += " ".repeat(a)), h += S.content, l ??= S.language, a = 0, s = !0);
|
|
274
272
|
}
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
this.#s = e;
|
|
315
|
-
}
|
|
316
|
-
#n;
|
|
317
|
-
/**
|
|
318
|
-
* Unknown annotations: the explicit value, otherwise aggregated from words grouped by key.
|
|
319
|
-
*/
|
|
320
|
-
get unknowns() {
|
|
321
|
-
return this.#n ?? this.#o();
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Override the words-derived unknowns with explicit values.
|
|
325
|
-
*/
|
|
326
|
-
set unknowns(e) {
|
|
327
|
-
this.#n = e;
|
|
273
|
+
s && c.push(n(o, h, l));
|
|
274
|
+
}
|
|
275
|
+
return c;
|
|
276
|
+
}, Nr = (r) => {
|
|
277
|
+
const { words: e, annotation: t } = r;
|
|
278
|
+
for (const n of Tr) {
|
|
279
|
+
const i = t.list.some((o) => o.kind === n && !o.derived);
|
|
280
|
+
if (t.list = t.list.filter((o) => !(o.kind === n && o.derived)), i)
|
|
281
|
+
continue;
|
|
282
|
+
let c;
|
|
283
|
+
switch (n) {
|
|
284
|
+
case "Ruby":
|
|
285
|
+
c = se(
|
|
286
|
+
e,
|
|
287
|
+
(o) => {
|
|
288
|
+
const h = o.annotation?.ruby;
|
|
289
|
+
return h ? [h] : void 0;
|
|
290
|
+
},
|
|
291
|
+
() => "",
|
|
292
|
+
(o, h, a) => H("Ruby", { content: h, language: a, derived: !0 })
|
|
293
|
+
);
|
|
294
|
+
break;
|
|
295
|
+
case "Roman":
|
|
296
|
+
c = se(
|
|
297
|
+
e,
|
|
298
|
+
(o) => o.annotation?.romans,
|
|
299
|
+
(o) => o.language ?? "",
|
|
300
|
+
(o, h) => H("Roman", { content: h, language: o || void 0, derived: !0 })
|
|
301
|
+
);
|
|
302
|
+
break;
|
|
303
|
+
default:
|
|
304
|
+
c = se(
|
|
305
|
+
e,
|
|
306
|
+
(o) => o.annotation?.unknowns,
|
|
307
|
+
(o) => o.key,
|
|
308
|
+
(o, h, a) => H("Unknown", { content: h, language: a, key: o, derived: !0 })
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
t.list.push(...c);
|
|
328
312
|
}
|
|
329
|
-
}
|
|
330
|
-
var
|
|
331
|
-
class
|
|
332
|
-
/**
|
|
333
|
-
* Unique identifier of the line.
|
|
334
|
-
*/
|
|
335
|
-
id = B(6).toUpperCase();
|
|
313
|
+
};
|
|
314
|
+
var Qt = /* @__PURE__ */ ((r) => (r.Normal = "Normal", r.Interlude = "Interlude", r))(Qt || {});
|
|
315
|
+
class er {
|
|
336
316
|
/**
|
|
337
317
|
* Time range of the line.
|
|
338
318
|
*/
|
|
339
|
-
time
|
|
319
|
+
time;
|
|
320
|
+
constructor(e = {}) {
|
|
321
|
+
this.time = e.time ?? new Kt();
|
|
322
|
+
}
|
|
340
323
|
}
|
|
341
|
-
class
|
|
324
|
+
class tr extends er {
|
|
342
325
|
/**
|
|
343
326
|
* Discriminant marking this as a normal line.
|
|
344
327
|
*/
|
|
@@ -350,9 +333,18 @@ class rr extends tr {
|
|
|
350
333
|
/**
|
|
351
334
|
* Words composing the line in order.
|
|
352
335
|
*/
|
|
353
|
-
words
|
|
336
|
+
words;
|
|
337
|
+
/**
|
|
338
|
+
* Annotations applied to the whole line, derived from words unless set explicitly.
|
|
339
|
+
*/
|
|
340
|
+
annotation;
|
|
341
|
+
constructor(e = {}) {
|
|
342
|
+
super(e), this.agent = e.agent, this.words = e.words ?? [], this.annotation = e.annotation ?? new Jt(), e.languages && (this.languages = e.languages);
|
|
343
|
+
}
|
|
354
344
|
/**
|
|
355
345
|
* Plain text of the line joined from every word.
|
|
346
|
+
*
|
|
347
|
+
* Live: recomputed from words on each access.
|
|
356
348
|
*/
|
|
357
349
|
get original() {
|
|
358
350
|
let e = "";
|
|
@@ -362,13 +354,9 @@ class rr extends tr {
|
|
|
362
354
|
}
|
|
363
355
|
return e;
|
|
364
356
|
}
|
|
365
|
-
/**
|
|
366
|
-
* Annotations applied to the whole line, derived from words unless set explicitly.
|
|
367
|
-
*/
|
|
368
|
-
annotation = new Qt(this);
|
|
369
357
|
#e;
|
|
370
358
|
/**
|
|
371
|
-
* Language tags of this line: the value
|
|
359
|
+
* Language tags of this line: the explicit value, otherwise live-collected from words on each access.
|
|
372
360
|
*/
|
|
373
361
|
get languages() {
|
|
374
362
|
if (this.#e?.length)
|
|
@@ -387,22 +375,24 @@ class rr extends tr {
|
|
|
387
375
|
this.#e = e;
|
|
388
376
|
}
|
|
389
377
|
}
|
|
390
|
-
class
|
|
378
|
+
class Sr extends tr {
|
|
391
379
|
/**
|
|
392
380
|
* Background lines attached to this line.
|
|
393
381
|
*/
|
|
394
382
|
background;
|
|
383
|
+
constructor(e = {}) {
|
|
384
|
+
super(e), this.background = e.background;
|
|
385
|
+
}
|
|
395
386
|
}
|
|
396
|
-
class
|
|
387
|
+
class Or extends er {
|
|
397
388
|
/**
|
|
398
389
|
* Discriminant marking this as an interlude line.
|
|
399
390
|
*/
|
|
400
391
|
type = "Interlude";
|
|
401
392
|
}
|
|
402
|
-
var
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
type: s,
|
|
393
|
+
var rr = /* @__PURE__ */ ((r) => (r.Offset = "Offset", r.Duration = "Duration", r.Title = "Title", r.Singer = "Singer", r.Album = "Album", r.Creator = "Creator", r.Author = "Author", r.Isrc = "Isrc", r.Unknown = "Unknown", r))(rr || {});
|
|
394
|
+
const Ar = (r, e, t) => ({
|
|
395
|
+
type: r,
|
|
406
396
|
key: e,
|
|
407
397
|
value: t
|
|
408
398
|
});
|
|
@@ -410,162 +400,186 @@ class sr {
|
|
|
410
400
|
/**
|
|
411
401
|
* All meta entries in order.
|
|
412
402
|
*/
|
|
413
|
-
list
|
|
414
|
-
|
|
415
|
-
|
|
403
|
+
list;
|
|
404
|
+
constructor(e = {}) {
|
|
405
|
+
this.list = e.list ?? [];
|
|
416
406
|
}
|
|
417
407
|
/**
|
|
418
|
-
*
|
|
408
|
+
* Whether any entry of a meta type exists.
|
|
419
409
|
*/
|
|
420
|
-
|
|
421
|
-
return this.
|
|
410
|
+
has(e) {
|
|
411
|
+
return this.list.some((t) => t.type === e);
|
|
422
412
|
}
|
|
423
413
|
/**
|
|
424
|
-
* All
|
|
414
|
+
* All entries of a meta type.
|
|
425
415
|
*/
|
|
426
|
-
|
|
427
|
-
return this.
|
|
416
|
+
all(e) {
|
|
417
|
+
return this.list.filter((t) => t.type === e);
|
|
428
418
|
}
|
|
429
419
|
/**
|
|
430
|
-
*
|
|
420
|
+
* The first entry of a meta type.
|
|
431
421
|
*/
|
|
432
|
-
|
|
433
|
-
return this.
|
|
422
|
+
first(e) {
|
|
423
|
+
return this.list.find((t) => t.type === e);
|
|
434
424
|
}
|
|
435
425
|
/**
|
|
436
|
-
* All
|
|
426
|
+
* All entries with the given original key.
|
|
437
427
|
*/
|
|
438
|
-
|
|
439
|
-
return this.
|
|
428
|
+
byKey(e) {
|
|
429
|
+
return this.list.filter((t) => t.key === e);
|
|
440
430
|
}
|
|
431
|
+
}
|
|
432
|
+
var nr = /* @__PURE__ */ ((r) => (r.Person = "Person", r.Group = "Group", r.Other = "Other", r.Unknown = "Unknown", r))(nr || {});
|
|
433
|
+
class wr {
|
|
441
434
|
/**
|
|
442
|
-
*
|
|
435
|
+
* Unique identifier of the agent.
|
|
443
436
|
*/
|
|
444
|
-
|
|
445
|
-
return this.listOf(_.Album);
|
|
446
|
-
}
|
|
437
|
+
id;
|
|
447
438
|
/**
|
|
448
|
-
*
|
|
439
|
+
* Performing type of the agent.
|
|
449
440
|
*/
|
|
450
|
-
|
|
451
|
-
return this.listOf(_.Creator);
|
|
452
|
-
}
|
|
441
|
+
type;
|
|
453
442
|
/**
|
|
454
|
-
*
|
|
443
|
+
* Number of lines performed by this agent.
|
|
444
|
+
*
|
|
445
|
+
* Snapshot filled by `calcAgentIndex` at parse time; stale after lines change.
|
|
455
446
|
*/
|
|
456
|
-
|
|
457
|
-
return this.listOf(_.Author);
|
|
458
|
-
}
|
|
447
|
+
count;
|
|
459
448
|
/**
|
|
460
|
-
*
|
|
449
|
+
* Display names of the agent; a group may carry more than one.
|
|
461
450
|
*/
|
|
462
|
-
|
|
463
|
-
|
|
451
|
+
names;
|
|
452
|
+
constructor(e = {}) {
|
|
453
|
+
this.id = e.id ?? "", this.type = e.type ?? "Unknown", this.count = e.count ?? 0, this.names = e.names ?? [];
|
|
464
454
|
}
|
|
455
|
+
}
|
|
456
|
+
class yr {
|
|
465
457
|
/**
|
|
466
|
-
*
|
|
458
|
+
* Identifier of the referenced agent.
|
|
467
459
|
*/
|
|
468
|
-
|
|
469
|
-
return this.listOf(_.Unknown);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
var nr = /* @__PURE__ */ ((s) => (s.Person = "Person", s.Group = "Group", s.Other = "Other", s.Unknown = "Unknown", s))(nr || {});
|
|
473
|
-
class Or {
|
|
460
|
+
id;
|
|
474
461
|
/**
|
|
475
|
-
*
|
|
462
|
+
* Index of this agent occurrence among all lines.
|
|
463
|
+
*
|
|
464
|
+
* Snapshot filled by `calcAgentIndex` at parse time.
|
|
476
465
|
*/
|
|
477
|
-
|
|
466
|
+
globalIndex;
|
|
478
467
|
/**
|
|
479
|
-
*
|
|
468
|
+
* Index of this agent occurrence within its block.
|
|
469
|
+
*
|
|
470
|
+
* Snapshot filled by `calcAgentIndex` at parse time.
|
|
480
471
|
*/
|
|
481
|
-
|
|
472
|
+
blockIndex;
|
|
473
|
+
constructor(e = {}) {
|
|
474
|
+
this.id = e.id ?? "", this.globalIndex = e.globalIndex ?? 0, this.blockIndex = e.blockIndex ?? 0;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
class ir {
|
|
482
478
|
/**
|
|
483
|
-
*
|
|
479
|
+
* All agents in order.
|
|
484
480
|
*/
|
|
485
|
-
|
|
481
|
+
list;
|
|
482
|
+
constructor(e = {}) {
|
|
483
|
+
this.list = e.list ?? [];
|
|
484
|
+
}
|
|
486
485
|
/**
|
|
487
|
-
*
|
|
486
|
+
* Whether any agent of a type exists.
|
|
488
487
|
*/
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
has(e) {
|
|
489
|
+
return this.list.some((t) => t.type === e);
|
|
490
|
+
}
|
|
492
491
|
/**
|
|
493
|
-
*
|
|
492
|
+
* All agents of a type.
|
|
494
493
|
*/
|
|
495
|
-
|
|
494
|
+
all(e) {
|
|
495
|
+
return this.list.filter((t) => t.type === e);
|
|
496
|
+
}
|
|
496
497
|
/**
|
|
497
|
-
*
|
|
498
|
+
* The agent with the given id, used to resolve a LineAgent reference.
|
|
498
499
|
*/
|
|
499
|
-
|
|
500
|
+
byId(e) {
|
|
501
|
+
return this.list.find((t) => t.id === e);
|
|
502
|
+
}
|
|
500
503
|
/**
|
|
501
|
-
*
|
|
504
|
+
* The agent performing the most lines.
|
|
502
505
|
*/
|
|
503
|
-
|
|
506
|
+
get primary() {
|
|
507
|
+
let e;
|
|
508
|
+
for (let t = 0, n = this.list.length; t < n; t++)
|
|
509
|
+
(!e || this.list[t].count > e.count) && (e = this.list[t]);
|
|
510
|
+
return e;
|
|
511
|
+
}
|
|
504
512
|
}
|
|
505
|
-
const
|
|
506
|
-
var
|
|
507
|
-
class
|
|
513
|
+
const ar = "0.9.0";
|
|
514
|
+
var or = /* @__PURE__ */ ((r) => (r.Invalid = "Invalid", r.Empty = "Empty", r.Normal = "Normal", r))(or || {}), lr = /* @__PURE__ */ ((r) => (r.None = "None", r.Line = "Line", r.Syllable = "Syllable", r))(lr || {});
|
|
515
|
+
class Cr {
|
|
508
516
|
/**
|
|
509
517
|
* Schema version of this data model.
|
|
510
518
|
*/
|
|
511
|
-
version =
|
|
519
|
+
version = ar;
|
|
512
520
|
/**
|
|
513
521
|
* Overall classification of the lyric.
|
|
514
522
|
*/
|
|
515
|
-
type
|
|
523
|
+
type;
|
|
516
524
|
/**
|
|
517
525
|
* Timing precision of the lyric.
|
|
518
526
|
*/
|
|
519
|
-
timing
|
|
527
|
+
timing;
|
|
520
528
|
/**
|
|
521
529
|
* Metadata of the lyric.
|
|
522
530
|
*/
|
|
523
|
-
meta
|
|
531
|
+
meta;
|
|
524
532
|
/**
|
|
525
533
|
* Language distribution of the lyric.
|
|
526
534
|
*/
|
|
527
|
-
language
|
|
535
|
+
language;
|
|
528
536
|
/**
|
|
529
537
|
* Performing agents referenced by lines.
|
|
530
538
|
*/
|
|
531
|
-
|
|
539
|
+
agent;
|
|
532
540
|
/**
|
|
533
541
|
* Lyric lines in order.
|
|
534
542
|
*/
|
|
535
|
-
lines
|
|
543
|
+
lines;
|
|
544
|
+
constructor(e = {}) {
|
|
545
|
+
this.type = e.type ?? "Invalid", this.timing = e.timing ?? "None", this.meta = e.meta ?? new sr(), this.language = e.language ?? new Yt(), this.agent = e.agent ?? new ir(), this.lines = e.lines ?? [];
|
|
546
|
+
}
|
|
536
547
|
}
|
|
537
|
-
const
|
|
548
|
+
const X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
538
549
|
__proto__: null,
|
|
539
|
-
Agent:
|
|
550
|
+
Agent: ir,
|
|
551
|
+
AgentItem: wr,
|
|
540
552
|
AgentType: nr,
|
|
541
|
-
Info:
|
|
542
|
-
InfoTiming:
|
|
543
|
-
InfoType:
|
|
553
|
+
Info: Cr,
|
|
554
|
+
InfoTiming: lr,
|
|
555
|
+
InfoType: or,
|
|
544
556
|
Language: Yt,
|
|
545
|
-
LanguageItem:
|
|
557
|
+
LanguageItem: Er,
|
|
546
558
|
LanguageType: zt,
|
|
547
|
-
LineAgent:
|
|
548
|
-
LineAnnotation:
|
|
549
|
-
|
|
550
|
-
LineInterlude:
|
|
551
|
-
LineNormal:
|
|
552
|
-
LineNormalBase:
|
|
553
|
-
LineType:
|
|
554
|
-
LineUnknownAnnotation: Zt,
|
|
559
|
+
LineAgent: yr,
|
|
560
|
+
LineAnnotation: Jt,
|
|
561
|
+
LineAnnotationKind: Zt,
|
|
562
|
+
LineInterlude: Or,
|
|
563
|
+
LineNormal: Sr,
|
|
564
|
+
LineNormalBase: tr,
|
|
565
|
+
LineType: Qt,
|
|
555
566
|
Meta: sr,
|
|
556
|
-
MetaType:
|
|
567
|
+
MetaType: rr,
|
|
557
568
|
Time: Kt,
|
|
558
|
-
Version:
|
|
559
|
-
WordAnnotation:
|
|
560
|
-
WordAnnotationContent:
|
|
561
|
-
WordAnnotationItem:
|
|
562
|
-
WordNormal:
|
|
563
|
-
|
|
569
|
+
Version: ar,
|
|
570
|
+
WordAnnotation: Ir,
|
|
571
|
+
WordAnnotationContent: gr,
|
|
572
|
+
WordAnnotationItem: ze,
|
|
573
|
+
WordNormal: $r,
|
|
574
|
+
WordRubyAnnotation: Rr,
|
|
575
|
+
WordSpace: Lr,
|
|
564
576
|
WordType: k,
|
|
565
|
-
WordUnknownAnnotation:
|
|
566
|
-
|
|
577
|
+
WordUnknownAnnotation: vr,
|
|
578
|
+
createLineAnnotationItem: H,
|
|
579
|
+
createMetaItem: Ar,
|
|
580
|
+
deriveLineAnnotation: Nr
|
|
567
581
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
568
|
-
class
|
|
582
|
+
class Pr {
|
|
569
583
|
lines = [];
|
|
570
584
|
mergedEnd = [];
|
|
571
585
|
/**
|
|
@@ -587,13 +601,13 @@ class wr {
|
|
|
587
601
|
this.mergedEnd = c;
|
|
588
602
|
return;
|
|
589
603
|
}
|
|
590
|
-
const
|
|
591
|
-
let
|
|
592
|
-
c[i - 1] =
|
|
593
|
-
let
|
|
594
|
-
for (let
|
|
595
|
-
const u = this.getRawTime(
|
|
596
|
-
|
|
604
|
+
const o = Math.max(0, t), h = n > 0 ? n : 1 / 0;
|
|
605
|
+
let a = this.getRawTime(i - 1);
|
|
606
|
+
c[i - 1] = a;
|
|
607
|
+
let l = 1;
|
|
608
|
+
for (let s = i - 2; s >= 0; s--) {
|
|
609
|
+
const u = this.getRawTime(s);
|
|
610
|
+
o > 0 && l < h && Math.abs(a - u) < o ? (c[s] = Math.max(u, c[s + 1]), l++) : (c[s] = u, l = 1), a = u;
|
|
597
611
|
}
|
|
598
612
|
this.mergedEnd = c;
|
|
599
613
|
}
|
|
@@ -605,7 +619,7 @@ class wr {
|
|
|
605
619
|
return t === void 0 ? this.getRawTime(e) : t;
|
|
606
620
|
}
|
|
607
621
|
}
|
|
608
|
-
class
|
|
622
|
+
class qr {
|
|
609
623
|
temp = 0;
|
|
610
624
|
meta = 0;
|
|
611
625
|
setTemp(e) {
|
|
@@ -619,7 +633,7 @@ class Ar {
|
|
|
619
633
|
this.meta = 0;
|
|
620
634
|
return;
|
|
621
635
|
}
|
|
622
|
-
const n = e.meta.
|
|
636
|
+
const n = e.meta.first(X.MetaType.Offset)?.value;
|
|
623
637
|
this.meta = typeof n == "number" && Number.isFinite(n) ? n : 0;
|
|
624
638
|
}
|
|
625
639
|
resolve(e) {
|
|
@@ -627,7 +641,7 @@ class Ar {
|
|
|
627
641
|
return Number.isFinite(t) ? t : 0;
|
|
628
642
|
}
|
|
629
643
|
}
|
|
630
|
-
class
|
|
644
|
+
class br {
|
|
631
645
|
frameId = null;
|
|
632
646
|
timerId = null;
|
|
633
647
|
schedule(e, t) {
|
|
@@ -644,13 +658,13 @@ class yr {
|
|
|
644
658
|
this.frameId !== null && (globalThis.cancelAnimationFrame(this.frameId), this.frameId = null), this.timerId !== null && (globalThis.clearTimeout(this.timerId), this.timerId = null);
|
|
645
659
|
}
|
|
646
660
|
}
|
|
647
|
-
var
|
|
648
|
-
function
|
|
649
|
-
if (tt) return
|
|
661
|
+
var W = { exports: {} }, ne, tt;
|
|
662
|
+
function z() {
|
|
663
|
+
if (tt) return ne;
|
|
650
664
|
tt = 1;
|
|
651
|
-
const
|
|
665
|
+
const r = "2.0.0", e = 256, t = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
652
666
|
9007199254740991, n = 16, i = e - 6;
|
|
653
|
-
return
|
|
667
|
+
return ne = {
|
|
654
668
|
MAX_LENGTH: e,
|
|
655
669
|
MAX_SAFE_COMPONENT_LENGTH: n,
|
|
656
670
|
MAX_SAFE_BUILD_LENGTH: i,
|
|
@@ -664,86 +678,86 @@ function K() {
|
|
|
664
678
|
"prepatch",
|
|
665
679
|
"prerelease"
|
|
666
680
|
],
|
|
667
|
-
SEMVER_SPEC_VERSION:
|
|
681
|
+
SEMVER_SPEC_VERSION: r,
|
|
668
682
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
669
683
|
FLAG_LOOSE: 2
|
|
670
|
-
},
|
|
684
|
+
}, ne;
|
|
671
685
|
}
|
|
672
|
-
var
|
|
673
|
-
function
|
|
674
|
-
return rt || (rt = 1,
|
|
675
|
-
}),
|
|
686
|
+
var ie, rt;
|
|
687
|
+
function Y() {
|
|
688
|
+
return rt || (rt = 1, ie = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
|
|
689
|
+
}), ie;
|
|
676
690
|
}
|
|
677
691
|
var st;
|
|
678
|
-
function
|
|
679
|
-
return st || (st = 1, (function(
|
|
692
|
+
function B() {
|
|
693
|
+
return st || (st = 1, (function(r, e) {
|
|
680
694
|
const {
|
|
681
695
|
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
682
696
|
MAX_SAFE_BUILD_LENGTH: n,
|
|
683
697
|
MAX_LENGTH: i
|
|
684
|
-
} =
|
|
685
|
-
e =
|
|
686
|
-
const
|
|
698
|
+
} = z(), c = Y();
|
|
699
|
+
e = r.exports = {};
|
|
700
|
+
const o = e.re = [], h = e.safeRe = [], a = e.src = [], l = e.safeSrc = [], s = e.t = {};
|
|
687
701
|
let u = 0;
|
|
688
702
|
const f = "[a-zA-Z0-9-]", E = [
|
|
689
703
|
["\\s", 1],
|
|
690
704
|
["\\d", i],
|
|
691
705
|
[f, n]
|
|
692
|
-
], S = (
|
|
693
|
-
for (const [
|
|
694
|
-
|
|
695
|
-
return
|
|
696
|
-
},
|
|
697
|
-
const
|
|
698
|
-
c(
|
|
706
|
+
], S = (N) => {
|
|
707
|
+
for (const [A, b] of E)
|
|
708
|
+
N = N.split(`${A}*`).join(`${A}{0,${b}}`).split(`${A}+`).join(`${A}{1,${b}}`);
|
|
709
|
+
return N;
|
|
710
|
+
}, d = (N, A, b) => {
|
|
711
|
+
const w = S(A), G = u++;
|
|
712
|
+
c(N, G, A), s[N] = G, a[G] = A, l[G] = w, o[G] = new RegExp(A, b ? "g" : void 0), h[G] = new RegExp(w, b ? "g" : void 0);
|
|
699
713
|
};
|
|
700
|
-
|
|
701
|
-
})(
|
|
714
|
+
d("NUMERICIDENTIFIER", "0|[1-9]\\d*"), d("NUMERICIDENTIFIERLOOSE", "\\d+"), d("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${f}*`), d("MAINVERSION", `(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`), d("MAINVERSIONLOOSE", `(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASEIDENTIFIER", `(?:${a[s.NONNUMERICIDENTIFIER]}|${a[s.NUMERICIDENTIFIER]})`), d("PRERELEASEIDENTIFIERLOOSE", `(?:${a[s.NONNUMERICIDENTIFIER]}|${a[s.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASE", `(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`), d("PRERELEASELOOSE", `(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`), d("BUILDIDENTIFIER", `${f}+`), d("BUILD", `(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`), d("FULLPLAIN", `v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`), d("FULL", `^${a[s.FULLPLAIN]}$`), d("LOOSEPLAIN", `[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`), d("LOOSE", `^${a[s.LOOSEPLAIN]}$`), d("GTLT", "((?:<|>)?=?)"), d("XRANGEIDENTIFIERLOOSE", `${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), d("XRANGEIDENTIFIER", `${a[s.NUMERICIDENTIFIER]}|x|X|\\*`), d("XRANGEPLAIN", `[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`), d("XRANGEPLAINLOOSE", `[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`), d("XRANGE", `^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`), d("XRANGELOOSE", `^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`), d("COERCEPLAIN", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`), d("COERCE", `${a[s.COERCEPLAIN]}(?:$|[^\\d])`), d("COERCEFULL", a[s.COERCEPLAIN] + `(?:${a[s.PRERELEASE]})?(?:${a[s.BUILD]})?(?:$|[^\\d])`), d("COERCERTL", a[s.COERCE], !0), d("COERCERTLFULL", a[s.COERCEFULL], !0), d("LONETILDE", "(?:~>?)"), d("TILDETRIM", `(\\s*)${a[s.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", d("TILDE", `^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`), d("TILDELOOSE", `^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`), d("LONECARET", "(?:\\^)"), d("CARETTRIM", `(\\s*)${a[s.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", d("CARET", `^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`), d("CARETLOOSE", `^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`), d("COMPARATORLOOSE", `^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`), d("COMPARATOR", `^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`), d("COMPARATORTRIM", `(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", d("HYPHENRANGE", `^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`), d("HYPHENRANGELOOSE", `^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`), d("STAR", "(<|>)?=?\\s*\\*"), d("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), d("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
715
|
+
})(W, W.exports)), W.exports;
|
|
702
716
|
}
|
|
703
|
-
var
|
|
717
|
+
var ae, nt;
|
|
704
718
|
function Ye() {
|
|
705
|
-
if (nt) return
|
|
719
|
+
if (nt) return ae;
|
|
706
720
|
nt = 1;
|
|
707
|
-
const
|
|
708
|
-
return
|
|
721
|
+
const r = Object.freeze({ loose: !0 }), e = Object.freeze({});
|
|
722
|
+
return ae = (n) => n ? typeof n != "object" ? r : n : e, ae;
|
|
709
723
|
}
|
|
710
|
-
var
|
|
711
|
-
function
|
|
712
|
-
if (it) return
|
|
724
|
+
var oe, it;
|
|
725
|
+
function cr() {
|
|
726
|
+
if (it) return oe;
|
|
713
727
|
it = 1;
|
|
714
|
-
const
|
|
728
|
+
const r = /^[0-9]+$/, e = (n, i) => {
|
|
715
729
|
if (typeof n == "number" && typeof i == "number")
|
|
716
730
|
return n === i ? 0 : n < i ? -1 : 1;
|
|
717
|
-
const c =
|
|
718
|
-
return c &&
|
|
731
|
+
const c = r.test(n), o = r.test(i);
|
|
732
|
+
return c && o && (n = +n, i = +i), n === i ? 0 : c && !o ? -1 : o && !c ? 1 : n < i ? -1 : 1;
|
|
719
733
|
};
|
|
720
|
-
return
|
|
734
|
+
return oe = {
|
|
721
735
|
compareIdentifiers: e,
|
|
722
736
|
rcompareIdentifiers: (n, i) => e(i, n)
|
|
723
|
-
},
|
|
737
|
+
}, oe;
|
|
724
738
|
}
|
|
725
|
-
var
|
|
726
|
-
function
|
|
727
|
-
if (at) return
|
|
739
|
+
var le, at;
|
|
740
|
+
function D() {
|
|
741
|
+
if (at) return le;
|
|
728
742
|
at = 1;
|
|
729
|
-
const
|
|
743
|
+
const r = Y(), { MAX_LENGTH: e, MAX_SAFE_INTEGER: t } = z(), { safeRe: n, t: i } = B(), c = Ye(), { compareIdentifiers: o } = cr();
|
|
730
744
|
class h {
|
|
731
|
-
constructor(
|
|
732
|
-
if (
|
|
733
|
-
if (
|
|
734
|
-
return
|
|
735
|
-
|
|
736
|
-
} else if (typeof
|
|
737
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
|
738
|
-
if (
|
|
745
|
+
constructor(l, s) {
|
|
746
|
+
if (s = c(s), l instanceof h) {
|
|
747
|
+
if (l.loose === !!s.loose && l.includePrerelease === !!s.includePrerelease)
|
|
748
|
+
return l;
|
|
749
|
+
l = l.version;
|
|
750
|
+
} else if (typeof l != "string")
|
|
751
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);
|
|
752
|
+
if (l.length > e)
|
|
739
753
|
throw new TypeError(
|
|
740
754
|
`version is longer than ${e} characters`
|
|
741
755
|
);
|
|
742
|
-
|
|
743
|
-
const u =
|
|
756
|
+
r("SemVer", l, s), this.options = s, this.loose = !!s.loose, this.includePrerelease = !!s.includePrerelease;
|
|
757
|
+
const u = l.trim().match(s.loose ? n[i.LOOSE] : n[i.FULL]);
|
|
744
758
|
if (!u)
|
|
745
|
-
throw new TypeError(`Invalid Version: ${
|
|
746
|
-
if (this.raw =
|
|
759
|
+
throw new TypeError(`Invalid Version: ${l}`);
|
|
760
|
+
if (this.raw = l, this.major = +u[1], this.minor = +u[2], this.patch = +u[3], this.major > t || this.major < 0)
|
|
747
761
|
throw new TypeError("Invalid major version");
|
|
748
762
|
if (this.minor > t || this.minor < 0)
|
|
749
763
|
throw new TypeError("Invalid minor version");
|
|
@@ -764,28 +778,28 @@ function x() {
|
|
|
764
778
|
toString() {
|
|
765
779
|
return this.version;
|
|
766
780
|
}
|
|
767
|
-
compare(
|
|
768
|
-
if (
|
|
769
|
-
if (typeof
|
|
781
|
+
compare(l) {
|
|
782
|
+
if (r("SemVer.compare", this.version, this.options, l), !(l instanceof h)) {
|
|
783
|
+
if (typeof l == "string" && l === this.version)
|
|
770
784
|
return 0;
|
|
771
|
-
|
|
785
|
+
l = new h(l, this.options);
|
|
772
786
|
}
|
|
773
|
-
return
|
|
787
|
+
return l.version === this.version ? 0 : this.compareMain(l) || this.comparePre(l);
|
|
774
788
|
}
|
|
775
|
-
compareMain(
|
|
776
|
-
return
|
|
789
|
+
compareMain(l) {
|
|
790
|
+
return l instanceof h || (l = new h(l, this.options)), this.major < l.major ? -1 : this.major > l.major ? 1 : this.minor < l.minor ? -1 : this.minor > l.minor ? 1 : this.patch < l.patch ? -1 : this.patch > l.patch ? 1 : 0;
|
|
777
791
|
}
|
|
778
|
-
comparePre(
|
|
779
|
-
if (
|
|
792
|
+
comparePre(l) {
|
|
793
|
+
if (l instanceof h || (l = new h(l, this.options)), this.prerelease.length && !l.prerelease.length)
|
|
780
794
|
return -1;
|
|
781
|
-
if (!this.prerelease.length &&
|
|
795
|
+
if (!this.prerelease.length && l.prerelease.length)
|
|
782
796
|
return 1;
|
|
783
|
-
if (!this.prerelease.length && !
|
|
797
|
+
if (!this.prerelease.length && !l.prerelease.length)
|
|
784
798
|
return 0;
|
|
785
|
-
let
|
|
799
|
+
let s = 0;
|
|
786
800
|
do {
|
|
787
|
-
const u = this.prerelease[
|
|
788
|
-
if (
|
|
801
|
+
const u = this.prerelease[s], f = l.prerelease[s];
|
|
802
|
+
if (r("prerelease compare", s, u, f), u === void 0 && f === void 0)
|
|
789
803
|
return 0;
|
|
790
804
|
if (f === void 0)
|
|
791
805
|
return 1;
|
|
@@ -793,15 +807,15 @@ function x() {
|
|
|
793
807
|
return -1;
|
|
794
808
|
if (u === f)
|
|
795
809
|
continue;
|
|
796
|
-
return
|
|
797
|
-
} while (++
|
|
810
|
+
return o(u, f);
|
|
811
|
+
} while (++s);
|
|
798
812
|
}
|
|
799
|
-
compareBuild(
|
|
800
|
-
|
|
801
|
-
let
|
|
813
|
+
compareBuild(l) {
|
|
814
|
+
l instanceof h || (l = new h(l, this.options));
|
|
815
|
+
let s = 0;
|
|
802
816
|
do {
|
|
803
|
-
const u = this.build[
|
|
804
|
-
if (
|
|
817
|
+
const u = this.build[s], f = l.build[s];
|
|
818
|
+
if (r("build compare", s, u, f), u === void 0 && f === void 0)
|
|
805
819
|
return 0;
|
|
806
820
|
if (f === void 0)
|
|
807
821
|
return 1;
|
|
@@ -809,35 +823,35 @@ function x() {
|
|
|
809
823
|
return -1;
|
|
810
824
|
if (u === f)
|
|
811
825
|
continue;
|
|
812
|
-
return
|
|
813
|
-
} while (++
|
|
826
|
+
return o(u, f);
|
|
827
|
+
} while (++s);
|
|
814
828
|
}
|
|
815
829
|
// preminor will bump the version up to the next minor release, and immediately
|
|
816
830
|
// down to pre-release. premajor and prepatch work the same way.
|
|
817
|
-
inc(
|
|
818
|
-
if (
|
|
819
|
-
if (!
|
|
831
|
+
inc(l, s, u) {
|
|
832
|
+
if (l.startsWith("pre")) {
|
|
833
|
+
if (!s && u === !1)
|
|
820
834
|
throw new Error("invalid increment argument: identifier is empty");
|
|
821
|
-
if (
|
|
822
|
-
const f = `-${
|
|
823
|
-
if (!f || f[1] !==
|
|
824
|
-
throw new Error(`invalid identifier: ${
|
|
835
|
+
if (s) {
|
|
836
|
+
const f = `-${s}`.match(this.options.loose ? n[i.PRERELEASELOOSE] : n[i.PRERELEASE]);
|
|
837
|
+
if (!f || f[1] !== s)
|
|
838
|
+
throw new Error(`invalid identifier: ${s}`);
|
|
825
839
|
}
|
|
826
840
|
}
|
|
827
|
-
switch (
|
|
841
|
+
switch (l) {
|
|
828
842
|
case "premajor":
|
|
829
|
-
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre",
|
|
843
|
+
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", s, u);
|
|
830
844
|
break;
|
|
831
845
|
case "preminor":
|
|
832
|
-
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre",
|
|
846
|
+
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", s, u);
|
|
833
847
|
break;
|
|
834
848
|
case "prepatch":
|
|
835
|
-
this.prerelease.length = 0, this.inc("patch",
|
|
849
|
+
this.prerelease.length = 0, this.inc("patch", s, u), this.inc("pre", s, u);
|
|
836
850
|
break;
|
|
837
851
|
// If the input is a non-prerelease version, this acts the same as
|
|
838
852
|
// prepatch.
|
|
839
853
|
case "prerelease":
|
|
840
|
-
this.prerelease.length === 0 && this.inc("patch",
|
|
854
|
+
this.prerelease.length === 0 && this.inc("patch", s, u), this.inc("pre", s, u);
|
|
841
855
|
break;
|
|
842
856
|
case "release":
|
|
843
857
|
if (this.prerelease.length === 0)
|
|
@@ -864,263 +878,263 @@ function x() {
|
|
|
864
878
|
for (; --E >= 0; )
|
|
865
879
|
typeof this.prerelease[E] == "number" && (this.prerelease[E]++, E = -2);
|
|
866
880
|
if (E === -1) {
|
|
867
|
-
if (
|
|
881
|
+
if (s === this.prerelease.join(".") && u === !1)
|
|
868
882
|
throw new Error("invalid increment argument: identifier already exists");
|
|
869
883
|
this.prerelease.push(f);
|
|
870
884
|
}
|
|
871
885
|
}
|
|
872
|
-
if (
|
|
873
|
-
let E = [
|
|
874
|
-
u === !1 && (E = [
|
|
886
|
+
if (s) {
|
|
887
|
+
let E = [s, f];
|
|
888
|
+
u === !1 && (E = [s]), o(this.prerelease[0], s) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = E) : this.prerelease = E;
|
|
875
889
|
}
|
|
876
890
|
break;
|
|
877
891
|
}
|
|
878
892
|
default:
|
|
879
|
-
throw new Error(`invalid increment argument: ${
|
|
893
|
+
throw new Error(`invalid increment argument: ${l}`);
|
|
880
894
|
}
|
|
881
895
|
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
882
896
|
}
|
|
883
897
|
}
|
|
884
|
-
return
|
|
898
|
+
return le = h, le;
|
|
885
899
|
}
|
|
886
|
-
var
|
|
887
|
-
function
|
|
888
|
-
if (ot) return
|
|
900
|
+
var ce, ot;
|
|
901
|
+
function j() {
|
|
902
|
+
if (ot) return ce;
|
|
889
903
|
ot = 1;
|
|
890
|
-
const
|
|
891
|
-
return
|
|
892
|
-
if (t instanceof
|
|
904
|
+
const r = D();
|
|
905
|
+
return ce = (t, n, i = !1) => {
|
|
906
|
+
if (t instanceof r)
|
|
893
907
|
return t;
|
|
894
908
|
try {
|
|
895
|
-
return new
|
|
909
|
+
return new r(t, n);
|
|
896
910
|
} catch (c) {
|
|
897
911
|
if (!i)
|
|
898
912
|
return null;
|
|
899
913
|
throw c;
|
|
900
914
|
}
|
|
901
|
-
},
|
|
915
|
+
}, ce;
|
|
902
916
|
}
|
|
903
|
-
var
|
|
904
|
-
function
|
|
905
|
-
if (lt) return
|
|
917
|
+
var ue, lt;
|
|
918
|
+
function Gr() {
|
|
919
|
+
if (lt) return ue;
|
|
906
920
|
lt = 1;
|
|
907
|
-
const
|
|
908
|
-
return
|
|
909
|
-
const i =
|
|
921
|
+
const r = j();
|
|
922
|
+
return ue = (t, n) => {
|
|
923
|
+
const i = r(t, n);
|
|
910
924
|
return i ? i.version : null;
|
|
911
|
-
},
|
|
925
|
+
}, ue;
|
|
912
926
|
}
|
|
913
|
-
var
|
|
914
|
-
function
|
|
915
|
-
if (ct) return
|
|
927
|
+
var he, ct;
|
|
928
|
+
function xr() {
|
|
929
|
+
if (ct) return he;
|
|
916
930
|
ct = 1;
|
|
917
|
-
const
|
|
918
|
-
return
|
|
919
|
-
const i =
|
|
931
|
+
const r = j();
|
|
932
|
+
return he = (t, n) => {
|
|
933
|
+
const i = r(t.trim().replace(/^[=v]+/, ""), n);
|
|
920
934
|
return i ? i.version : null;
|
|
921
|
-
},
|
|
935
|
+
}, he;
|
|
922
936
|
}
|
|
923
|
-
var
|
|
924
|
-
function
|
|
925
|
-
if (ut) return
|
|
937
|
+
var fe, ut;
|
|
938
|
+
function Dr() {
|
|
939
|
+
if (ut) return fe;
|
|
926
940
|
ut = 1;
|
|
927
|
-
const
|
|
928
|
-
return
|
|
929
|
-
typeof i == "string" && (
|
|
941
|
+
const r = D();
|
|
942
|
+
return fe = (t, n, i, c, o) => {
|
|
943
|
+
typeof i == "string" && (o = c, c = i, i = void 0);
|
|
930
944
|
try {
|
|
931
|
-
return new
|
|
932
|
-
t instanceof
|
|
945
|
+
return new r(
|
|
946
|
+
t instanceof r ? t.version : t,
|
|
933
947
|
i
|
|
934
|
-
).inc(n, c,
|
|
948
|
+
).inc(n, c, o).version;
|
|
935
949
|
} catch {
|
|
936
950
|
return null;
|
|
937
951
|
}
|
|
938
|
-
},
|
|
952
|
+
}, fe;
|
|
939
953
|
}
|
|
940
|
-
var
|
|
941
|
-
function
|
|
942
|
-
if (ht) return
|
|
954
|
+
var me, ht;
|
|
955
|
+
function _r() {
|
|
956
|
+
if (ht) return me;
|
|
943
957
|
ht = 1;
|
|
944
|
-
const
|
|
945
|
-
return
|
|
946
|
-
const i =
|
|
947
|
-
if (
|
|
958
|
+
const r = j();
|
|
959
|
+
return me = (t, n) => {
|
|
960
|
+
const i = r(t, null, !0), c = r(n, null, !0), o = i.compare(c);
|
|
961
|
+
if (o === 0)
|
|
948
962
|
return null;
|
|
949
|
-
const h =
|
|
950
|
-
if (!!
|
|
951
|
-
if (!
|
|
963
|
+
const h = o > 0, a = h ? i : c, l = h ? c : i, s = !!a.prerelease.length;
|
|
964
|
+
if (!!l.prerelease.length && !s) {
|
|
965
|
+
if (!l.patch && !l.minor)
|
|
952
966
|
return "major";
|
|
953
|
-
if (
|
|
954
|
-
return
|
|
967
|
+
if (l.compareMain(a) === 0)
|
|
968
|
+
return l.minor && !l.patch ? "minor" : "patch";
|
|
955
969
|
}
|
|
956
|
-
const f =
|
|
970
|
+
const f = s ? "pre" : "";
|
|
957
971
|
return i.major !== c.major ? f + "major" : i.minor !== c.minor ? f + "minor" : i.patch !== c.patch ? f + "patch" : "prerelease";
|
|
958
|
-
},
|
|
972
|
+
}, me;
|
|
959
973
|
}
|
|
960
974
|
var de, ft;
|
|
961
|
-
function
|
|
975
|
+
function Ur() {
|
|
962
976
|
if (ft) return de;
|
|
963
977
|
ft = 1;
|
|
964
|
-
const
|
|
965
|
-
return de = (t, n) => new
|
|
978
|
+
const r = D();
|
|
979
|
+
return de = (t, n) => new r(t, n).major, de;
|
|
966
980
|
}
|
|
967
|
-
var
|
|
968
|
-
function
|
|
969
|
-
if (mt) return
|
|
981
|
+
var pe, mt;
|
|
982
|
+
function Fr() {
|
|
983
|
+
if (mt) return pe;
|
|
970
984
|
mt = 1;
|
|
971
|
-
const
|
|
972
|
-
return
|
|
985
|
+
const r = D();
|
|
986
|
+
return pe = (t, n) => new r(t, n).minor, pe;
|
|
987
|
+
}
|
|
988
|
+
var Ee, dt;
|
|
989
|
+
function kr() {
|
|
990
|
+
if (dt) return Ee;
|
|
991
|
+
dt = 1;
|
|
992
|
+
const r = D();
|
|
993
|
+
return Ee = (t, n) => new r(t, n).patch, Ee;
|
|
973
994
|
}
|
|
974
995
|
var ge, pt;
|
|
975
|
-
function
|
|
996
|
+
function jr() {
|
|
976
997
|
if (pt) return ge;
|
|
977
998
|
pt = 1;
|
|
978
|
-
const
|
|
979
|
-
return ge = (t, n) =>
|
|
980
|
-
|
|
981
|
-
var Re, dt;
|
|
982
|
-
function Ur() {
|
|
983
|
-
if (dt) return Re;
|
|
984
|
-
dt = 1;
|
|
985
|
-
const s = M();
|
|
986
|
-
return Re = (t, n) => {
|
|
987
|
-
const i = s(t, n);
|
|
999
|
+
const r = j();
|
|
1000
|
+
return ge = (t, n) => {
|
|
1001
|
+
const i = r(t, n);
|
|
988
1002
|
return i && i.prerelease.length ? i.prerelease : null;
|
|
989
|
-
},
|
|
1003
|
+
}, ge;
|
|
990
1004
|
}
|
|
991
|
-
var
|
|
992
|
-
function
|
|
993
|
-
if (Et) return
|
|
1005
|
+
var Re, Et;
|
|
1006
|
+
function U() {
|
|
1007
|
+
if (Et) return Re;
|
|
994
1008
|
Et = 1;
|
|
995
|
-
const
|
|
996
|
-
return
|
|
1009
|
+
const r = D();
|
|
1010
|
+
return Re = (t, n, i) => new r(t, i).compare(new r(n, i)), Re;
|
|
997
1011
|
}
|
|
998
|
-
var
|
|
999
|
-
function
|
|
1000
|
-
if (gt) return
|
|
1012
|
+
var ve, gt;
|
|
1013
|
+
function Mr() {
|
|
1014
|
+
if (gt) return ve;
|
|
1001
1015
|
gt = 1;
|
|
1002
|
-
const
|
|
1003
|
-
return
|
|
1016
|
+
const r = U();
|
|
1017
|
+
return ve = (t, n, i) => r(n, t, i), ve;
|
|
1004
1018
|
}
|
|
1005
|
-
var
|
|
1006
|
-
function
|
|
1007
|
-
if (Rt) return
|
|
1019
|
+
var Ie, Rt;
|
|
1020
|
+
function Vr() {
|
|
1021
|
+
if (Rt) return Ie;
|
|
1008
1022
|
Rt = 1;
|
|
1009
|
-
const
|
|
1010
|
-
return
|
|
1023
|
+
const r = U();
|
|
1024
|
+
return Ie = (t, n) => r(t, n, !0), Ie;
|
|
1011
1025
|
}
|
|
1012
|
-
var
|
|
1026
|
+
var $e, vt;
|
|
1013
1027
|
function Ke() {
|
|
1014
|
-
if (vt) return
|
|
1028
|
+
if (vt) return $e;
|
|
1015
1029
|
vt = 1;
|
|
1016
|
-
const
|
|
1017
|
-
return
|
|
1018
|
-
const c = new
|
|
1019
|
-
return c.compare(
|
|
1020
|
-
},
|
|
1030
|
+
const r = D();
|
|
1031
|
+
return $e = (t, n, i) => {
|
|
1032
|
+
const c = new r(t, i), o = new r(n, i);
|
|
1033
|
+
return c.compare(o) || c.compareBuild(o);
|
|
1034
|
+
}, $e;
|
|
1021
1035
|
}
|
|
1022
|
-
var
|
|
1023
|
-
function
|
|
1024
|
-
if (It) return
|
|
1036
|
+
var Le, It;
|
|
1037
|
+
function Xr() {
|
|
1038
|
+
if (It) return Le;
|
|
1025
1039
|
It = 1;
|
|
1026
|
-
const
|
|
1027
|
-
return
|
|
1040
|
+
const r = Ke();
|
|
1041
|
+
return Le = (t, n) => t.sort((i, c) => r(i, c, n)), Le;
|
|
1028
1042
|
}
|
|
1029
|
-
var
|
|
1030
|
-
function
|
|
1031
|
-
if ($t) return
|
|
1043
|
+
var Te, $t;
|
|
1044
|
+
function Br() {
|
|
1045
|
+
if ($t) return Te;
|
|
1032
1046
|
$t = 1;
|
|
1033
|
-
const
|
|
1034
|
-
return
|
|
1047
|
+
const r = Ke();
|
|
1048
|
+
return Te = (t, n) => t.sort((i, c) => r(c, i, n)), Te;
|
|
1035
1049
|
}
|
|
1036
|
-
var
|
|
1037
|
-
function
|
|
1038
|
-
if (Lt) return
|
|
1050
|
+
var Ne, Lt;
|
|
1051
|
+
function K() {
|
|
1052
|
+
if (Lt) return Ne;
|
|
1039
1053
|
Lt = 1;
|
|
1040
|
-
const
|
|
1041
|
-
return
|
|
1054
|
+
const r = U();
|
|
1055
|
+
return Ne = (t, n, i) => r(t, n, i) > 0, Ne;
|
|
1042
1056
|
}
|
|
1043
|
-
var
|
|
1044
|
-
function
|
|
1045
|
-
if (Tt) return
|
|
1057
|
+
var Se, Tt;
|
|
1058
|
+
function Ze() {
|
|
1059
|
+
if (Tt) return Se;
|
|
1046
1060
|
Tt = 1;
|
|
1047
|
-
const
|
|
1048
|
-
return
|
|
1061
|
+
const r = U();
|
|
1062
|
+
return Se = (t, n, i) => r(t, n, i) < 0, Se;
|
|
1049
1063
|
}
|
|
1050
|
-
var
|
|
1051
|
-
function
|
|
1052
|
-
if (
|
|
1053
|
-
|
|
1054
|
-
const
|
|
1055
|
-
return
|
|
1064
|
+
var Oe, Nt;
|
|
1065
|
+
function ur() {
|
|
1066
|
+
if (Nt) return Oe;
|
|
1067
|
+
Nt = 1;
|
|
1068
|
+
const r = U();
|
|
1069
|
+
return Oe = (t, n, i) => r(t, n, i) === 0, Oe;
|
|
1056
1070
|
}
|
|
1057
1071
|
var Ae, St;
|
|
1058
|
-
function
|
|
1072
|
+
function hr() {
|
|
1059
1073
|
if (St) return Ae;
|
|
1060
1074
|
St = 1;
|
|
1061
|
-
const
|
|
1062
|
-
return Ae = (t, n, i) =>
|
|
1075
|
+
const r = U();
|
|
1076
|
+
return Ae = (t, n, i) => r(t, n, i) !== 0, Ae;
|
|
1063
1077
|
}
|
|
1064
|
-
var
|
|
1065
|
-
function
|
|
1066
|
-
if (
|
|
1067
|
-
|
|
1068
|
-
const
|
|
1069
|
-
return
|
|
1078
|
+
var we, Ot;
|
|
1079
|
+
function Je() {
|
|
1080
|
+
if (Ot) return we;
|
|
1081
|
+
Ot = 1;
|
|
1082
|
+
const r = U();
|
|
1083
|
+
return we = (t, n, i) => r(t, n, i) >= 0, we;
|
|
1070
1084
|
}
|
|
1071
|
-
var
|
|
1085
|
+
var ye, At;
|
|
1072
1086
|
function Qe() {
|
|
1087
|
+
if (At) return ye;
|
|
1088
|
+
At = 1;
|
|
1089
|
+
const r = U();
|
|
1090
|
+
return ye = (t, n, i) => r(t, n, i) <= 0, ye;
|
|
1091
|
+
}
|
|
1092
|
+
var Ce, wt;
|
|
1093
|
+
function fr() {
|
|
1073
1094
|
if (wt) return Ce;
|
|
1074
1095
|
wt = 1;
|
|
1075
|
-
const
|
|
1076
|
-
return Ce = (
|
|
1077
|
-
|
|
1078
|
-
var Pe, At;
|
|
1079
|
-
function hr() {
|
|
1080
|
-
if (At) return Pe;
|
|
1081
|
-
At = 1;
|
|
1082
|
-
const s = cr(), e = ur(), t = Z(), n = Ze(), i = Je(), c = Qe();
|
|
1083
|
-
return Pe = (h, o, a, r) => {
|
|
1084
|
-
switch (o) {
|
|
1096
|
+
const r = ur(), e = hr(), t = K(), n = Je(), i = Ze(), c = Qe();
|
|
1097
|
+
return Ce = (h, a, l, s) => {
|
|
1098
|
+
switch (a) {
|
|
1085
1099
|
case "===":
|
|
1086
|
-
return typeof h == "object" && (h = h.version), typeof
|
|
1100
|
+
return typeof h == "object" && (h = h.version), typeof l == "object" && (l = l.version), h === l;
|
|
1087
1101
|
case "!==":
|
|
1088
|
-
return typeof h == "object" && (h = h.version), typeof
|
|
1102
|
+
return typeof h == "object" && (h = h.version), typeof l == "object" && (l = l.version), h !== l;
|
|
1089
1103
|
case "":
|
|
1090
1104
|
case "=":
|
|
1091
1105
|
case "==":
|
|
1092
|
-
return
|
|
1106
|
+
return r(h, l, s);
|
|
1093
1107
|
case "!=":
|
|
1094
|
-
return e(h,
|
|
1108
|
+
return e(h, l, s);
|
|
1095
1109
|
case ">":
|
|
1096
|
-
return t(h,
|
|
1110
|
+
return t(h, l, s);
|
|
1097
1111
|
case ">=":
|
|
1098
|
-
return n(h,
|
|
1112
|
+
return n(h, l, s);
|
|
1099
1113
|
case "<":
|
|
1100
|
-
return i(h,
|
|
1114
|
+
return i(h, l, s);
|
|
1101
1115
|
case "<=":
|
|
1102
|
-
return c(h,
|
|
1116
|
+
return c(h, l, s);
|
|
1103
1117
|
default:
|
|
1104
|
-
throw new TypeError(`Invalid operator: ${
|
|
1118
|
+
throw new TypeError(`Invalid operator: ${a}`);
|
|
1105
1119
|
}
|
|
1106
|
-
},
|
|
1120
|
+
}, Ce;
|
|
1107
1121
|
}
|
|
1108
|
-
var
|
|
1109
|
-
function
|
|
1110
|
-
if (yt) return
|
|
1122
|
+
var Pe, yt;
|
|
1123
|
+
function Wr() {
|
|
1124
|
+
if (yt) return Pe;
|
|
1111
1125
|
yt = 1;
|
|
1112
|
-
const
|
|
1113
|
-
return
|
|
1114
|
-
if (c instanceof
|
|
1126
|
+
const r = D(), e = j(), { safeRe: t, t: n } = B();
|
|
1127
|
+
return Pe = (c, o) => {
|
|
1128
|
+
if (c instanceof r)
|
|
1115
1129
|
return c;
|
|
1116
1130
|
if (typeof c == "number" && (c = String(c)), typeof c != "string")
|
|
1117
1131
|
return null;
|
|
1118
|
-
|
|
1132
|
+
o = o || {};
|
|
1119
1133
|
let h = null;
|
|
1120
|
-
if (!
|
|
1121
|
-
h = c.match(
|
|
1134
|
+
if (!o.rtl)
|
|
1135
|
+
h = c.match(o.includePrerelease ? t[n.COERCEFULL] : t[n.COERCE]);
|
|
1122
1136
|
else {
|
|
1123
|
-
const E =
|
|
1137
|
+
const E = o.includePrerelease ? t[n.COERCERTLFULL] : t[n.COERCERTL];
|
|
1124
1138
|
let S;
|
|
1125
1139
|
for (; (S = E.exec(c)) && (!h || h.index + h[0].length !== c.length); )
|
|
1126
1140
|
(!h || S.index + S[0].length !== h.index + h[0].length) && (h = S), E.lastIndex = S.index + S[1].length + S[2].length;
|
|
@@ -1128,15 +1142,15 @@ function Mr() {
|
|
|
1128
1142
|
}
|
|
1129
1143
|
if (h === null)
|
|
1130
1144
|
return null;
|
|
1131
|
-
const
|
|
1132
|
-
return e(`${
|
|
1133
|
-
},
|
|
1145
|
+
const a = h[2], l = h[3] || "0", s = h[4] || "0", u = o.includePrerelease && h[5] ? `-${h[5]}` : "", f = o.includePrerelease && h[6] ? `+${h[6]}` : "";
|
|
1146
|
+
return e(`${a}.${l}.${s}${u}${f}`, o);
|
|
1147
|
+
}, Pe;
|
|
1134
1148
|
}
|
|
1135
|
-
var
|
|
1136
|
-
function
|
|
1137
|
-
if (Ct) return
|
|
1149
|
+
var qe, Ct;
|
|
1150
|
+
function Hr() {
|
|
1151
|
+
if (Ct) return qe;
|
|
1138
1152
|
Ct = 1;
|
|
1139
|
-
class
|
|
1153
|
+
class r {
|
|
1140
1154
|
constructor() {
|
|
1141
1155
|
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
1142
1156
|
}
|
|
@@ -1159,28 +1173,28 @@ function Vr() {
|
|
|
1159
1173
|
return this;
|
|
1160
1174
|
}
|
|
1161
1175
|
}
|
|
1162
|
-
return
|
|
1176
|
+
return qe = r, qe;
|
|
1163
1177
|
}
|
|
1164
1178
|
var be, Pt;
|
|
1165
|
-
function
|
|
1179
|
+
function F() {
|
|
1166
1180
|
if (Pt) return be;
|
|
1167
1181
|
Pt = 1;
|
|
1168
|
-
const
|
|
1182
|
+
const r = /\s+/g;
|
|
1169
1183
|
class e {
|
|
1170
1184
|
constructor(m, v) {
|
|
1171
1185
|
if (v = i(v), m instanceof e)
|
|
1172
1186
|
return m.loose === !!v.loose && m.includePrerelease === !!v.includePrerelease ? m : new e(m.raw, v);
|
|
1173
1187
|
if (m instanceof c)
|
|
1174
1188
|
return this.raw = m.value, this.set = [[m]], this.formatted = void 0, this;
|
|
1175
|
-
if (this.options = v, this.loose = !!v.loose, this.includePrerelease = !!v.includePrerelease, this.raw = m.trim().replace(
|
|
1189
|
+
if (this.options = v, this.loose = !!v.loose, this.includePrerelease = !!v.includePrerelease, this.raw = m.trim().replace(r, " "), this.set = this.raw.split("||").map((g) => this.parseRange(g.trim())).filter((g) => g.length), !this.set.length)
|
|
1176
1190
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
1177
1191
|
if (this.set.length > 1) {
|
|
1178
1192
|
const g = this.set[0];
|
|
1179
|
-
if (this.set = this.set.filter((I) => !
|
|
1193
|
+
if (this.set = this.set.filter((I) => !d(I[0])), this.set.length === 0)
|
|
1180
1194
|
this.set = [g];
|
|
1181
1195
|
else if (this.set.length > 1) {
|
|
1182
1196
|
for (const I of this.set)
|
|
1183
|
-
if (I.length === 1 &&
|
|
1197
|
+
if (I.length === 1 && N(I[0])) {
|
|
1184
1198
|
this.set = [I];
|
|
1185
1199
|
break;
|
|
1186
1200
|
}
|
|
@@ -1210,24 +1224,24 @@ function j() {
|
|
|
1210
1224
|
const g = ((this.options.includePrerelease && E) | (this.options.loose && S)) + ":" + m, I = n.get(g);
|
|
1211
1225
|
if (I)
|
|
1212
1226
|
return I;
|
|
1213
|
-
const R = this.options.loose, $ = R ?
|
|
1214
|
-
m = m.replace($,
|
|
1215
|
-
let
|
|
1216
|
-
R && (
|
|
1217
|
-
const T = /* @__PURE__ */ new Map(), y =
|
|
1227
|
+
const R = this.options.loose, $ = R ? a[l.HYPHENRANGELOOSE] : a[l.HYPHENRANGE];
|
|
1228
|
+
m = m.replace($, te(this.options.includePrerelease)), o("hyphen replace", m), m = m.replace(a[l.COMPARATORTRIM], s), o("comparator trim", m), m = m.replace(a[l.TILDETRIM], u), o("tilde trim", m), m = m.replace(a[l.CARETTRIM], f), o("caret trim", m);
|
|
1229
|
+
let O = m.split(" ").map((P) => b(P, this.options)).join(" ").split(/\s+/).map((P) => ee(P, this.options));
|
|
1230
|
+
R && (O = O.filter((P) => (o("loose invalid filter", P, this.options), !!P.match(a[l.COMPARATORLOOSE])))), o("range list", O);
|
|
1231
|
+
const T = /* @__PURE__ */ new Map(), y = O.map((P) => new c(P, this.options));
|
|
1218
1232
|
for (const P of y) {
|
|
1219
|
-
if (
|
|
1233
|
+
if (d(P))
|
|
1220
1234
|
return [P];
|
|
1221
1235
|
T.set(P.value, P);
|
|
1222
1236
|
}
|
|
1223
1237
|
T.size > 1 && T.has("") && T.delete("");
|
|
1224
|
-
const
|
|
1225
|
-
return n.set(g,
|
|
1238
|
+
const x = [...T.values()];
|
|
1239
|
+
return n.set(g, x), x;
|
|
1226
1240
|
}
|
|
1227
1241
|
intersects(m, v) {
|
|
1228
1242
|
if (!(m instanceof e))
|
|
1229
1243
|
throw new TypeError("a Range is required");
|
|
1230
|
-
return this.set.some((g) =>
|
|
1244
|
+
return this.set.some((g) => A(g, v) && m.set.some((I) => A(I, v) && g.every((R) => I.every(($) => R.intersects($, v)))));
|
|
1231
1245
|
}
|
|
1232
1246
|
// if ANY of the sets match ALL of its comparators, then pass
|
|
1233
1247
|
test(m) {
|
|
@@ -1240,56 +1254,56 @@ function j() {
|
|
|
1240
1254
|
return !1;
|
|
1241
1255
|
}
|
|
1242
1256
|
for (let v = 0; v < this.set.length; v++)
|
|
1243
|
-
if (
|
|
1257
|
+
if (re(this.set[v], m, this.options))
|
|
1244
1258
|
return !0;
|
|
1245
1259
|
return !1;
|
|
1246
1260
|
}
|
|
1247
1261
|
}
|
|
1248
1262
|
be = e;
|
|
1249
|
-
const t =
|
|
1250
|
-
safeRe:
|
|
1251
|
-
t:
|
|
1252
|
-
comparatorTrimReplace:
|
|
1263
|
+
const t = Hr(), n = new t(), i = Ye(), c = Z(), o = Y(), h = D(), {
|
|
1264
|
+
safeRe: a,
|
|
1265
|
+
t: l,
|
|
1266
|
+
comparatorTrimReplace: s,
|
|
1253
1267
|
tildeTrimReplace: u,
|
|
1254
1268
|
caretTrimReplace: f
|
|
1255
|
-
} =
|
|
1269
|
+
} = B(), { FLAG_INCLUDE_PRERELEASE: E, FLAG_LOOSE: S } = z(), d = (p) => p.value === "<0.0.0-0", N = (p) => p.value === "", A = (p, m) => {
|
|
1256
1270
|
let v = !0;
|
|
1257
|
-
const g =
|
|
1271
|
+
const g = p.slice();
|
|
1258
1272
|
let I = g.pop();
|
|
1259
1273
|
for (; v && g.length; )
|
|
1260
1274
|
v = g.every((R) => I.intersects(R, m)), I = g.pop();
|
|
1261
1275
|
return v;
|
|
1262
|
-
},
|
|
1263
|
-
const v = m.loose ?
|
|
1264
|
-
return
|
|
1265
|
-
|
|
1276
|
+
}, b = (p, m) => (p = p.replace(a[l.BUILD], ""), o("comp", p, m), p = C(p, m), o("caret", p), p = G(p, m), o("tildes", p), p = L(p, m), o("xrange", p), p = Q(p, m), o("stars", p), p), w = (p) => !p || p.toLowerCase() === "x" || p === "*", G = (p, m) => p.trim().split(/\s+/).map((v) => _(v, m)).join(" "), _ = (p, m) => {
|
|
1277
|
+
const v = m.loose ? a[l.TILDELOOSE] : a[l.TILDE];
|
|
1278
|
+
return p.replace(v, (g, I, R, $, O) => {
|
|
1279
|
+
o("tilde", p, g, I, R, $, O);
|
|
1266
1280
|
let T;
|
|
1267
|
-
return
|
|
1281
|
+
return w(I) ? T = "" : w(R) ? T = `>=${I}.0.0 <${+I + 1}.0.0-0` : w($) ? T = `>=${I}.${R}.0 <${I}.${+R + 1}.0-0` : O ? (o("replaceTilde pr", O), T = `>=${I}.${R}.${$}-${O} <${I}.${+R + 1}.0-0`) : T = `>=${I}.${R}.${$} <${I}.${+R + 1}.0-0`, o("tilde return", T), T;
|
|
1268
1282
|
});
|
|
1269
|
-
}, C = (
|
|
1270
|
-
|
|
1271
|
-
const v = m.loose ?
|
|
1272
|
-
return
|
|
1273
|
-
|
|
1283
|
+
}, C = (p, m) => p.trim().split(/\s+/).map((v) => q(v, m)).join(" "), q = (p, m) => {
|
|
1284
|
+
o("caret", p, m);
|
|
1285
|
+
const v = m.loose ? a[l.CARETLOOSE] : a[l.CARET], g = m.includePrerelease ? "-0" : "";
|
|
1286
|
+
return p.replace(v, (I, R, $, O, T) => {
|
|
1287
|
+
o("caret", p, I, R, $, O, T);
|
|
1274
1288
|
let y;
|
|
1275
|
-
return
|
|
1289
|
+
return w(R) ? y = "" : w($) ? y = `>=${R}.0.0${g} <${+R + 1}.0.0-0` : w(O) ? R === "0" ? y = `>=${R}.${$}.0${g} <${R}.${+$ + 1}.0-0` : y = `>=${R}.${$}.0${g} <${+R + 1}.0.0-0` : T ? (o("replaceCaret pr", T), R === "0" ? $ === "0" ? y = `>=${R}.${$}.${O}-${T} <${R}.${$}.${+O + 1}-0` : y = `>=${R}.${$}.${O}-${T} <${R}.${+$ + 1}.0-0` : y = `>=${R}.${$}.${O}-${T} <${+R + 1}.0.0-0`) : (o("no pr"), R === "0" ? $ === "0" ? y = `>=${R}.${$}.${O}${g} <${R}.${$}.${+O + 1}-0` : y = `>=${R}.${$}.${O}${g} <${R}.${+$ + 1}.0-0` : y = `>=${R}.${$}.${O} <${+R + 1}.0.0-0`), o("caret return", y), y;
|
|
1276
1290
|
});
|
|
1277
|
-
}, L = (
|
|
1278
|
-
|
|
1279
|
-
const v = m.loose ?
|
|
1280
|
-
return
|
|
1281
|
-
|
|
1282
|
-
const y =
|
|
1283
|
-
return I === "=" &&
|
|
1291
|
+
}, L = (p, m) => (o("replaceXRanges", p, m), p.split(/\s+/).map((v) => M(v, m)).join(" ")), M = (p, m) => {
|
|
1292
|
+
p = p.trim();
|
|
1293
|
+
const v = m.loose ? a[l.XRANGELOOSE] : a[l.XRANGE];
|
|
1294
|
+
return p.replace(v, (g, I, R, $, O, T) => {
|
|
1295
|
+
o("xRange", p, g, I, R, $, O, T);
|
|
1296
|
+
const y = w(R), x = y || w($), P = x || w(O), V = P;
|
|
1297
|
+
return I === "=" && V && (I = ""), T = m.includePrerelease ? "-0" : "", y ? I === ">" || I === "<" ? g = "<0.0.0-0" : g = "*" : I && V ? (x && ($ = 0), O = 0, I === ">" ? (I = ">=", x ? (R = +R + 1, $ = 0, O = 0) : ($ = +$ + 1, O = 0)) : I === "<=" && (I = "<", x ? R = +R + 1 : $ = +$ + 1), I === "<" && (T = "-0"), g = `${I + R}.${$}.${O}${T}`) : x ? g = `>=${R}.0.0${T} <${+R + 1}.0.0-0` : P && (g = `>=${R}.${$}.0${T} <${R}.${+$ + 1}.0-0`), o("xRange return", g), g;
|
|
1284
1298
|
});
|
|
1285
|
-
},
|
|
1286
|
-
for (let g = 0; g <
|
|
1287
|
-
if (!
|
|
1299
|
+
}, Q = (p, m) => (o("replaceStars", p, m), p.trim().replace(a[l.STAR], "")), ee = (p, m) => (o("replaceGTE0", p, m), p.trim().replace(a[m.includePrerelease ? l.GTE0PRE : l.GTE0], "")), te = (p) => (m, v, g, I, R, $, O, T, y, x, P, V) => (w(g) ? v = "" : w(I) ? v = `>=${g}.0.0${p ? "-0" : ""}` : w(R) ? v = `>=${g}.${I}.0${p ? "-0" : ""}` : $ ? v = `>=${v}` : v = `>=${v}${p ? "-0" : ""}`, w(y) ? T = "" : w(x) ? T = `<${+y + 1}.0.0-0` : w(P) ? T = `<${y}.${+x + 1}.0-0` : V ? T = `<=${y}.${x}.${P}-${V}` : p ? T = `<${y}.${x}.${+P + 1}-0` : T = `<=${T}`, `${v} ${T}`.trim()), re = (p, m, v) => {
|
|
1300
|
+
for (let g = 0; g < p.length; g++)
|
|
1301
|
+
if (!p[g].test(m))
|
|
1288
1302
|
return !1;
|
|
1289
1303
|
if (m.prerelease.length && !v.includePrerelease) {
|
|
1290
|
-
for (let g = 0; g <
|
|
1291
|
-
if (
|
|
1292
|
-
const I =
|
|
1304
|
+
for (let g = 0; g < p.length; g++)
|
|
1305
|
+
if (o(p[g].semver), p[g].semver !== c.ANY && p[g].semver.prerelease.length > 0) {
|
|
1306
|
+
const I = p[g].semver;
|
|
1293
1307
|
if (I.major === m.major && I.minor === m.minor && I.patch === m.patch)
|
|
1294
1308
|
return !0;
|
|
1295
1309
|
}
|
|
@@ -1299,256 +1313,256 @@ function j() {
|
|
|
1299
1313
|
};
|
|
1300
1314
|
return be;
|
|
1301
1315
|
}
|
|
1302
|
-
var
|
|
1303
|
-
function
|
|
1304
|
-
if (qt) return
|
|
1316
|
+
var Ge, qt;
|
|
1317
|
+
function Z() {
|
|
1318
|
+
if (qt) return Ge;
|
|
1305
1319
|
qt = 1;
|
|
1306
|
-
const
|
|
1320
|
+
const r = /* @__PURE__ */ Symbol("SemVer ANY");
|
|
1307
1321
|
class e {
|
|
1308
1322
|
static get ANY() {
|
|
1309
|
-
return
|
|
1323
|
+
return r;
|
|
1310
1324
|
}
|
|
1311
|
-
constructor(
|
|
1312
|
-
if (u = t(u),
|
|
1313
|
-
if (
|
|
1314
|
-
return
|
|
1315
|
-
|
|
1325
|
+
constructor(s, u) {
|
|
1326
|
+
if (u = t(u), s instanceof e) {
|
|
1327
|
+
if (s.loose === !!u.loose)
|
|
1328
|
+
return s;
|
|
1329
|
+
s = s.value;
|
|
1316
1330
|
}
|
|
1317
|
-
|
|
1331
|
+
s = s.trim().split(/\s+/).join(" "), o("comparator", s, u), this.options = u, this.loose = !!u.loose, this.parse(s), this.semver === r ? this.value = "" : this.value = this.operator + this.semver.version, o("comp", this);
|
|
1318
1332
|
}
|
|
1319
|
-
parse(
|
|
1320
|
-
const u = this.options.loose ? n[i.COMPARATORLOOSE] : n[i.COMPARATOR], f =
|
|
1333
|
+
parse(s) {
|
|
1334
|
+
const u = this.options.loose ? n[i.COMPARATORLOOSE] : n[i.COMPARATOR], f = s.match(u);
|
|
1321
1335
|
if (!f)
|
|
1322
|
-
throw new TypeError(`Invalid comparator: ${
|
|
1323
|
-
this.operator = f[1] !== void 0 ? f[1] : "", this.operator === "=" && (this.operator = ""), f[2] ? this.semver = new h(f[2], this.options.loose) : this.semver =
|
|
1336
|
+
throw new TypeError(`Invalid comparator: ${s}`);
|
|
1337
|
+
this.operator = f[1] !== void 0 ? f[1] : "", this.operator === "=" && (this.operator = ""), f[2] ? this.semver = new h(f[2], this.options.loose) : this.semver = r;
|
|
1324
1338
|
}
|
|
1325
1339
|
toString() {
|
|
1326
1340
|
return this.value;
|
|
1327
1341
|
}
|
|
1328
|
-
test(
|
|
1329
|
-
if (
|
|
1342
|
+
test(s) {
|
|
1343
|
+
if (o("Comparator.test", s, this.options.loose), this.semver === r || s === r)
|
|
1330
1344
|
return !0;
|
|
1331
|
-
if (typeof
|
|
1345
|
+
if (typeof s == "string")
|
|
1332
1346
|
try {
|
|
1333
|
-
|
|
1347
|
+
s = new h(s, this.options);
|
|
1334
1348
|
} catch {
|
|
1335
1349
|
return !1;
|
|
1336
1350
|
}
|
|
1337
|
-
return c(
|
|
1351
|
+
return c(s, this.operator, this.semver, this.options);
|
|
1338
1352
|
}
|
|
1339
|
-
intersects(
|
|
1340
|
-
if (!(
|
|
1353
|
+
intersects(s, u) {
|
|
1354
|
+
if (!(s instanceof e))
|
|
1341
1355
|
throw new TypeError("a Comparator is required");
|
|
1342
|
-
return this.operator === "" ? this.value === "" ? !0 : new
|
|
1356
|
+
return this.operator === "" ? this.value === "" ? !0 : new a(s.value, u).test(this.value) : s.operator === "" ? s.value === "" ? !0 : new a(this.value, u).test(s.semver) : (u = t(u), u.includePrerelease && (this.value === "<0.0.0-0" || s.value === "<0.0.0-0") || !u.includePrerelease && (this.value.startsWith("<0.0.0") || s.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && s.operator.startsWith(">") || this.operator.startsWith("<") && s.operator.startsWith("<") || this.semver.version === s.semver.version && this.operator.includes("=") && s.operator.includes("=") || c(this.semver, "<", s.semver, u) && this.operator.startsWith(">") && s.operator.startsWith("<") || c(this.semver, ">", s.semver, u) && this.operator.startsWith("<") && s.operator.startsWith(">")));
|
|
1343
1357
|
}
|
|
1344
1358
|
}
|
|
1345
|
-
|
|
1346
|
-
const t = Ye(), { safeRe: n, t: i } =
|
|
1347
|
-
return
|
|
1359
|
+
Ge = e;
|
|
1360
|
+
const t = Ye(), { safeRe: n, t: i } = B(), c = fr(), o = Y(), h = D(), a = F();
|
|
1361
|
+
return Ge;
|
|
1348
1362
|
}
|
|
1349
|
-
var xe,
|
|
1350
|
-
function
|
|
1351
|
-
if (
|
|
1352
|
-
|
|
1353
|
-
const
|
|
1363
|
+
var xe, bt;
|
|
1364
|
+
function J() {
|
|
1365
|
+
if (bt) return xe;
|
|
1366
|
+
bt = 1;
|
|
1367
|
+
const r = F();
|
|
1354
1368
|
return xe = (t, n, i) => {
|
|
1355
1369
|
try {
|
|
1356
|
-
n = new
|
|
1370
|
+
n = new r(n, i);
|
|
1357
1371
|
} catch {
|
|
1358
1372
|
return !1;
|
|
1359
1373
|
}
|
|
1360
1374
|
return n.test(t);
|
|
1361
1375
|
}, xe;
|
|
1362
1376
|
}
|
|
1363
|
-
var
|
|
1364
|
-
function
|
|
1365
|
-
if (
|
|
1366
|
-
|
|
1367
|
-
const
|
|
1368
|
-
return
|
|
1377
|
+
var De, Gt;
|
|
1378
|
+
function zr() {
|
|
1379
|
+
if (Gt) return De;
|
|
1380
|
+
Gt = 1;
|
|
1381
|
+
const r = F();
|
|
1382
|
+
return De = (t, n) => new r(t, n).set.map((i) => i.map((c) => c.value).join(" ").trim().split(" ")), De;
|
|
1369
1383
|
}
|
|
1370
|
-
var _e,
|
|
1371
|
-
function
|
|
1372
|
-
if (
|
|
1373
|
-
|
|
1374
|
-
const
|
|
1384
|
+
var _e, xt;
|
|
1385
|
+
function Yr() {
|
|
1386
|
+
if (xt) return _e;
|
|
1387
|
+
xt = 1;
|
|
1388
|
+
const r = D(), e = F();
|
|
1375
1389
|
return _e = (n, i, c) => {
|
|
1376
|
-
let
|
|
1390
|
+
let o = null, h = null, a = null;
|
|
1377
1391
|
try {
|
|
1378
|
-
|
|
1392
|
+
a = new e(i, c);
|
|
1379
1393
|
} catch {
|
|
1380
1394
|
return null;
|
|
1381
1395
|
}
|
|
1382
|
-
return n.forEach((
|
|
1383
|
-
|
|
1384
|
-
}),
|
|
1396
|
+
return n.forEach((l) => {
|
|
1397
|
+
a.test(l) && (!o || h.compare(l) === -1) && (o = l, h = new r(o, c));
|
|
1398
|
+
}), o;
|
|
1385
1399
|
}, _e;
|
|
1386
1400
|
}
|
|
1387
|
-
var
|
|
1388
|
-
function
|
|
1389
|
-
if (
|
|
1390
|
-
|
|
1391
|
-
const
|
|
1392
|
-
return
|
|
1393
|
-
let
|
|
1401
|
+
var Ue, Dt;
|
|
1402
|
+
function Kr() {
|
|
1403
|
+
if (Dt) return Ue;
|
|
1404
|
+
Dt = 1;
|
|
1405
|
+
const r = D(), e = F();
|
|
1406
|
+
return Ue = (n, i, c) => {
|
|
1407
|
+
let o = null, h = null, a = null;
|
|
1394
1408
|
try {
|
|
1395
|
-
|
|
1409
|
+
a = new e(i, c);
|
|
1396
1410
|
} catch {
|
|
1397
1411
|
return null;
|
|
1398
1412
|
}
|
|
1399
|
-
return n.forEach((
|
|
1400
|
-
|
|
1401
|
-
}),
|
|
1402
|
-
},
|
|
1413
|
+
return n.forEach((l) => {
|
|
1414
|
+
a.test(l) && (!o || h.compare(l) === 1) && (o = l, h = new r(o, c));
|
|
1415
|
+
}), o;
|
|
1416
|
+
}, Ue;
|
|
1403
1417
|
}
|
|
1404
|
-
var
|
|
1405
|
-
function
|
|
1406
|
-
if (
|
|
1407
|
-
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
1418
|
+
var Fe, _t;
|
|
1419
|
+
function Zr() {
|
|
1420
|
+
if (_t) return Fe;
|
|
1421
|
+
_t = 1;
|
|
1422
|
+
const r = D(), e = F(), t = K();
|
|
1423
|
+
return Fe = (i, c) => {
|
|
1410
1424
|
i = new e(i, c);
|
|
1411
|
-
let
|
|
1412
|
-
if (i.test(
|
|
1413
|
-
return
|
|
1414
|
-
|
|
1425
|
+
let o = new r("0.0.0");
|
|
1426
|
+
if (i.test(o) || (o = new r("0.0.0-0"), i.test(o)))
|
|
1427
|
+
return o;
|
|
1428
|
+
o = null;
|
|
1415
1429
|
for (let h = 0; h < i.set.length; ++h) {
|
|
1416
|
-
const
|
|
1417
|
-
let
|
|
1418
|
-
|
|
1419
|
-
const u = new s
|
|
1420
|
-
switch (
|
|
1430
|
+
const a = i.set[h];
|
|
1431
|
+
let l = null;
|
|
1432
|
+
a.forEach((s) => {
|
|
1433
|
+
const u = new r(s.semver.version);
|
|
1434
|
+
switch (s.operator) {
|
|
1421
1435
|
case ">":
|
|
1422
1436
|
u.prerelease.length === 0 ? u.patch++ : u.prerelease.push(0), u.raw = u.format();
|
|
1423
1437
|
/* fallthrough */
|
|
1424
1438
|
case "":
|
|
1425
1439
|
case ">=":
|
|
1426
|
-
(!
|
|
1440
|
+
(!l || t(u, l)) && (l = u);
|
|
1427
1441
|
break;
|
|
1428
1442
|
case "<":
|
|
1429
1443
|
case "<=":
|
|
1430
1444
|
break;
|
|
1431
1445
|
/* istanbul ignore next */
|
|
1432
1446
|
default:
|
|
1433
|
-
throw new Error(`Unexpected operation: ${
|
|
1447
|
+
throw new Error(`Unexpected operation: ${s.operator}`);
|
|
1434
1448
|
}
|
|
1435
|
-
}),
|
|
1449
|
+
}), l && (!o || t(o, l)) && (o = l);
|
|
1436
1450
|
}
|
|
1437
|
-
return
|
|
1438
|
-
},
|
|
1451
|
+
return o && i.test(o) ? o : null;
|
|
1452
|
+
}, Fe;
|
|
1439
1453
|
}
|
|
1440
|
-
var ke,
|
|
1441
|
-
function
|
|
1442
|
-
if (
|
|
1443
|
-
|
|
1444
|
-
const
|
|
1454
|
+
var ke, Ut;
|
|
1455
|
+
function Jr() {
|
|
1456
|
+
if (Ut) return ke;
|
|
1457
|
+
Ut = 1;
|
|
1458
|
+
const r = F();
|
|
1445
1459
|
return ke = (t, n) => {
|
|
1446
1460
|
try {
|
|
1447
|
-
return new
|
|
1461
|
+
return new r(t, n).range || "*";
|
|
1448
1462
|
} catch {
|
|
1449
1463
|
return null;
|
|
1450
1464
|
}
|
|
1451
1465
|
}, ke;
|
|
1452
1466
|
}
|
|
1453
|
-
var
|
|
1467
|
+
var je, Ft;
|
|
1454
1468
|
function et() {
|
|
1455
|
-
if (Ft) return
|
|
1469
|
+
if (Ft) return je;
|
|
1456
1470
|
Ft = 1;
|
|
1457
|
-
const
|
|
1458
|
-
return
|
|
1459
|
-
|
|
1460
|
-
let S,
|
|
1471
|
+
const r = D(), e = Z(), { ANY: t } = e, n = F(), i = J(), c = K(), o = Ze(), h = Qe(), a = Je();
|
|
1472
|
+
return je = (s, u, f, E) => {
|
|
1473
|
+
s = new r(s, E), u = new n(u, E);
|
|
1474
|
+
let S, d, N, A, b;
|
|
1461
1475
|
switch (f) {
|
|
1462
1476
|
case ">":
|
|
1463
|
-
S = c,
|
|
1477
|
+
S = c, d = h, N = o, A = ">", b = ">=";
|
|
1464
1478
|
break;
|
|
1465
1479
|
case "<":
|
|
1466
|
-
S =
|
|
1480
|
+
S = o, d = a, N = c, A = "<", b = "<=";
|
|
1467
1481
|
break;
|
|
1468
1482
|
default:
|
|
1469
1483
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
1470
1484
|
}
|
|
1471
|
-
if (i(
|
|
1485
|
+
if (i(s, u, E))
|
|
1472
1486
|
return !1;
|
|
1473
|
-
for (let
|
|
1474
|
-
const
|
|
1475
|
-
let
|
|
1476
|
-
if (
|
|
1477
|
-
q.semver === t && (q = new e(">=0.0.0")),
|
|
1478
|
-
}),
|
|
1487
|
+
for (let w = 0; w < u.set.length; ++w) {
|
|
1488
|
+
const G = u.set[w];
|
|
1489
|
+
let _ = null, C = null;
|
|
1490
|
+
if (G.forEach((q) => {
|
|
1491
|
+
q.semver === t && (q = new e(">=0.0.0")), _ = _ || q, C = C || q, S(q.semver, _.semver, E) ? _ = q : N(q.semver, C.semver, E) && (C = q);
|
|
1492
|
+
}), _.operator === A || _.operator === b || (!C.operator || C.operator === A) && d(s, C.semver))
|
|
1479
1493
|
return !1;
|
|
1480
|
-
if (C.operator ===
|
|
1494
|
+
if (C.operator === b && N(s, C.semver))
|
|
1481
1495
|
return !1;
|
|
1482
1496
|
}
|
|
1483
1497
|
return !0;
|
|
1484
|
-
},
|
|
1498
|
+
}, je;
|
|
1499
|
+
}
|
|
1500
|
+
var Me, kt;
|
|
1501
|
+
function Qr() {
|
|
1502
|
+
if (kt) return Me;
|
|
1503
|
+
kt = 1;
|
|
1504
|
+
const r = et();
|
|
1505
|
+
return Me = (t, n, i) => r(t, n, ">", i), Me;
|
|
1485
1506
|
}
|
|
1486
1507
|
var Ve, jt;
|
|
1487
|
-
function
|
|
1508
|
+
function es() {
|
|
1488
1509
|
if (jt) return Ve;
|
|
1489
1510
|
jt = 1;
|
|
1490
|
-
const
|
|
1491
|
-
return Ve = (t, n, i) =>
|
|
1511
|
+
const r = et();
|
|
1512
|
+
return Ve = (t, n, i) => r(t, n, "<", i), Ve;
|
|
1492
1513
|
}
|
|
1493
|
-
var Xe,
|
|
1494
|
-
function
|
|
1495
|
-
if (
|
|
1496
|
-
kt = 1;
|
|
1497
|
-
const s = et();
|
|
1498
|
-
return Xe = (t, n, i) => s(t, n, "<", i), Xe;
|
|
1499
|
-
}
|
|
1500
|
-
var Be, Mt;
|
|
1501
|
-
function Jr() {
|
|
1502
|
-
if (Mt) return Be;
|
|
1514
|
+
var Xe, Mt;
|
|
1515
|
+
function ts() {
|
|
1516
|
+
if (Mt) return Xe;
|
|
1503
1517
|
Mt = 1;
|
|
1504
|
-
const
|
|
1505
|
-
return
|
|
1518
|
+
const r = F();
|
|
1519
|
+
return Xe = (t, n, i) => (t = new r(t, i), n = new r(n, i), t.intersects(n, i)), Xe;
|
|
1506
1520
|
}
|
|
1507
|
-
var
|
|
1508
|
-
function
|
|
1509
|
-
if (Vt) return
|
|
1521
|
+
var Be, Vt;
|
|
1522
|
+
function rs() {
|
|
1523
|
+
if (Vt) return Be;
|
|
1510
1524
|
Vt = 1;
|
|
1511
|
-
const
|
|
1512
|
-
return
|
|
1525
|
+
const r = J(), e = U();
|
|
1526
|
+
return Be = (t, n, i) => {
|
|
1513
1527
|
const c = [];
|
|
1514
|
-
let
|
|
1515
|
-
const
|
|
1516
|
-
for (const f of
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1528
|
+
let o = null, h = null;
|
|
1529
|
+
const a = t.sort((f, E) => e(f, E, i));
|
|
1530
|
+
for (const f of a)
|
|
1531
|
+
r(f, n, i) ? (h = f, o || (o = f)) : (h && c.push([o, h]), h = null, o = null);
|
|
1532
|
+
o && c.push([o, null]);
|
|
1533
|
+
const l = [];
|
|
1520
1534
|
for (const [f, E] of c)
|
|
1521
|
-
f === E ?
|
|
1522
|
-
const
|
|
1523
|
-
return
|
|
1524
|
-
},
|
|
1525
|
-
}
|
|
1526
|
-
var
|
|
1527
|
-
function
|
|
1528
|
-
if (Xt) return
|
|
1535
|
+
f === E ? l.push(f) : !E && f === a[0] ? l.push("*") : E ? f === a[0] ? l.push(`<=${E}`) : l.push(`${f} - ${E}`) : l.push(`>=${f}`);
|
|
1536
|
+
const s = l.join(" || "), u = typeof n.raw == "string" ? n.raw : String(n);
|
|
1537
|
+
return s.length < u.length ? s : n;
|
|
1538
|
+
}, Be;
|
|
1539
|
+
}
|
|
1540
|
+
var We, Xt;
|
|
1541
|
+
function ss() {
|
|
1542
|
+
if (Xt) return We;
|
|
1529
1543
|
Xt = 1;
|
|
1530
|
-
const
|
|
1544
|
+
const r = F(), e = Z(), { ANY: t } = e, n = J(), i = U(), c = (u, f, E = {}) => {
|
|
1531
1545
|
if (u === f)
|
|
1532
1546
|
return !0;
|
|
1533
|
-
u = new
|
|
1547
|
+
u = new r(u, E), f = new r(f, E);
|
|
1534
1548
|
let S = !1;
|
|
1535
|
-
e: for (const
|
|
1536
|
-
for (const
|
|
1537
|
-
const
|
|
1538
|
-
if (S = S ||
|
|
1549
|
+
e: for (const d of u.set) {
|
|
1550
|
+
for (const N of f.set) {
|
|
1551
|
+
const A = a(d, N, E);
|
|
1552
|
+
if (S = S || A !== null, A)
|
|
1539
1553
|
continue e;
|
|
1540
1554
|
}
|
|
1541
1555
|
if (S)
|
|
1542
1556
|
return !1;
|
|
1543
1557
|
}
|
|
1544
1558
|
return !0;
|
|
1545
|
-
},
|
|
1559
|
+
}, o = [new e(">=0.0.0-0")], h = [new e(">=0.0.0")], a = (u, f, E) => {
|
|
1546
1560
|
if (u === f)
|
|
1547
1561
|
return !0;
|
|
1548
1562
|
if (u.length === 1 && u[0].semver === t) {
|
|
1549
1563
|
if (f.length === 1 && f[0].semver === t)
|
|
1550
1564
|
return !0;
|
|
1551
|
-
E.includePrerelease ? u =
|
|
1565
|
+
E.includePrerelease ? u = o : u = h;
|
|
1552
1566
|
}
|
|
1553
1567
|
if (f.length === 1 && f[0].semver === t) {
|
|
1554
1568
|
if (E.includePrerelease)
|
|
@@ -1556,125 +1570,125 @@ function Qr() {
|
|
|
1556
1570
|
f = h;
|
|
1557
1571
|
}
|
|
1558
1572
|
const S = /* @__PURE__ */ new Set();
|
|
1559
|
-
let
|
|
1573
|
+
let d, N;
|
|
1560
1574
|
for (const L of u)
|
|
1561
|
-
L.operator === ">" || L.operator === ">=" ?
|
|
1575
|
+
L.operator === ">" || L.operator === ">=" ? d = l(d, L, E) : L.operator === "<" || L.operator === "<=" ? N = s(N, L, E) : S.add(L.semver);
|
|
1562
1576
|
if (S.size > 1)
|
|
1563
1577
|
return null;
|
|
1564
|
-
let
|
|
1565
|
-
if (
|
|
1566
|
-
if (
|
|
1578
|
+
let A;
|
|
1579
|
+
if (d && N) {
|
|
1580
|
+
if (A = i(d.semver, N.semver, E), A > 0)
|
|
1567
1581
|
return null;
|
|
1568
|
-
if (
|
|
1582
|
+
if (A === 0 && (d.operator !== ">=" || N.operator !== "<="))
|
|
1569
1583
|
return null;
|
|
1570
1584
|
}
|
|
1571
1585
|
for (const L of S) {
|
|
1572
|
-
if (
|
|
1586
|
+
if (d && !n(L, String(d), E) || N && !n(L, String(N), E))
|
|
1573
1587
|
return null;
|
|
1574
|
-
for (const
|
|
1575
|
-
if (!n(L, String(
|
|
1588
|
+
for (const M of f)
|
|
1589
|
+
if (!n(L, String(M), E))
|
|
1576
1590
|
return !1;
|
|
1577
1591
|
return !0;
|
|
1578
1592
|
}
|
|
1579
|
-
let
|
|
1580
|
-
C && C.prerelease.length === 1 &&
|
|
1593
|
+
let b, w, G, _, C = N && !E.includePrerelease && N.semver.prerelease.length ? N.semver : !1, q = d && !E.includePrerelease && d.semver.prerelease.length ? d.semver : !1;
|
|
1594
|
+
C && C.prerelease.length === 1 && N.operator === "<" && C.prerelease[0] === 0 && (C = !1);
|
|
1581
1595
|
for (const L of f) {
|
|
1582
|
-
if (
|
|
1596
|
+
if (_ = _ || L.operator === ">" || L.operator === ">=", G = G || L.operator === "<" || L.operator === "<=", d) {
|
|
1583
1597
|
if (q && L.semver.prerelease && L.semver.prerelease.length && L.semver.major === q.major && L.semver.minor === q.minor && L.semver.patch === q.patch && (q = !1), L.operator === ">" || L.operator === ">=") {
|
|
1584
|
-
if (
|
|
1598
|
+
if (b = l(d, L, E), b === L && b !== d)
|
|
1585
1599
|
return !1;
|
|
1586
|
-
} else if (
|
|
1600
|
+
} else if (d.operator === ">=" && !n(d.semver, String(L), E))
|
|
1587
1601
|
return !1;
|
|
1588
1602
|
}
|
|
1589
|
-
if (
|
|
1603
|
+
if (N) {
|
|
1590
1604
|
if (C && L.semver.prerelease && L.semver.prerelease.length && L.semver.major === C.major && L.semver.minor === C.minor && L.semver.patch === C.patch && (C = !1), L.operator === "<" || L.operator === "<=") {
|
|
1591
|
-
if (
|
|
1605
|
+
if (w = s(N, L, E), w === L && w !== N)
|
|
1592
1606
|
return !1;
|
|
1593
|
-
} else if (
|
|
1607
|
+
} else if (N.operator === "<=" && !n(N.semver, String(L), E))
|
|
1594
1608
|
return !1;
|
|
1595
1609
|
}
|
|
1596
|
-
if (!L.operator && (
|
|
1610
|
+
if (!L.operator && (N || d) && A !== 0)
|
|
1597
1611
|
return !1;
|
|
1598
1612
|
}
|
|
1599
|
-
return !(
|
|
1600
|
-
},
|
|
1613
|
+
return !(d && G && !N && A !== 0 || N && _ && !d && A !== 0 || q || C);
|
|
1614
|
+
}, l = (u, f, E) => {
|
|
1601
1615
|
if (!u)
|
|
1602
1616
|
return f;
|
|
1603
1617
|
const S = i(u.semver, f.semver, E);
|
|
1604
1618
|
return S > 0 ? u : S < 0 || f.operator === ">" && u.operator === ">=" ? f : u;
|
|
1605
|
-
},
|
|
1619
|
+
}, s = (u, f, E) => {
|
|
1606
1620
|
if (!u)
|
|
1607
1621
|
return f;
|
|
1608
1622
|
const S = i(u.semver, f.semver, E);
|
|
1609
1623
|
return S < 0 ? u : S > 0 || f.operator === "<" && u.operator === "<=" ? f : u;
|
|
1610
1624
|
};
|
|
1611
|
-
return
|
|
1625
|
+
return We = c, We;
|
|
1612
1626
|
}
|
|
1613
|
-
var
|
|
1614
|
-
function
|
|
1615
|
-
if (Bt) return
|
|
1627
|
+
var He, Bt;
|
|
1628
|
+
function ns() {
|
|
1629
|
+
if (Bt) return He;
|
|
1616
1630
|
Bt = 1;
|
|
1617
|
-
const
|
|
1618
|
-
return
|
|
1631
|
+
const r = B(), e = z(), t = D(), n = cr(), i = j(), c = Gr(), o = xr(), h = Dr(), a = _r(), l = Ur(), s = Fr(), u = kr(), f = jr(), E = U(), S = Mr(), d = Vr(), N = Ke(), A = Xr(), b = Br(), w = K(), G = Ze(), _ = ur(), C = hr(), q = Je(), L = Qe(), M = fr(), Q = Wr(), ee = Z(), te = F(), re = J(), p = zr(), m = Yr(), v = Kr(), g = Zr(), I = Jr(), R = et(), $ = Qr(), O = es(), T = ts(), y = rs(), x = ss();
|
|
1632
|
+
return He = {
|
|
1619
1633
|
parse: i,
|
|
1620
1634
|
valid: c,
|
|
1621
|
-
clean:
|
|
1635
|
+
clean: o,
|
|
1622
1636
|
inc: h,
|
|
1623
|
-
diff:
|
|
1624
|
-
major:
|
|
1625
|
-
minor:
|
|
1637
|
+
diff: a,
|
|
1638
|
+
major: l,
|
|
1639
|
+
minor: s,
|
|
1626
1640
|
patch: u,
|
|
1627
1641
|
prerelease: f,
|
|
1628
1642
|
compare: E,
|
|
1629
1643
|
rcompare: S,
|
|
1630
|
-
compareLoose:
|
|
1631
|
-
compareBuild:
|
|
1632
|
-
sort:
|
|
1633
|
-
rsort:
|
|
1634
|
-
gt:
|
|
1635
|
-
lt:
|
|
1636
|
-
eq:
|
|
1644
|
+
compareLoose: d,
|
|
1645
|
+
compareBuild: N,
|
|
1646
|
+
sort: A,
|
|
1647
|
+
rsort: b,
|
|
1648
|
+
gt: w,
|
|
1649
|
+
lt: G,
|
|
1650
|
+
eq: _,
|
|
1637
1651
|
neq: C,
|
|
1638
1652
|
gte: q,
|
|
1639
1653
|
lte: L,
|
|
1640
|
-
cmp:
|
|
1641
|
-
coerce:
|
|
1642
|
-
Comparator:
|
|
1643
|
-
Range:
|
|
1644
|
-
satisfies:
|
|
1645
|
-
toComparators:
|
|
1654
|
+
cmp: M,
|
|
1655
|
+
coerce: Q,
|
|
1656
|
+
Comparator: ee,
|
|
1657
|
+
Range: te,
|
|
1658
|
+
satisfies: re,
|
|
1659
|
+
toComparators: p,
|
|
1646
1660
|
maxSatisfying: m,
|
|
1647
1661
|
minSatisfying: v,
|
|
1648
1662
|
minVersion: g,
|
|
1649
1663
|
validRange: I,
|
|
1650
1664
|
outside: R,
|
|
1651
1665
|
gtr: $,
|
|
1652
|
-
ltr:
|
|
1666
|
+
ltr: O,
|
|
1653
1667
|
intersects: T,
|
|
1654
1668
|
simplifyRange: y,
|
|
1655
|
-
subset:
|
|
1669
|
+
subset: x,
|
|
1656
1670
|
SemVer: t,
|
|
1657
|
-
re:
|
|
1658
|
-
src:
|
|
1659
|
-
tokens:
|
|
1671
|
+
re: r.re,
|
|
1672
|
+
src: r.src,
|
|
1673
|
+
tokens: r.t,
|
|
1660
1674
|
SEMVER_SPEC_VERSION: e.SEMVER_SPEC_VERSION,
|
|
1661
1675
|
RELEASE_TYPES: e.RELEASE_TYPES,
|
|
1662
1676
|
compareIdentifiers: n.compareIdentifiers,
|
|
1663
1677
|
rcompareIdentifiers: n.rcompareIdentifiers
|
|
1664
|
-
},
|
|
1678
|
+
}, He;
|
|
1665
1679
|
}
|
|
1666
|
-
var
|
|
1667
|
-
const Wt = `^${
|
|
1668
|
-
class
|
|
1669
|
-
config = new
|
|
1680
|
+
var is = ns();
|
|
1681
|
+
const Wt = `^${X.Version}`;
|
|
1682
|
+
class ls {
|
|
1683
|
+
config = new dr(Ht);
|
|
1670
1684
|
event = new pr();
|
|
1671
1685
|
state;
|
|
1672
1686
|
active;
|
|
1673
1687
|
time;
|
|
1674
1688
|
info;
|
|
1675
|
-
merger = new
|
|
1676
|
-
offset = new
|
|
1677
|
-
driver = new
|
|
1689
|
+
merger = new Pr();
|
|
1690
|
+
offset = new qr();
|
|
1691
|
+
driver = new br();
|
|
1678
1692
|
constructor() {
|
|
1679
1693
|
this.state = {
|
|
1680
1694
|
playing: !1,
|
|
@@ -1685,7 +1699,7 @@ class is {
|
|
|
1685
1699
|
}, this.time = {
|
|
1686
1700
|
start: 0,
|
|
1687
1701
|
seek: 0
|
|
1688
|
-
}, this.info = new
|
|
1702
|
+
}, this.info = new X.Info(), this.config.event.add("update", this.onConfigUpdate);
|
|
1689
1703
|
}
|
|
1690
1704
|
onConfigUpdate = (e) => {
|
|
1691
1705
|
const t = e.has("offset.useMeta");
|
|
@@ -1715,14 +1729,14 @@ class is {
|
|
|
1715
1729
|
if (i - n + 1 === t.length)
|
|
1716
1730
|
return { lines: e, index: t };
|
|
1717
1731
|
const c = /* @__PURE__ */ new Map();
|
|
1718
|
-
for (let
|
|
1719
|
-
c.set(t[
|
|
1720
|
-
const
|
|
1721
|
-
for (let
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1732
|
+
for (let a = 0; a < t.length; a++)
|
|
1733
|
+
c.set(t[a], e[a]);
|
|
1734
|
+
const o = [], h = [];
|
|
1735
|
+
for (let a = n; a <= i; a++) {
|
|
1736
|
+
const l = c.get(a) ?? this.info.lines[a];
|
|
1737
|
+
l && (o.push(l), h.push(a));
|
|
1724
1738
|
}
|
|
1725
|
-
return { lines:
|
|
1739
|
+
return { lines: o, index: h };
|
|
1726
1740
|
}
|
|
1727
1741
|
handleEmitLinesUpdate(e) {
|
|
1728
1742
|
const t = this.handleBridgeActive(this.active.lines, this.active.index);
|
|
@@ -1734,12 +1748,12 @@ class is {
|
|
|
1734
1748
|
const t = [], n = [];
|
|
1735
1749
|
let i = this.info.lines.length;
|
|
1736
1750
|
for (let c = 0; c < this.info.lines.length; c++) {
|
|
1737
|
-
const
|
|
1738
|
-
if (
|
|
1751
|
+
const o = this.info.lines[c];
|
|
1752
|
+
if (o.time.start > e) {
|
|
1739
1753
|
i = c;
|
|
1740
1754
|
break;
|
|
1741
1755
|
}
|
|
1742
|
-
this.merger.getMergedTime(c) > e && (t.push(
|
|
1756
|
+
this.merger.getMergedTime(c) > e && (t.push(o), n.push(c));
|
|
1743
1757
|
}
|
|
1744
1758
|
this.state.scanIndex = i, this.active.lines = t, this.active.index = n, this.handleEmitLinesUpdate(!0);
|
|
1745
1759
|
}
|
|
@@ -1747,8 +1761,8 @@ class is {
|
|
|
1747
1761
|
let t = !1;
|
|
1748
1762
|
const n = [], i = [];
|
|
1749
1763
|
for (let c = 0; c < this.active.lines.length; c++) {
|
|
1750
|
-
const
|
|
1751
|
-
e >= this.merger.getMergedTime(h) ? t = !0 : (n.push(
|
|
1764
|
+
const o = this.active.lines[c], h = this.active.index[c];
|
|
1765
|
+
e >= this.merger.getMergedTime(h) ? t = !0 : (n.push(o), i.push(h));
|
|
1752
1766
|
}
|
|
1753
1767
|
for (; this.state.scanIndex < this.info.lines.length; ) {
|
|
1754
1768
|
const c = this.info.lines[this.state.scanIndex];
|
|
@@ -1769,7 +1783,7 @@ class is {
|
|
|
1769
1783
|
if (!e)
|
|
1770
1784
|
return;
|
|
1771
1785
|
let t = e;
|
|
1772
|
-
|
|
1786
|
+
is.satisfies(e.version, Wt) || (console.warn(`[music-lyric-player] ignored lyric with incompatible version "${e.version}", expected "${Wt}"`), t = new X.Info()), this.pause(), this.info = t, this.handleBuildMergedLineEnd(), this.offset.refreshFromMeta(this.info, this.config.current.offset.useMeta), this.config.current.offset.resetTempOnLyricChange && this.offset.resetTemp(), this.active.lines = [], this.active.index = [], this.state.scanIndex = 0, this.time.seek = 0, this.event.emit("lyricUpdate", t), this.event.emit("linesUpdate", [], [], -1, !1);
|
|
1773
1787
|
}
|
|
1774
1788
|
/**
|
|
1775
1789
|
* Start playback
|
|
@@ -1789,7 +1803,7 @@ class is {
|
|
|
1789
1803
|
* Stop playback
|
|
1790
1804
|
*/
|
|
1791
1805
|
dispose() {
|
|
1792
|
-
this.pause(), this.event.clear(), this.config.event.remove("update", this.onConfigUpdate), this.active.lines = [], this.active.index = [], this.info = new
|
|
1806
|
+
this.pause(), this.event.clear(), this.config.event.remove("update", this.onConfigUpdate), this.active.lines = [], this.active.index = [], this.info = new X.Info();
|
|
1793
1807
|
}
|
|
1794
1808
|
/**
|
|
1795
1809
|
* Update the temp offset in ms (the user's temporary adjustment).
|
|
@@ -1811,10 +1825,10 @@ class is {
|
|
|
1811
1825
|
matchLinesWithTime(e) {
|
|
1812
1826
|
const t = e + this.currentOffset, n = [], i = [];
|
|
1813
1827
|
for (let c = 0; c < this.info.lines.length; c++) {
|
|
1814
|
-
const
|
|
1815
|
-
if (
|
|
1828
|
+
const o = this.info.lines[c];
|
|
1829
|
+
if (o.time.start > t)
|
|
1816
1830
|
break;
|
|
1817
|
-
this.merger.getMergedTime(c) > t && (n.push(
|
|
1831
|
+
this.merger.getMergedTime(c) > t && (n.push(o), i.push(c));
|
|
1818
1832
|
}
|
|
1819
1833
|
return this.handleBridgeActive(n, i);
|
|
1820
1834
|
}
|
|
@@ -1872,7 +1886,7 @@ class is {
|
|
|
1872
1886
|
}
|
|
1873
1887
|
}
|
|
1874
1888
|
export {
|
|
1875
|
-
|
|
1876
|
-
|
|
1889
|
+
ls as BaseLyricPlayer,
|
|
1890
|
+
os as BaseLyricPlayerConfig
|
|
1877
1891
|
};
|
|
1878
1892
|
//# sourceMappingURL=index.ecma.js.map
|