@placemarkio/polyline 2.0.1 → 2.0.2

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,2173 +1,9 @@
1
- (() => {
2
- var Qe = Object.create;
3
- var ae = Object.defineProperty;
4
- var Pe = Object.getOwnPropertyDescriptor;
5
- var Ce = Object.getOwnPropertyNames;
6
- var Oe = Object.getPrototypeOf,
7
- Re = Object.prototype.hasOwnProperty;
8
- var _e = (t, e) => () => (
9
- e || t((e = { exports: {} }).exports, e), e.exports
10
- );
11
- var Me = (t, e, n, r) => {
12
- if ((e && typeof e == "object") || typeof e == "function")
13
- for (const i of Ce(e))
14
- !Re.call(t, i) &&
15
- i !== n &&
16
- ae(t, i, {
17
- get: () => e[i],
18
- enumerable: !(r = Pe(e, i)) || r.enumerable,
19
- });
20
- return t;
21
- };
22
- var De = (t, e, n) => (
23
- (n = t != null ? Qe(Oe(t)) : {}),
24
- Me(
25
- e || !t || !t.__esModule
26
- ? ae(n, "default", { value: t, enumerable: !0 })
27
- : n,
28
- t,
29
- )
30
- );
31
- var de = _e((ce, he) => {
32
- (function () {
33
- var t = (e) => {
34
- var n = new t.Builder();
35
- return (
36
- n.pipeline.add(t.trimmer, t.stopWordFilter, t.stemmer),
37
- n.searchPipeline.add(t.stemmer),
38
- e.call(n, n),
39
- n.build()
40
- );
41
- };
42
- t.version = "2.3.9";
43
- (t.utils = {}),
44
- (t.utils.warn = ((e) => (n) => {
45
- e.console && console.warn && console.warn(n);
46
- })(this)),
47
- (t.utils.asString = (e) => (e == null ? "" : e.toString())),
48
- (t.utils.clone = (e) => {
49
- if (e == null) return e;
50
- for (
51
- var n = Object.create(null), r = Object.keys(e), i = 0;
52
- i < r.length;
53
- i++
54
- ) {
55
- var s = r[i],
56
- o = e[s];
57
- if (Array.isArray(o)) {
58
- n[s] = o.slice();
59
- continue;
60
- }
61
- if (
62
- typeof o == "string" ||
63
- typeof o == "number" ||
64
- typeof o == "boolean"
65
- ) {
66
- n[s] = o;
67
- continue;
68
- }
69
- throw new TypeError(
70
- "clone is not deep and does not support nested objects",
71
- );
72
- }
73
- return n;
74
- }),
75
- (t.FieldRef = function (e, n, r) {
76
- (this.docRef = e), (this.fieldName = n), (this._stringValue = r);
77
- }),
78
- (t.FieldRef.joiner = "/"),
79
- (t.FieldRef.fromString = (e) => {
80
- var n = e.indexOf(t.FieldRef.joiner);
81
- if (n === -1) throw "malformed field ref string";
82
- var r = e.slice(0, n),
83
- i = e.slice(n + 1);
84
- return new t.FieldRef(i, r, e);
85
- }),
86
- (t.FieldRef.prototype.toString = function () {
87
- return (
88
- this._stringValue == null &&
89
- (this._stringValue =
90
- this.fieldName + t.FieldRef.joiner + this.docRef),
91
- this._stringValue
92
- );
93
- });
94
- (t.Set = function (e) {
95
- if (((this.elements = Object.create(null)), e)) {
96
- this.length = e.length;
97
- for (var n = 0; n < this.length; n++) this.elements[e[n]] = !0;
98
- } else this.length = 0;
99
- }),
100
- (t.Set.complete = {
101
- intersect: (e) => e,
102
- union: function () {
103
- return this;
104
- },
105
- contains: () => !0,
106
- }),
107
- (t.Set.empty = {
108
- intersect: function () {
109
- return this;
110
- },
111
- union: (e) => e,
112
- contains: () => !1,
113
- }),
114
- (t.Set.prototype.contains = function (e) {
115
- return !!this.elements[e];
116
- }),
117
- (t.Set.prototype.intersect = function (e) {
118
- var n,
119
- r,
120
- i,
121
- s = [];
122
- if (e === t.Set.complete) return this;
123
- if (e === t.Set.empty) return e;
124
- this.length < e.length
125
- ? ((n = this), (r = e))
126
- : ((n = e), (r = this)),
127
- (i = Object.keys(n.elements));
128
- for (var o = 0; o < i.length; o++) {
129
- var a = i[o];
130
- a in r.elements && s.push(a);
131
- }
132
- return new t.Set(s);
133
- }),
134
- (t.Set.prototype.union = function (e) {
135
- return e === t.Set.complete
136
- ? t.Set.complete
137
- : e === t.Set.empty
138
- ? this
139
- : new t.Set(
140
- Object.keys(this.elements).concat(Object.keys(e.elements)),
141
- );
142
- }),
143
- (t.idf = (e, n) => {
144
- var r = 0;
145
- for (var i in e) i != "_index" && (r += Object.keys(e[i]).length);
146
- var s = (n - r + 0.5) / (r + 0.5);
147
- return Math.log(1 + Math.abs(s));
148
- }),
149
- (t.Token = function (e, n) {
150
- (this.str = e || ""), (this.metadata = n || {});
151
- }),
152
- (t.Token.prototype.toString = function () {
153
- return this.str;
154
- }),
155
- (t.Token.prototype.update = function (e) {
156
- return (this.str = e(this.str, this.metadata)), this;
157
- }),
158
- (t.Token.prototype.clone = function (e) {
159
- return (
160
- (e = e || ((n) => n)),
161
- new t.Token(e(this.str, this.metadata), this.metadata)
162
- );
163
- });
164
- (t.tokenizer = (e, n) => {
165
- if (e == null || e == null) return [];
166
- if (Array.isArray(e))
167
- return e.map(
168
- (m) =>
169
- new t.Token(t.utils.asString(m).toLowerCase(), t.utils.clone(n)),
170
- );
171
- for (
172
- var r = e.toString().toLowerCase(),
173
- i = r.length,
174
- s = [],
175
- o = 0,
176
- a = 0;
177
- o <= i;
178
- o++
179
- ) {
180
- var u = r.charAt(o),
181
- l = o - a;
182
- if (u.match(t.tokenizer.separator) || o == i) {
183
- if (l > 0) {
184
- var h = t.utils.clone(n) || {};
185
- (h.position = [a, l]),
186
- (h.index = s.length),
187
- s.push(new t.Token(r.slice(a, o), h));
188
- }
189
- a = o + 1;
190
- }
191
- }
192
- return s;
193
- }),
194
- (t.tokenizer.separator = /[\s-]+/);
195
- (t.Pipeline = function () {
196
- this._stack = [];
197
- }),
198
- (t.Pipeline.registeredFunctions = Object.create(null)),
199
- (t.Pipeline.registerFunction = function (e, n) {
200
- n in this.registeredFunctions &&
201
- t.utils.warn("Overwriting existing registered function: " + n),
202
- (e.label = n),
203
- (t.Pipeline.registeredFunctions[e.label] = e);
204
- }),
205
- (t.Pipeline.warnIfFunctionNotRegistered = function (e) {
206
- var n = e.label && e.label in this.registeredFunctions;
207
- n ||
208
- t.utils.warn(
209
- `Function is not registered with pipeline. This may cause problems when serialising the index.
210
- `,
211
- e,
212
- );
213
- }),
214
- (t.Pipeline.load = (e) => {
215
- var n = new t.Pipeline();
216
- return (
217
- e.forEach((r) => {
218
- var i = t.Pipeline.registeredFunctions[r];
219
- if (i) n.add(i);
220
- else throw new Error("Cannot load unregistered function: " + r);
221
- }),
222
- n
223
- );
224
- }),
225
- (t.Pipeline.prototype.add = function () {
226
- var e = Array.prototype.slice.call(arguments);
227
- e.forEach(function (n) {
228
- t.Pipeline.warnIfFunctionNotRegistered(n), this._stack.push(n);
229
- }, this);
230
- }),
231
- (t.Pipeline.prototype.after = function (e, n) {
232
- t.Pipeline.warnIfFunctionNotRegistered(n);
233
- var r = this._stack.indexOf(e);
234
- if (r == -1) throw new Error("Cannot find existingFn");
235
- (r = r + 1), this._stack.splice(r, 0, n);
236
- }),
237
- (t.Pipeline.prototype.before = function (e, n) {
238
- t.Pipeline.warnIfFunctionNotRegistered(n);
239
- var r = this._stack.indexOf(e);
240
- if (r == -1) throw new Error("Cannot find existingFn");
241
- this._stack.splice(r, 0, n);
242
- }),
243
- (t.Pipeline.prototype.remove = function (e) {
244
- var n = this._stack.indexOf(e);
245
- n != -1 && this._stack.splice(n, 1);
246
- }),
247
- (t.Pipeline.prototype.run = function (e) {
248
- for (var n = this._stack.length, r = 0; r < n; r++) {
249
- for (var i = this._stack[r], s = [], o = 0; o < e.length; o++) {
250
- var a = i(e[o], o, e);
251
- if (!(a == null || a === ""))
252
- if (Array.isArray(a))
253
- for (var u = 0; u < a.length; u++) s.push(a[u]);
254
- else s.push(a);
255
- }
256
- e = s;
257
- }
258
- return e;
259
- }),
260
- (t.Pipeline.prototype.runString = function (e, n) {
261
- var r = new t.Token(e, n);
262
- return this.run([r]).map((i) => i.toString());
263
- }),
264
- (t.Pipeline.prototype.reset = function () {
265
- this._stack = [];
266
- }),
267
- (t.Pipeline.prototype.toJSON = function () {
268
- return this._stack.map(
269
- (e) => (t.Pipeline.warnIfFunctionNotRegistered(e), e.label),
270
- );
271
- });
272
- (t.Vector = function (e) {
273
- (this._magnitude = 0), (this.elements = e || []);
274
- }),
275
- (t.Vector.prototype.positionForIndex = function (e) {
276
- if (this.elements.length == 0) return 0;
277
- for (
278
- var n = 0,
279
- r = this.elements.length / 2,
280
- i = r - n,
281
- s = Math.floor(i / 2),
282
- o = this.elements[s * 2];
283
- i > 1 && (o < e && (n = s), o > e && (r = s), o != e);
284
- )
285
- (i = r - n),
286
- (s = n + Math.floor(i / 2)),
287
- (o = this.elements[s * 2]);
288
- if (o == e || o > e) return s * 2;
289
- if (o < e) return (s + 1) * 2;
290
- }),
291
- (t.Vector.prototype.insert = function (e, n) {
292
- this.upsert(e, n, () => {
293
- throw "duplicate index";
294
- });
295
- }),
296
- (t.Vector.prototype.upsert = function (e, n, r) {
297
- this._magnitude = 0;
298
- var i = this.positionForIndex(e);
299
- this.elements[i] == e
300
- ? (this.elements[i + 1] = r(this.elements[i + 1], n))
301
- : this.elements.splice(i, 0, e, n);
302
- }),
303
- (t.Vector.prototype.magnitude = function () {
304
- if (this._magnitude) return this._magnitude;
305
- for (var e = 0, n = this.elements.length, r = 1; r < n; r += 2) {
306
- var i = this.elements[r];
307
- e += i * i;
308
- }
309
- return (this._magnitude = Math.sqrt(e));
310
- }),
311
- (t.Vector.prototype.dot = function (e) {
312
- for (
313
- var n = 0,
314
- r = this.elements,
315
- i = e.elements,
316
- s = r.length,
317
- o = i.length,
318
- a = 0,
319
- u = 0,
320
- l = 0,
321
- h = 0;
322
- l < s && h < o;
323
- )
324
- (a = r[l]),
325
- (u = i[h]),
326
- a < u
327
- ? (l += 2)
328
- : a > u
329
- ? (h += 2)
330
- : a == u && ((n += r[l + 1] * i[h + 1]), (l += 2), (h += 2));
331
- return n;
332
- }),
333
- (t.Vector.prototype.similarity = function (e) {
334
- return this.dot(e) / this.magnitude() || 0;
335
- }),
336
- (t.Vector.prototype.toArray = function () {
337
- for (
338
- var e = new Array(this.elements.length / 2), n = 1, r = 0;
339
- n < this.elements.length;
340
- n += 2, r++
341
- )
342
- e[r] = this.elements[n];
343
- return e;
344
- }),
345
- (t.Vector.prototype.toJSON = function () {
346
- return this.elements;
347
- });
348
- (t.stemmer = (() => {
349
- var e = {
350
- ational: "ate",
351
- tional: "tion",
352
- enci: "ence",
353
- anci: "ance",
354
- izer: "ize",
355
- bli: "ble",
356
- alli: "al",
357
- entli: "ent",
358
- eli: "e",
359
- ousli: "ous",
360
- ization: "ize",
361
- ation: "ate",
362
- ator: "ate",
363
- alism: "al",
364
- iveness: "ive",
365
- fulness: "ful",
366
- ousness: "ous",
367
- aliti: "al",
368
- iviti: "ive",
369
- biliti: "ble",
370
- logi: "log",
371
- },
372
- n = {
373
- icate: "ic",
374
- ative: "",
375
- alize: "al",
376
- iciti: "ic",
377
- ical: "ic",
378
- ful: "",
379
- ness: "",
380
- },
381
- r = "[^aeiou]",
382
- i = "[aeiouy]",
383
- s = r + "[^aeiouy]*",
384
- o = i + "[aeiou]*",
385
- a = "^(" + s + ")?" + o + s,
386
- u = "^(" + s + ")?" + o + s + "(" + o + ")?$",
387
- l = "^(" + s + ")?" + o + s + o + s,
388
- h = "^(" + s + ")?" + i,
389
- m = new RegExp(a),
390
- v = new RegExp(l),
391
- b = new RegExp(u),
392
- y = new RegExp(h),
393
- E = /^(.+?)(ss|i)es$/,
394
- p = /^(.+?)([^s])s$/,
395
- f = /^(.+?)eed$/,
396
- S = /^(.+?)(ed|ing)$/,
397
- w = /.$/,
398
- k = /(at|bl|iz)$/,
399
- _ = /([^aeiouylsz])\1$/,
400
- z = new RegExp("^" + s + i + "[^aeiouwxy]$"),
401
- H = /^(.+?[^aeiou])y$/,
402
- q =
403
- /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,
404
- $ = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,
405
- V =
406
- /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,
407
- W = /^(.+?)(s|t)(ion)$/,
408
- P = /^(.+?)e$/,
409
- U = /ll$/,
410
- G = new RegExp("^" + s + i + "[^aeiouwxy]$"),
411
- N = (c) => {
412
- var g, C, T, d, x, O, D;
413
- if (c.length < 3) return c;
414
- if (
415
- ((T = c.substr(0, 1)),
416
- T == "y" && (c = T.toUpperCase() + c.substr(1)),
417
- (d = E),
418
- (x = p),
419
- d.test(c)
420
- ? (c = c.replace(d, "$1$2"))
421
- : x.test(c) && (c = c.replace(x, "$1$2")),
422
- (d = f),
423
- (x = S),
424
- d.test(c))
425
- ) {
426
- var L = d.exec(c);
427
- (d = m), d.test(L[1]) && ((d = w), (c = c.replace(d, "")));
428
- } else if (x.test(c)) {
429
- var L = x.exec(c);
430
- (g = L[1]),
431
- (x = y),
432
- x.test(g) &&
433
- ((c = g),
434
- (x = k),
435
- (O = _),
436
- (D = z),
437
- x.test(c)
438
- ? (c = c + "e")
439
- : O.test(c)
440
- ? ((d = w), (c = c.replace(d, "")))
441
- : D.test(c) && (c = c + "e"));
442
- }
443
- if (((d = H), d.test(c))) {
444
- var L = d.exec(c);
445
- (g = L[1]), (c = g + "i");
446
- }
447
- if (((d = q), d.test(c))) {
448
- var L = d.exec(c);
449
- (g = L[1]), (C = L[2]), (d = m), d.test(g) && (c = g + e[C]);
450
- }
451
- if (((d = $), d.test(c))) {
452
- var L = d.exec(c);
453
- (g = L[1]), (C = L[2]), (d = m), d.test(g) && (c = g + n[C]);
454
- }
455
- if (((d = V), (x = W), d.test(c))) {
456
- var L = d.exec(c);
457
- (g = L[1]), (d = v), d.test(g) && (c = g);
458
- } else if (x.test(c)) {
459
- var L = x.exec(c);
460
- (g = L[1] + L[2]), (x = v), x.test(g) && (c = g);
461
- }
462
- if (((d = P), d.test(c))) {
463
- var L = d.exec(c);
464
- (g = L[1]),
465
- (d = v),
466
- (x = b),
467
- (O = G),
468
- (d.test(g) || (x.test(g) && !O.test(g))) && (c = g);
469
- }
470
- return (
471
- (d = U),
472
- (x = v),
473
- d.test(c) && x.test(c) && ((d = w), (c = c.replace(d, ""))),
474
- T == "y" && (c = T.toLowerCase() + c.substr(1)),
475
- c
476
- );
477
- };
478
- return (M) => M.update(N);
479
- })()),
480
- t.Pipeline.registerFunction(t.stemmer, "stemmer");
481
- (t.generateStopWordFilter = (e) => {
482
- var n = e.reduce((r, i) => ((r[i] = i), r), {});
483
- return (r) => {
484
- if (r && n[r.toString()] !== r.toString()) return r;
485
- };
486
- }),
487
- (t.stopWordFilter = t.generateStopWordFilter([
488
- "a",
489
- "able",
490
- "about",
491
- "across",
492
- "after",
493
- "all",
494
- "almost",
495
- "also",
496
- "am",
497
- "among",
498
- "an",
499
- "and",
500
- "any",
501
- "are",
502
- "as",
503
- "at",
504
- "be",
505
- "because",
506
- "been",
507
- "but",
508
- "by",
509
- "can",
510
- "cannot",
511
- "could",
512
- "dear",
513
- "did",
514
- "do",
515
- "does",
516
- "either",
517
- "else",
518
- "ever",
519
- "every",
520
- "for",
521
- "from",
522
- "get",
523
- "got",
524
- "had",
525
- "has",
526
- "have",
527
- "he",
528
- "her",
529
- "hers",
530
- "him",
531
- "his",
532
- "how",
533
- "however",
534
- "i",
535
- "if",
536
- "in",
537
- "into",
538
- "is",
539
- "it",
540
- "its",
541
- "just",
542
- "least",
543
- "let",
544
- "like",
545
- "likely",
546
- "may",
547
- "me",
548
- "might",
549
- "most",
550
- "must",
551
- "my",
552
- "neither",
553
- "no",
554
- "nor",
555
- "not",
556
- "of",
557
- "off",
558
- "often",
559
- "on",
560
- "only",
561
- "or",
562
- "other",
563
- "our",
564
- "own",
565
- "rather",
566
- "said",
567
- "say",
568
- "says",
569
- "she",
570
- "should",
571
- "since",
572
- "so",
573
- "some",
574
- "than",
575
- "that",
576
- "the",
577
- "their",
578
- "them",
579
- "then",
580
- "there",
581
- "these",
582
- "they",
583
- "this",
584
- "tis",
585
- "to",
586
- "too",
587
- "twas",
588
- "us",
589
- "wants",
590
- "was",
591
- "we",
592
- "were",
593
- "what",
594
- "when",
595
- "where",
596
- "which",
597
- "while",
598
- "who",
599
- "whom",
600
- "why",
601
- "will",
602
- "with",
603
- "would",
604
- "yet",
605
- "you",
606
- "your",
607
- ])),
608
- t.Pipeline.registerFunction(t.stopWordFilter, "stopWordFilter");
609
- (t.trimmer = (e) =>
610
- e.update((n) => n.replace(/^\W+/, "").replace(/\W+$/, ""))),
611
- t.Pipeline.registerFunction(t.trimmer, "trimmer");
612
- (t.TokenSet = function () {
613
- (this.final = !1),
614
- (this.edges = {}),
615
- (this.id = t.TokenSet._nextId),
616
- (t.TokenSet._nextId += 1);
617
- }),
618
- (t.TokenSet._nextId = 1),
619
- (t.TokenSet.fromArray = (e) => {
620
- for (
621
- var n = new t.TokenSet.Builder(), r = 0, i = e.length;
622
- r < i;
623
- r++
624
- )
625
- n.insert(e[r]);
626
- return n.finish(), n.root;
627
- }),
628
- (t.TokenSet.fromClause = (e) =>
629
- "editDistance" in e
630
- ? t.TokenSet.fromFuzzyString(e.term, e.editDistance)
631
- : t.TokenSet.fromString(e.term)),
632
- (t.TokenSet.fromFuzzyString = (e, n) => {
633
- for (
634
- var r = new t.TokenSet(),
635
- i = [{ node: r, editsRemaining: n, str: e }];
636
- i.length;
637
- ) {
638
- var s = i.pop();
639
- if (s.str.length > 0) {
640
- var o = s.str.charAt(0),
641
- a;
642
- o in s.node.edges
643
- ? (a = s.node.edges[o])
644
- : ((a = new t.TokenSet()), (s.node.edges[o] = a)),
645
- s.str.length == 1 && (a.final = !0),
646
- i.push({
647
- node: a,
648
- editsRemaining: s.editsRemaining,
649
- str: s.str.slice(1),
650
- });
651
- }
652
- if (s.editsRemaining != 0) {
653
- if ("*" in s.node.edges) var u = s.node.edges["*"];
654
- else {
655
- var u = new t.TokenSet();
656
- s.node.edges["*"] = u;
657
- }
658
- if (
659
- (s.str.length == 0 && (u.final = !0),
660
- i.push({
661
- node: u,
662
- editsRemaining: s.editsRemaining - 1,
663
- str: s.str,
664
- }),
665
- s.str.length > 1 &&
666
- i.push({
667
- node: s.node,
668
- editsRemaining: s.editsRemaining - 1,
669
- str: s.str.slice(1),
670
- }),
671
- s.str.length == 1 && (s.node.final = !0),
672
- s.str.length >= 1)
673
- ) {
674
- if ("*" in s.node.edges) var l = s.node.edges["*"];
675
- else {
676
- var l = new t.TokenSet();
677
- s.node.edges["*"] = l;
678
- }
679
- s.str.length == 1 && (l.final = !0),
680
- i.push({
681
- node: l,
682
- editsRemaining: s.editsRemaining - 1,
683
- str: s.str.slice(1),
684
- });
685
- }
686
- if (s.str.length > 1) {
687
- var h = s.str.charAt(0),
688
- m = s.str.charAt(1),
689
- v;
690
- m in s.node.edges
691
- ? (v = s.node.edges[m])
692
- : ((v = new t.TokenSet()), (s.node.edges[m] = v)),
693
- s.str.length == 1 && (v.final = !0),
694
- i.push({
695
- node: v,
696
- editsRemaining: s.editsRemaining - 1,
697
- str: h + s.str.slice(2),
698
- });
699
- }
700
- }
701
- }
702
- return r;
703
- }),
704
- (t.TokenSet.fromString = (e) => {
705
- for (
706
- var n = new t.TokenSet(), r = n, i = 0, s = e.length;
707
- i < s;
708
- i++
709
- ) {
710
- var o = e[i],
711
- a = i == s - 1;
712
- if (o == "*") (n.edges[o] = n), (n.final = a);
713
- else {
714
- var u = new t.TokenSet();
715
- (u.final = a), (n.edges[o] = u), (n = u);
716
- }
717
- }
718
- return r;
719
- }),
720
- (t.TokenSet.prototype.toArray = function () {
721
- for (var e = [], n = [{ prefix: "", node: this }]; n.length; ) {
722
- var r = n.pop(),
723
- i = Object.keys(r.node.edges),
724
- s = i.length;
725
- r.node.final && (r.prefix.charAt(0), e.push(r.prefix));
726
- for (var o = 0; o < s; o++) {
727
- var a = i[o];
728
- n.push({ prefix: r.prefix.concat(a), node: r.node.edges[a] });
729
- }
730
- }
731
- return e;
732
- }),
733
- (t.TokenSet.prototype.toString = function () {
734
- if (this._str) return this._str;
735
- for (
736
- var e = this.final ? "1" : "0",
737
- n = Object.keys(this.edges).sort(),
738
- r = n.length,
739
- i = 0;
740
- i < r;
741
- i++
742
- ) {
743
- var s = n[i],
744
- o = this.edges[s];
745
- e = e + s + o.id;
746
- }
747
- return e;
748
- }),
749
- (t.TokenSet.prototype.intersect = function (e) {
750
- for (
751
- var n = new t.TokenSet(),
752
- r = void 0,
753
- i = [{ qNode: e, output: n, node: this }];
754
- i.length;
755
- ) {
756
- r = i.pop();
757
- for (
758
- var s = Object.keys(r.qNode.edges),
759
- o = s.length,
760
- a = Object.keys(r.node.edges),
761
- u = a.length,
762
- l = 0;
763
- l < o;
764
- l++
765
- )
766
- for (var h = s[l], m = 0; m < u; m++) {
767
- var v = a[m];
768
- if (v == h || h == "*") {
769
- var b = r.node.edges[v],
770
- y = r.qNode.edges[h],
771
- E = b.final && y.final,
772
- p = void 0;
773
- v in r.output.edges
774
- ? ((p = r.output.edges[v]), (p.final = p.final || E))
775
- : ((p = new t.TokenSet()),
776
- (p.final = E),
777
- (r.output.edges[v] = p)),
778
- i.push({ qNode: y, output: p, node: b });
779
- }
780
- }
781
- }
782
- return n;
783
- }),
784
- (t.TokenSet.Builder = function () {
785
- (this.previousWord = ""),
786
- (this.root = new t.TokenSet()),
787
- (this.uncheckedNodes = []),
788
- (this.minimizedNodes = {});
789
- }),
790
- (t.TokenSet.Builder.prototype.insert = function (e) {
791
- var n,
792
- r = 0;
793
- if (e < this.previousWord)
794
- throw new Error("Out of order word insertion");
795
- for (
796
- var i = 0;
797
- i < e.length &&
798
- i < this.previousWord.length &&
799
- e[i] == this.previousWord[i];
800
- i++
801
- )
802
- r++;
803
- this.minimize(r),
804
- this.uncheckedNodes.length == 0
805
- ? (n = this.root)
806
- : (n = this.uncheckedNodes[this.uncheckedNodes.length - 1].child);
807
- for (var i = r; i < e.length; i++) {
808
- var s = new t.TokenSet(),
809
- o = e[i];
810
- (n.edges[o] = s),
811
- this.uncheckedNodes.push({ parent: n, char: o, child: s }),
812
- (n = s);
813
- }
814
- (n.final = !0), (this.previousWord = e);
815
- }),
816
- (t.TokenSet.Builder.prototype.finish = function () {
817
- this.minimize(0);
818
- }),
819
- (t.TokenSet.Builder.prototype.minimize = function (e) {
820
- for (var n = this.uncheckedNodes.length - 1; n >= e; n--) {
821
- var r = this.uncheckedNodes[n],
822
- i = r.child.toString();
823
- i in this.minimizedNodes
824
- ? (r.parent.edges[r.char] = this.minimizedNodes[i])
825
- : ((r.child._str = i), (this.minimizedNodes[i] = r.child)),
826
- this.uncheckedNodes.pop();
827
- }
828
- });
829
- (t.Index = function (e) {
830
- (this.invertedIndex = e.invertedIndex),
831
- (this.fieldVectors = e.fieldVectors),
832
- (this.tokenSet = e.tokenSet),
833
- (this.fields = e.fields),
834
- (this.pipeline = e.pipeline);
835
- }),
836
- (t.Index.prototype.search = function (e) {
837
- return this.query((n) => {
838
- var r = new t.QueryParser(e, n);
839
- r.parse();
840
- });
841
- }),
842
- (t.Index.prototype.query = function (e) {
843
- for (
844
- var n = new t.Query(this.fields),
845
- r = Object.create(null),
846
- i = Object.create(null),
847
- s = Object.create(null),
848
- o = Object.create(null),
849
- a = Object.create(null),
850
- u = 0;
851
- u < this.fields.length;
852
- u++
853
- )
854
- i[this.fields[u]] = new t.Vector();
855
- e.call(n, n);
856
- for (var u = 0; u < n.clauses.length; u++) {
857
- var l = n.clauses[u],
858
- h = null,
859
- m = t.Set.empty;
860
- l.usePipeline
861
- ? (h = this.pipeline.runString(l.term, { fields: l.fields }))
862
- : (h = [l.term]);
863
- for (var v = 0; v < h.length; v++) {
864
- var b = h[v];
865
- l.term = b;
866
- var y = t.TokenSet.fromClause(l),
867
- E = this.tokenSet.intersect(y).toArray();
868
- if (E.length === 0 && l.presence === t.Query.presence.REQUIRED) {
869
- for (var p = 0; p < l.fields.length; p++) {
870
- var f = l.fields[p];
871
- o[f] = t.Set.empty;
872
- }
873
- break;
874
- }
875
- for (var S = 0; S < E.length; S++)
876
- for (
877
- var w = E[S], k = this.invertedIndex[w], _ = k._index, p = 0;
878
- p < l.fields.length;
879
- p++
880
- ) {
881
- var f = l.fields[p],
882
- z = k[f],
883
- H = Object.keys(z),
884
- q = w + "/" + f,
885
- $ = new t.Set(H);
886
- if (
887
- (l.presence == t.Query.presence.REQUIRED &&
888
- ((m = m.union($)),
889
- o[f] === void 0 && (o[f] = t.Set.complete)),
890
- l.presence == t.Query.presence.PROHIBITED)
891
- ) {
892
- a[f] === void 0 && (a[f] = t.Set.empty),
893
- (a[f] = a[f].union($));
894
- continue;
895
- }
896
- if ((i[f].upsert(_, l.boost, (Ie, ke) => Ie + ke), !s[q])) {
897
- for (var V = 0; V < H.length; V++) {
898
- var W = H[V],
899
- P = new t.FieldRef(W, f),
900
- U = z[W],
901
- G;
902
- (G = r[P]) === void 0
903
- ? (r[P] = new t.MatchData(w, f, U))
904
- : G.add(w, f, U);
905
- }
906
- s[q] = !0;
907
- }
908
- }
909
- }
910
- if (l.presence === t.Query.presence.REQUIRED)
911
- for (var p = 0; p < l.fields.length; p++) {
912
- var f = l.fields[p];
913
- o[f] = o[f].intersect(m);
914
- }
915
- }
916
- for (
917
- var N = t.Set.complete, M = t.Set.empty, u = 0;
918
- u < this.fields.length;
919
- u++
920
- ) {
921
- var f = this.fields[u];
922
- o[f] && (N = N.intersect(o[f])), a[f] && (M = M.union(a[f]));
923
- }
924
- var c = Object.keys(r),
925
- g = [],
926
- C = Object.create(null);
927
- if (n.isNegated()) {
928
- c = Object.keys(this.fieldVectors);
929
- for (var u = 0; u < c.length; u++) {
930
- var P = c[u],
931
- T = t.FieldRef.fromString(P);
932
- r[P] = new t.MatchData();
933
- }
934
- }
935
- for (var u = 0; u < c.length; u++) {
936
- var T = t.FieldRef.fromString(c[u]),
937
- d = T.docRef;
938
- if (N.contains(d) && !M.contains(d)) {
939
- var x = this.fieldVectors[T],
940
- O = i[T.fieldName].similarity(x),
941
- D;
942
- if ((D = C[d]) !== void 0)
943
- (D.score += O), D.matchData.combine(r[T]);
944
- else {
945
- var L = { ref: d, score: O, matchData: r[T] };
946
- (C[d] = L), g.push(L);
947
- }
948
- }
949
- }
950
- return g.sort((Se, Te) => Te.score - Se.score);
951
- }),
952
- (t.Index.prototype.toJSON = function () {
953
- var e = Object.keys(this.invertedIndex)
954
- .sort()
955
- .map(function (r) {
956
- return [r, this.invertedIndex[r]];
957
- }, this),
958
- n = Object.keys(this.fieldVectors).map(function (r) {
959
- return [r, this.fieldVectors[r].toJSON()];
960
- }, this);
961
- return {
962
- version: t.version,
963
- fields: this.fields,
964
- fieldVectors: n,
965
- invertedIndex: e,
966
- pipeline: this.pipeline.toJSON(),
967
- };
968
- }),
969
- (t.Index.load = (e) => {
970
- var n = {},
971
- r = {},
972
- i = e.fieldVectors,
973
- s = Object.create(null),
974
- o = e.invertedIndex,
975
- a = new t.TokenSet.Builder(),
976
- u = t.Pipeline.load(e.pipeline);
977
- e.version != t.version &&
978
- t.utils.warn(
979
- "Version mismatch when loading serialised index. Current version of lunr '" +
980
- t.version +
981
- "' does not match serialized index '" +
982
- e.version +
983
- "'",
984
- );
985
- for (var l = 0; l < i.length; l++) {
986
- var h = i[l],
987
- m = h[0],
988
- v = h[1];
989
- r[m] = new t.Vector(v);
990
- }
991
- for (var l = 0; l < o.length; l++) {
992
- var h = o[l],
993
- b = h[0],
994
- y = h[1];
995
- a.insert(b), (s[b] = y);
996
- }
997
- return (
998
- a.finish(),
999
- (n.fields = e.fields),
1000
- (n.fieldVectors = r),
1001
- (n.invertedIndex = s),
1002
- (n.tokenSet = a.root),
1003
- (n.pipeline = u),
1004
- new t.Index(n)
1005
- );
1006
- });
1007
- (t.Builder = function () {
1008
- (this._ref = "id"),
1009
- (this._fields = Object.create(null)),
1010
- (this._documents = Object.create(null)),
1011
- (this.invertedIndex = Object.create(null)),
1012
- (this.fieldTermFrequencies = {}),
1013
- (this.fieldLengths = {}),
1014
- (this.tokenizer = t.tokenizer),
1015
- (this.pipeline = new t.Pipeline()),
1016
- (this.searchPipeline = new t.Pipeline()),
1017
- (this.documentCount = 0),
1018
- (this._b = 0.75),
1019
- (this._k1 = 1.2),
1020
- (this.termIndex = 0),
1021
- (this.metadataWhitelist = []);
1022
- }),
1023
- (t.Builder.prototype.ref = function (e) {
1024
- this._ref = e;
1025
- }),
1026
- (t.Builder.prototype.field = function (e, n) {
1027
- if (/\//.test(e))
1028
- throw new RangeError(
1029
- "Field '" + e + "' contains illegal character '/'",
1030
- );
1031
- this._fields[e] = n || {};
1032
- }),
1033
- (t.Builder.prototype.b = function (e) {
1034
- e < 0 ? (this._b = 0) : e > 1 ? (this._b = 1) : (this._b = e);
1035
- }),
1036
- (t.Builder.prototype.k1 = function (e) {
1037
- this._k1 = e;
1038
- }),
1039
- (t.Builder.prototype.add = function (e, n) {
1040
- var r = e[this._ref],
1041
- i = Object.keys(this._fields);
1042
- (this._documents[r] = n || {}), (this.documentCount += 1);
1043
- for (var s = 0; s < i.length; s++) {
1044
- var o = i[s],
1045
- a = this._fields[o].extractor,
1046
- u = a ? a(e) : e[o],
1047
- l = this.tokenizer(u, { fields: [o] }),
1048
- h = this.pipeline.run(l),
1049
- m = new t.FieldRef(r, o),
1050
- v = Object.create(null);
1051
- (this.fieldTermFrequencies[m] = v),
1052
- (this.fieldLengths[m] = 0),
1053
- (this.fieldLengths[m] += h.length);
1054
- for (var b = 0; b < h.length; b++) {
1055
- var y = h[b];
1056
- if (
1057
- (v[y] == null && (v[y] = 0),
1058
- (v[y] += 1),
1059
- this.invertedIndex[y] == null)
1060
- ) {
1061
- var E = Object.create(null);
1062
- (E._index = this.termIndex), (this.termIndex += 1);
1063
- for (var p = 0; p < i.length; p++)
1064
- E[i[p]] = Object.create(null);
1065
- this.invertedIndex[y] = E;
1066
- }
1067
- this.invertedIndex[y][o][r] == null &&
1068
- (this.invertedIndex[y][o][r] = Object.create(null));
1069
- for (var f = 0; f < this.metadataWhitelist.length; f++) {
1070
- var S = this.metadataWhitelist[f],
1071
- w = y.metadata[S];
1072
- this.invertedIndex[y][o][r][S] == null &&
1073
- (this.invertedIndex[y][o][r][S] = []),
1074
- this.invertedIndex[y][o][r][S].push(w);
1075
- }
1076
- }
1077
- }
1078
- }),
1079
- (t.Builder.prototype.calculateAverageFieldLengths = function () {
1080
- for (
1081
- var e = Object.keys(this.fieldLengths),
1082
- n = e.length,
1083
- r = {},
1084
- i = {},
1085
- s = 0;
1086
- s < n;
1087
- s++
1088
- ) {
1089
- var o = t.FieldRef.fromString(e[s]),
1090
- a = o.fieldName;
1091
- i[a] || (i[a] = 0),
1092
- (i[a] += 1),
1093
- r[a] || (r[a] = 0),
1094
- (r[a] += this.fieldLengths[o]);
1095
- }
1096
- for (var u = Object.keys(this._fields), s = 0; s < u.length; s++) {
1097
- var l = u[s];
1098
- r[l] = r[l] / i[l];
1099
- }
1100
- this.averageFieldLength = r;
1101
- }),
1102
- (t.Builder.prototype.createFieldVectors = function () {
1103
- for (
1104
- var e = {},
1105
- n = Object.keys(this.fieldTermFrequencies),
1106
- r = n.length,
1107
- i = Object.create(null),
1108
- s = 0;
1109
- s < r;
1110
- s++
1111
- ) {
1112
- for (
1113
- var o = t.FieldRef.fromString(n[s]),
1114
- a = o.fieldName,
1115
- u = this.fieldLengths[o],
1116
- l = new t.Vector(),
1117
- h = this.fieldTermFrequencies[o],
1118
- m = Object.keys(h),
1119
- v = m.length,
1120
- b = this._fields[a].boost || 1,
1121
- y = this._documents[o.docRef].boost || 1,
1122
- E = 0;
1123
- E < v;
1124
- E++
1125
- ) {
1126
- var p = m[E],
1127
- f = h[p],
1128
- S = this.invertedIndex[p]._index,
1129
- w,
1130
- k,
1131
- _;
1132
- i[p] === void 0
1133
- ? ((w = t.idf(this.invertedIndex[p], this.documentCount)),
1134
- (i[p] = w))
1135
- : (w = i[p]),
1136
- (k =
1137
- (w * ((this._k1 + 1) * f)) /
1138
- (this._k1 *
1139
- (1 - this._b + this._b * (u / this.averageFieldLength[a])) +
1140
- f)),
1141
- (k *= b),
1142
- (k *= y),
1143
- (_ = Math.round(k * 1e3) / 1e3),
1144
- l.insert(S, _);
1145
- }
1146
- e[o] = l;
1147
- }
1148
- this.fieldVectors = e;
1149
- }),
1150
- (t.Builder.prototype.createTokenSet = function () {
1151
- this.tokenSet = t.TokenSet.fromArray(
1152
- Object.keys(this.invertedIndex).sort(),
1153
- );
1154
- }),
1155
- (t.Builder.prototype.build = function () {
1156
- return (
1157
- this.calculateAverageFieldLengths(),
1158
- this.createFieldVectors(),
1159
- this.createTokenSet(),
1160
- new t.Index({
1161
- invertedIndex: this.invertedIndex,
1162
- fieldVectors: this.fieldVectors,
1163
- tokenSet: this.tokenSet,
1164
- fields: Object.keys(this._fields),
1165
- pipeline: this.searchPipeline,
1166
- })
1167
- );
1168
- }),
1169
- (t.Builder.prototype.use = function (e) {
1170
- var n = Array.prototype.slice.call(arguments, 1);
1171
- n.unshift(this), e.apply(this, n);
1172
- }),
1173
- (t.MatchData = function (e, n, r) {
1174
- for (
1175
- var i = Object.create(null), s = Object.keys(r || {}), o = 0;
1176
- o < s.length;
1177
- o++
1178
- ) {
1179
- var a = s[o];
1180
- i[a] = r[a].slice();
1181
- }
1182
- (this.metadata = Object.create(null)),
1183
- e !== void 0 &&
1184
- ((this.metadata[e] = Object.create(null)),
1185
- (this.metadata[e][n] = i));
1186
- }),
1187
- (t.MatchData.prototype.combine = function (e) {
1188
- for (var n = Object.keys(e.metadata), r = 0; r < n.length; r++) {
1189
- var i = n[r],
1190
- s = Object.keys(e.metadata[i]);
1191
- this.metadata[i] == null &&
1192
- (this.metadata[i] = Object.create(null));
1193
- for (var o = 0; o < s.length; o++) {
1194
- var a = s[o],
1195
- u = Object.keys(e.metadata[i][a]);
1196
- this.metadata[i][a] == null &&
1197
- (this.metadata[i][a] = Object.create(null));
1198
- for (var l = 0; l < u.length; l++) {
1199
- var h = u[l];
1200
- this.metadata[i][a][h] == null
1201
- ? (this.metadata[i][a][h] = e.metadata[i][a][h])
1202
- : (this.metadata[i][a][h] = this.metadata[i][a][h].concat(
1203
- e.metadata[i][a][h],
1204
- ));
1205
- }
1206
- }
1207
- }
1208
- }),
1209
- (t.MatchData.prototype.add = function (e, n, r) {
1210
- if (!(e in this.metadata)) {
1211
- (this.metadata[e] = Object.create(null)), (this.metadata[e][n] = r);
1212
- return;
1213
- }
1214
- if (!(n in this.metadata[e])) {
1215
- this.metadata[e][n] = r;
1216
- return;
1217
- }
1218
- for (var i = Object.keys(r), s = 0; s < i.length; s++) {
1219
- var o = i[s];
1220
- o in this.metadata[e][n]
1221
- ? (this.metadata[e][n][o] = this.metadata[e][n][o].concat(r[o]))
1222
- : (this.metadata[e][n][o] = r[o]);
1223
- }
1224
- }),
1225
- (t.Query = function (e) {
1226
- (this.clauses = []), (this.allFields = e);
1227
- }),
1228
- (t.Query.wildcard = new String("*")),
1229
- (t.Query.wildcard.NONE = 0),
1230
- (t.Query.wildcard.LEADING = 1),
1231
- (t.Query.wildcard.TRAILING = 2),
1232
- (t.Query.presence = { OPTIONAL: 1, REQUIRED: 2, PROHIBITED: 3 }),
1233
- (t.Query.prototype.clause = function (e) {
1234
- return (
1235
- "fields" in e || (e.fields = this.allFields),
1236
- "boost" in e || (e.boost = 1),
1237
- "usePipeline" in e || (e.usePipeline = !0),
1238
- "wildcard" in e || (e.wildcard = t.Query.wildcard.NONE),
1239
- e.wildcard & t.Query.wildcard.LEADING &&
1240
- e.term.charAt(0) != t.Query.wildcard &&
1241
- (e.term = "*" + e.term),
1242
- e.wildcard & t.Query.wildcard.TRAILING &&
1243
- e.term.slice(-1) != t.Query.wildcard &&
1244
- (e.term = "" + e.term + "*"),
1245
- "presence" in e || (e.presence = t.Query.presence.OPTIONAL),
1246
- this.clauses.push(e),
1247
- this
1248
- );
1249
- }),
1250
- (t.Query.prototype.isNegated = function () {
1251
- for (var e = 0; e < this.clauses.length; e++)
1252
- if (this.clauses[e].presence != t.Query.presence.PROHIBITED)
1253
- return !1;
1254
- return !0;
1255
- }),
1256
- (t.Query.prototype.term = function (e, n) {
1257
- if (Array.isArray(e))
1258
- return (
1259
- e.forEach(function (i) {
1260
- this.term(i, t.utils.clone(n));
1261
- }, this),
1262
- this
1263
- );
1264
- var r = n || {};
1265
- return (r.term = e.toString()), this.clause(r), this;
1266
- }),
1267
- (t.QueryParseError = function (e, n, r) {
1268
- (this.name = "QueryParseError"),
1269
- (this.message = e),
1270
- (this.start = n),
1271
- (this.end = r);
1272
- }),
1273
- (t.QueryParseError.prototype = new Error()),
1274
- (t.QueryLexer = function (e) {
1275
- (this.lexemes = []),
1276
- (this.str = e),
1277
- (this.length = e.length),
1278
- (this.pos = 0),
1279
- (this.start = 0),
1280
- (this.escapeCharPositions = []);
1281
- }),
1282
- (t.QueryLexer.prototype.run = function () {
1283
- for (var e = t.QueryLexer.lexText; e; ) e = e(this);
1284
- }),
1285
- (t.QueryLexer.prototype.sliceString = function () {
1286
- for (
1287
- var e = [], n = this.start, r = this.pos, i = 0;
1288
- i < this.escapeCharPositions.length;
1289
- i++
1290
- )
1291
- (r = this.escapeCharPositions[i]),
1292
- e.push(this.str.slice(n, r)),
1293
- (n = r + 1);
1294
- return (
1295
- e.push(this.str.slice(n, this.pos)),
1296
- (this.escapeCharPositions.length = 0),
1297
- e.join("")
1298
- );
1299
- }),
1300
- (t.QueryLexer.prototype.emit = function (e) {
1301
- this.lexemes.push({
1302
- type: e,
1303
- str: this.sliceString(),
1304
- start: this.start,
1305
- end: this.pos,
1306
- }),
1307
- (this.start = this.pos);
1308
- }),
1309
- (t.QueryLexer.prototype.escapeCharacter = function () {
1310
- this.escapeCharPositions.push(this.pos - 1), (this.pos += 1);
1311
- }),
1312
- (t.QueryLexer.prototype.next = function () {
1313
- if (this.pos >= this.length) return t.QueryLexer.EOS;
1314
- var e = this.str.charAt(this.pos);
1315
- return (this.pos += 1), e;
1316
- }),
1317
- (t.QueryLexer.prototype.width = function () {
1318
- return this.pos - this.start;
1319
- }),
1320
- (t.QueryLexer.prototype.ignore = function () {
1321
- this.start == this.pos && (this.pos += 1), (this.start = this.pos);
1322
- }),
1323
- (t.QueryLexer.prototype.backup = function () {
1324
- this.pos -= 1;
1325
- }),
1326
- (t.QueryLexer.prototype.acceptDigitRun = function () {
1327
- var e, n;
1328
- do (e = this.next()), (n = e.charCodeAt(0));
1329
- while (n > 47 && n < 58);
1330
- e != t.QueryLexer.EOS && this.backup();
1331
- }),
1332
- (t.QueryLexer.prototype.more = function () {
1333
- return this.pos < this.length;
1334
- }),
1335
- (t.QueryLexer.EOS = "EOS"),
1336
- (t.QueryLexer.FIELD = "FIELD"),
1337
- (t.QueryLexer.TERM = "TERM"),
1338
- (t.QueryLexer.EDIT_DISTANCE = "EDIT_DISTANCE"),
1339
- (t.QueryLexer.BOOST = "BOOST"),
1340
- (t.QueryLexer.PRESENCE = "PRESENCE"),
1341
- (t.QueryLexer.lexField = (e) => (
1342
- e.backup(),
1343
- e.emit(t.QueryLexer.FIELD),
1344
- e.ignore(),
1345
- t.QueryLexer.lexText
1346
- )),
1347
- (t.QueryLexer.lexTerm = (e) => {
1348
- if (
1349
- (e.width() > 1 && (e.backup(), e.emit(t.QueryLexer.TERM)),
1350
- e.ignore(),
1351
- e.more())
1352
- )
1353
- return t.QueryLexer.lexText;
1354
- }),
1355
- (t.QueryLexer.lexEditDistance = (e) => (
1356
- e.ignore(),
1357
- e.acceptDigitRun(),
1358
- e.emit(t.QueryLexer.EDIT_DISTANCE),
1359
- t.QueryLexer.lexText
1360
- )),
1361
- (t.QueryLexer.lexBoost = (e) => (
1362
- e.ignore(),
1363
- e.acceptDigitRun(),
1364
- e.emit(t.QueryLexer.BOOST),
1365
- t.QueryLexer.lexText
1366
- )),
1367
- (t.QueryLexer.lexEOS = (e) => {
1368
- e.width() > 0 && e.emit(t.QueryLexer.TERM);
1369
- }),
1370
- (t.QueryLexer.termSeparator = t.tokenizer.separator),
1371
- (t.QueryLexer.lexText = (e) => {
1372
- for (;;) {
1373
- var n = e.next();
1374
- if (n == t.QueryLexer.EOS) return t.QueryLexer.lexEOS;
1375
- if (n.charCodeAt(0) == 92) {
1376
- e.escapeCharacter();
1377
- continue;
1378
- }
1379
- if (n == ":") return t.QueryLexer.lexField;
1380
- if (n == "~")
1381
- return (
1382
- e.backup(),
1383
- e.width() > 0 && e.emit(t.QueryLexer.TERM),
1384
- t.QueryLexer.lexEditDistance
1385
- );
1386
- if (n == "^")
1387
- return (
1388
- e.backup(),
1389
- e.width() > 0 && e.emit(t.QueryLexer.TERM),
1390
- t.QueryLexer.lexBoost
1391
- );
1392
- if ((n == "+" && e.width() === 1) || (n == "-" && e.width() === 1))
1393
- return e.emit(t.QueryLexer.PRESENCE), t.QueryLexer.lexText;
1394
- if (n.match(t.QueryLexer.termSeparator))
1395
- return t.QueryLexer.lexTerm;
1396
- }
1397
- }),
1398
- (t.QueryParser = function (e, n) {
1399
- (this.lexer = new t.QueryLexer(e)),
1400
- (this.query = n),
1401
- (this.currentClause = {}),
1402
- (this.lexemeIdx = 0);
1403
- }),
1404
- (t.QueryParser.prototype.parse = function () {
1405
- this.lexer.run(), (this.lexemes = this.lexer.lexemes);
1406
- for (var e = t.QueryParser.parseClause; e; ) e = e(this);
1407
- return this.query;
1408
- }),
1409
- (t.QueryParser.prototype.peekLexeme = function () {
1410
- return this.lexemes[this.lexemeIdx];
1411
- }),
1412
- (t.QueryParser.prototype.consumeLexeme = function () {
1413
- var e = this.peekLexeme();
1414
- return (this.lexemeIdx += 1), e;
1415
- }),
1416
- (t.QueryParser.prototype.nextClause = function () {
1417
- var e = this.currentClause;
1418
- this.query.clause(e), (this.currentClause = {});
1419
- }),
1420
- (t.QueryParser.parseClause = (e) => {
1421
- var n = e.peekLexeme();
1422
- if (n != null)
1423
- switch (n.type) {
1424
- case t.QueryLexer.PRESENCE:
1425
- return t.QueryParser.parsePresence;
1426
- case t.QueryLexer.FIELD:
1427
- return t.QueryParser.parseField;
1428
- case t.QueryLexer.TERM:
1429
- return t.QueryParser.parseTerm;
1430
- default: {
1431
- var r = "expected either a field or a term, found " + n.type;
1432
- throw (
1433
- (n.str.length >= 1 && (r += " with value '" + n.str + "'"),
1434
- new t.QueryParseError(r, n.start, n.end))
1435
- );
1436
- }
1437
- }
1438
- }),
1439
- (t.QueryParser.parsePresence = (e) => {
1440
- var n = e.consumeLexeme();
1441
- if (n != null) {
1442
- switch (n.str) {
1443
- case "-":
1444
- e.currentClause.presence = t.Query.presence.PROHIBITED;
1445
- break;
1446
- case "+":
1447
- e.currentClause.presence = t.Query.presence.REQUIRED;
1448
- break;
1449
- default: {
1450
- var r = "unrecognised presence operator'" + n.str + "'";
1451
- throw new t.QueryParseError(r, n.start, n.end);
1452
- }
1453
- }
1454
- var i = e.peekLexeme();
1455
- if (i == null) {
1456
- var r = "expecting term or field, found nothing";
1457
- throw new t.QueryParseError(r, n.start, n.end);
1458
- }
1459
- switch (i.type) {
1460
- case t.QueryLexer.FIELD:
1461
- return t.QueryParser.parseField;
1462
- case t.QueryLexer.TERM:
1463
- return t.QueryParser.parseTerm;
1464
- default: {
1465
- var r = "expecting term or field, found '" + i.type + "'";
1466
- throw new t.QueryParseError(r, i.start, i.end);
1467
- }
1468
- }
1469
- }
1470
- }),
1471
- (t.QueryParser.parseField = (e) => {
1472
- var n = e.consumeLexeme();
1473
- if (n != null) {
1474
- if (e.query.allFields.indexOf(n.str) == -1) {
1475
- var r = e.query.allFields.map((o) => "'" + o + "'").join(", "),
1476
- i = "unrecognised field '" + n.str + "', possible fields: " + r;
1477
- throw new t.QueryParseError(i, n.start, n.end);
1478
- }
1479
- e.currentClause.fields = [n.str];
1480
- var s = e.peekLexeme();
1481
- if (s == null) {
1482
- var i = "expecting term, found nothing";
1483
- throw new t.QueryParseError(i, n.start, n.end);
1484
- }
1485
- switch (s.type) {
1486
- case t.QueryLexer.TERM:
1487
- return t.QueryParser.parseTerm;
1488
- default: {
1489
- var i = "expecting term, found '" + s.type + "'";
1490
- throw new t.QueryParseError(i, s.start, s.end);
1491
- }
1492
- }
1493
- }
1494
- }),
1495
- (t.QueryParser.parseTerm = (e) => {
1496
- var n = e.consumeLexeme();
1497
- if (n != null) {
1498
- (e.currentClause.term = n.str.toLowerCase()),
1499
- n.str.indexOf("*") != -1 && (e.currentClause.usePipeline = !1);
1500
- var r = e.peekLexeme();
1501
- if (r == null) {
1502
- e.nextClause();
1503
- return;
1504
- }
1505
- switch (r.type) {
1506
- case t.QueryLexer.TERM:
1507
- return e.nextClause(), t.QueryParser.parseTerm;
1508
- case t.QueryLexer.FIELD:
1509
- return e.nextClause(), t.QueryParser.parseField;
1510
- case t.QueryLexer.EDIT_DISTANCE:
1511
- return t.QueryParser.parseEditDistance;
1512
- case t.QueryLexer.BOOST:
1513
- return t.QueryParser.parseBoost;
1514
- case t.QueryLexer.PRESENCE:
1515
- return e.nextClause(), t.QueryParser.parsePresence;
1516
- default: {
1517
- var i = "Unexpected lexeme type '" + r.type + "'";
1518
- throw new t.QueryParseError(i, r.start, r.end);
1519
- }
1520
- }
1521
- }
1522
- }),
1523
- (t.QueryParser.parseEditDistance = (e) => {
1524
- var n = e.consumeLexeme();
1525
- if (n != null) {
1526
- var r = parseInt(n.str, 10);
1527
- if (isNaN(r)) {
1528
- var i = "edit distance must be numeric";
1529
- throw new t.QueryParseError(i, n.start, n.end);
1530
- }
1531
- e.currentClause.editDistance = r;
1532
- var s = e.peekLexeme();
1533
- if (s == null) {
1534
- e.nextClause();
1535
- return;
1536
- }
1537
- switch (s.type) {
1538
- case t.QueryLexer.TERM:
1539
- return e.nextClause(), t.QueryParser.parseTerm;
1540
- case t.QueryLexer.FIELD:
1541
- return e.nextClause(), t.QueryParser.parseField;
1542
- case t.QueryLexer.EDIT_DISTANCE:
1543
- return t.QueryParser.parseEditDistance;
1544
- case t.QueryLexer.BOOST:
1545
- return t.QueryParser.parseBoost;
1546
- case t.QueryLexer.PRESENCE:
1547
- return e.nextClause(), t.QueryParser.parsePresence;
1548
- default: {
1549
- var i = "Unexpected lexeme type '" + s.type + "'";
1550
- throw new t.QueryParseError(i, s.start, s.end);
1551
- }
1552
- }
1553
- }
1554
- }),
1555
- (t.QueryParser.parseBoost = (e) => {
1556
- var n = e.consumeLexeme();
1557
- if (n != null) {
1558
- var r = parseInt(n.str, 10);
1559
- if (isNaN(r)) {
1560
- var i = "boost must be numeric";
1561
- throw new t.QueryParseError(i, n.start, n.end);
1562
- }
1563
- e.currentClause.boost = r;
1564
- var s = e.peekLexeme();
1565
- if (s == null) {
1566
- e.nextClause();
1567
- return;
1568
- }
1569
- switch (s.type) {
1570
- case t.QueryLexer.TERM:
1571
- return e.nextClause(), t.QueryParser.parseTerm;
1572
- case t.QueryLexer.FIELD:
1573
- return e.nextClause(), t.QueryParser.parseField;
1574
- case t.QueryLexer.EDIT_DISTANCE:
1575
- return t.QueryParser.parseEditDistance;
1576
- case t.QueryLexer.BOOST:
1577
- return t.QueryParser.parseBoost;
1578
- case t.QueryLexer.PRESENCE:
1579
- return e.nextClause(), t.QueryParser.parsePresence;
1580
- default: {
1581
- var i = "Unexpected lexeme type '" + s.type + "'";
1582
- throw new t.QueryParseError(i, s.start, s.end);
1583
- }
1584
- }
1585
- }
1586
- }),
1587
- ((e, n) => {
1588
- typeof define == "function" && define.amd
1589
- ? define(n)
1590
- : typeof ce == "object"
1591
- ? (he.exports = n())
1592
- : (e.lunr = n());
1593
- })(this, () => t);
1594
- })();
1595
- });
1596
- var le = [];
1597
- function B(t, e) {
1598
- le.push({ selector: e, constructor: t });
1599
- }
1600
- var Y = class {
1601
- constructor() {
1602
- this.alwaysVisibleMember = null;
1603
- this.createComponents(document.body),
1604
- this.ensureFocusedElementVisible(),
1605
- window.addEventListener("hashchange", () =>
1606
- this.ensureFocusedElementVisible(),
1607
- );
1608
- }
1609
- createComponents(e) {
1610
- le.forEach((n) => {
1611
- e.querySelectorAll(n.selector).forEach((r) => {
1612
- r.dataset.hasInstance ||
1613
- (new n.constructor({ el: r, app: this }),
1614
- (r.dataset.hasInstance = String(!0)));
1615
- });
1616
- });
1617
- }
1618
- filterChanged() {
1619
- this.ensureFocusedElementVisible();
1620
- }
1621
- ensureFocusedElementVisible() {
1622
- this.alwaysVisibleMember &&
1623
- (this.alwaysVisibleMember.classList.remove("always-visible"),
1624
- this.alwaysVisibleMember.firstElementChild.remove(),
1625
- (this.alwaysVisibleMember = null));
1626
- const e = document.getElementById(location.hash.substring(1));
1627
- if (!e) return;
1628
- let n = e.parentElement;
1629
- for (; n && n.tagName !== "SECTION"; ) n = n.parentElement;
1630
- if (n && n.offsetParent == null) {
1631
- (this.alwaysVisibleMember = n), n.classList.add("always-visible");
1632
- const r = document.createElement("p");
1633
- r.classList.add("warning"),
1634
- (r.textContent =
1635
- "This member is normally hidden due to your filter settings."),
1636
- n.prepend(r);
1637
- }
1638
- }
1639
- };
1640
- var I = class {
1641
- constructor(e) {
1642
- (this.el = e.el), (this.app = e.app);
1643
- }
1644
- };
1645
- var J = class {
1646
- constructor() {
1647
- this.listeners = {};
1648
- }
1649
- addEventListener(e, n) {
1650
- e in this.listeners || (this.listeners[e] = []),
1651
- this.listeners[e].push(n);
1652
- }
1653
- removeEventListener(e, n) {
1654
- if (!(e in this.listeners)) return;
1655
- const r = this.listeners[e];
1656
- for (let i = 0, s = r.length; i < s; i++)
1657
- if (r[i] === n) {
1658
- r.splice(i, 1);
1659
- return;
1660
- }
1661
- }
1662
- dispatchEvent(e) {
1663
- if (!(e.type in this.listeners)) return !0;
1664
- const n = this.listeners[e.type].slice();
1665
- for (let r = 0, i = n.length; r < i; r++) n[r].call(this, e);
1666
- return !e.defaultPrevented;
1667
- }
1668
- };
1669
- var ne = (t, e = 100) => {
1670
- let n = Date.now();
1671
- return (...r) => {
1672
- n + e - Date.now() < 0 && (t(...r), (n = Date.now()));
1673
- };
1674
- };
1675
- var re = class extends J {
1676
- constructor() {
1677
- super();
1678
- this.scrollTop = 0;
1679
- this.lastY = 0;
1680
- this.width = 0;
1681
- this.height = 0;
1682
- this.showToolbar = !0;
1683
- (this.toolbar = document.querySelector(".tsd-page-toolbar")),
1684
- (this.navigation = document.querySelector(".col-menu")),
1685
- window.addEventListener(
1686
- "scroll",
1687
- ne(() => this.onScroll(), 10),
1688
- ),
1689
- window.addEventListener(
1690
- "resize",
1691
- ne(() => this.onResize(), 10),
1692
- ),
1693
- (this.searchInput = document.querySelector("#tsd-search input")),
1694
- this.searchInput &&
1695
- this.searchInput.addEventListener("focus", () => {
1696
- this.hideShowToolbar();
1697
- }),
1698
- this.onResize(),
1699
- this.onScroll();
1700
- }
1701
- triggerResize() {
1702
- const n = new CustomEvent("resize", {
1703
- detail: { width: this.width, height: this.height },
1704
- });
1705
- this.dispatchEvent(n);
1706
- }
1707
- onResize() {
1708
- (this.width = window.innerWidth || 0),
1709
- (this.height = window.innerHeight || 0);
1710
- const n = new CustomEvent("resize", {
1711
- detail: { width: this.width, height: this.height },
1712
- });
1713
- this.dispatchEvent(n);
1714
- }
1715
- onScroll() {
1716
- this.scrollTop = window.scrollY || 0;
1717
- const n = new CustomEvent("scroll", {
1718
- detail: { scrollTop: this.scrollTop },
1719
- });
1720
- this.dispatchEvent(n), this.hideShowToolbar();
1721
- }
1722
- hideShowToolbar() {
1723
- const n = this.showToolbar;
1724
- (this.showToolbar =
1725
- this.lastY >= this.scrollTop ||
1726
- this.scrollTop <= 0 ||
1727
- (!!this.searchInput && this.searchInput === document.activeElement)),
1728
- n !== this.showToolbar &&
1729
- (this.toolbar.classList.toggle("tsd-page-toolbar--hide"),
1730
- this.navigation?.classList.toggle("col-menu--hide")),
1731
- (this.lastY = this.scrollTop);
1732
- }
1733
- },
1734
- R = re;
1735
- R.instance = new re();
1736
- var X = class extends I {
1737
- constructor(n) {
1738
- super(n);
1739
- this.anchors = [];
1740
- this.index = -1;
1741
- R.instance.addEventListener("resize", () => this.onResize()),
1742
- R.instance.addEventListener("scroll", (r) => this.onScroll(r)),
1743
- this.createAnchors();
1744
- }
1745
- createAnchors() {
1746
- let n = window.location.href;
1747
- n.indexOf("#") != -1 && (n = n.substring(0, n.indexOf("#"))),
1748
- this.el.querySelectorAll("a").forEach((r) => {
1749
- const i = r.href;
1750
- if (i.indexOf("#") == -1 || i.substring(0, n.length) != n) return;
1751
- const s = i.substring(i.indexOf("#") + 1),
1752
- o = document.querySelector("a.tsd-anchor[name=" + s + "]"),
1753
- a = r.parentNode;
1754
- !o || !a || this.anchors.push({ link: a, anchor: o, position: 0 });
1755
- }),
1756
- this.onResize();
1757
- }
1758
- onResize() {
1759
- let n;
1760
- for (let i = 0, s = this.anchors.length; i < s; i++) {
1761
- n = this.anchors[i];
1762
- const o = n.anchor.getBoundingClientRect();
1763
- n.position = o.top + document.body.scrollTop;
1764
- }
1765
- this.anchors.sort((i, s) => i.position - s.position);
1766
- const r = new CustomEvent("scroll", {
1767
- detail: { scrollTop: R.instance.scrollTop },
1768
- });
1769
- this.onScroll(r);
1770
- }
1771
- onScroll(n) {
1772
- let r = n.detail.scrollTop + 5,
1773
- i = this.anchors,
1774
- s = i.length - 1,
1775
- o = this.index;
1776
- for (; o > -1 && i[o].position > r; ) o -= 1;
1777
- for (; o < s && i[o + 1].position < r; ) o += 1;
1778
- this.index != o &&
1779
- (this.index > -1 &&
1780
- this.anchors[this.index].link.classList.remove("focus"),
1781
- (this.index = o),
1782
- this.index > -1 &&
1783
- this.anchors[this.index].link.classList.add("focus"));
1784
- }
1785
- };
1786
- var ue = (t, e = 100) => {
1787
- let n;
1788
- return () => {
1789
- clearTimeout(n), (n = setTimeout(() => t(), e));
1790
- };
1791
- };
1792
- var me = De(de());
1793
- function ve() {
1794
- const t = document.getElementById("tsd-search");
1795
- if (!t) return;
1796
- const e = document.getElementById("search-script");
1797
- t.classList.add("loading"),
1798
- e &&
1799
- (e.addEventListener("error", () => {
1800
- t.classList.remove("loading"), t.classList.add("failure");
1801
- }),
1802
- e.addEventListener("load", () => {
1803
- t.classList.remove("loading"), t.classList.add("ready");
1804
- }),
1805
- window.searchData && t.classList.remove("loading"));
1806
- const n = document.querySelector("#tsd-search input"),
1807
- r = document.querySelector("#tsd-search .results");
1808
- if (!n || !r)
1809
- throw new Error(
1810
- "The input field or the result list wrapper was not found",
1811
- );
1812
- let i = !1;
1813
- r.addEventListener("mousedown", () => (i = !0)),
1814
- r.addEventListener("mouseup", () => {
1815
- (i = !1), t.classList.remove("has-focus");
1816
- }),
1817
- n.addEventListener("focus", () => t.classList.add("has-focus")),
1818
- n.addEventListener("blur", () => {
1819
- i || ((i = !1), t.classList.remove("has-focus"));
1820
- });
1821
- const s = { base: t.dataset.base + "/" };
1822
- Fe(t, r, n, s);
1823
- }
1824
- function Fe(t, e, n, r) {
1825
- n.addEventListener(
1826
- "input",
1827
- ue(() => {
1828
- He(t, e, n, r);
1829
- }, 200),
1830
- );
1831
- let i = !1;
1832
- n.addEventListener("keydown", (s) => {
1833
- (i = !0),
1834
- s.key == "Enter"
1835
- ? Ve(e, n)
1836
- : s.key == "Escape"
1837
- ? n.blur()
1838
- : s.key == "ArrowUp"
1839
- ? pe(e, -1)
1840
- : s.key === "ArrowDown"
1841
- ? pe(e, 1)
1842
- : (i = !1);
1843
- }),
1844
- n.addEventListener("keypress", (s) => {
1845
- i && s.preventDefault();
1846
- }),
1847
- document.body.addEventListener("keydown", (s) => {
1848
- s.altKey ||
1849
- s.ctrlKey ||
1850
- s.metaKey ||
1851
- (!n.matches(":focus") &&
1852
- s.key === "/" &&
1853
- (n.focus(), s.preventDefault()));
1854
- });
1855
- }
1856
- function Ae(t, e) {
1857
- t.index ||
1858
- (window.searchData &&
1859
- (e.classList.remove("loading"),
1860
- e.classList.add("ready"),
1861
- (t.data = window.searchData),
1862
- (t.index = me.Index.load(window.searchData.index))));
1863
- }
1864
- function He(t, e, n, r) {
1865
- if ((Ae(r, t), !r.index || !r.data)) return;
1866
- e.textContent = "";
1867
- const i = n.value.trim(),
1868
- s = i ? r.index.search(`*${i}*`) : [];
1869
- for (let o = 0; o < s.length; o++) {
1870
- let a = s[o],
1871
- u = r.data.rows[Number(a.ref)],
1872
- l = 1;
1873
- u.name.toLowerCase().startsWith(i.toLowerCase()) &&
1874
- (l *= 1 + 1 / (1 + Math.abs(u.name.length - i.length))),
1875
- (a.score *= l);
1876
- }
1877
- s.sort((o, a) => a.score - o.score);
1878
- for (let o = 0, a = Math.min(10, s.length); o < a; o++) {
1879
- let u = r.data.rows[Number(s[o].ref)],
1880
- l = fe(u.name, i);
1881
- globalThis.DEBUG_SEARCH_WEIGHTS &&
1882
- (l += ` (score: ${s[o].score.toFixed(2)})`),
1883
- u.parent && (l = `<span class="parent">${fe(u.parent, i)}.</span>${l}`);
1884
- const h = document.createElement("li");
1885
- h.classList.value = u.classes ?? "";
1886
- const m = document.createElement("a");
1887
- (m.href = r.base + u.url),
1888
- (m.innerHTML = l),
1889
- h.append(m),
1890
- e.appendChild(h);
1891
- }
1892
- }
1893
- function pe(t, e) {
1894
- let n = t.querySelector(".current");
1895
- if (!n)
1896
- (n = t.querySelector(e == 1 ? "li:first-child" : "li:last-child")),
1897
- n && n.classList.add("current");
1898
- else {
1899
- let r = n;
1900
- if (e === 1)
1901
- do r = r.nextElementSibling ?? void 0;
1902
- while (r instanceof HTMLElement && r.offsetParent == null);
1903
- else
1904
- do r = r.previousElementSibling ?? void 0;
1905
- while (r instanceof HTMLElement && r.offsetParent == null);
1906
- r && (n.classList.remove("current"), r.classList.add("current"));
1907
- }
1908
- }
1909
- function Ve(t, e) {
1910
- let n = t.querySelector(".current");
1911
- if ((n || (n = t.querySelector("li:first-child")), n)) {
1912
- const r = n.querySelector("a");
1913
- r && (window.location.href = r.href), e.blur();
1914
- }
1915
- }
1916
- function fe(t, e) {
1917
- if (e === "") return t;
1918
- let n = t.toLocaleLowerCase(),
1919
- r = e.toLocaleLowerCase(),
1920
- i = [],
1921
- s = 0,
1922
- o = n.indexOf(r);
1923
- for (; o != -1; )
1924
- i.push(
1925
- ie(t.substring(s, o)),
1926
- `<b>${ie(t.substring(o, o + r.length))}</b>`,
1927
- ),
1928
- (s = o + r.length),
1929
- (o = n.indexOf(r, s));
1930
- return i.push(ie(t.substring(s))), i.join("");
1931
- }
1932
- var Ne = {
1933
- "&": "&amp;",
1934
- "<": "&lt;",
1935
- ">": "&gt;",
1936
- "'": "&#039;",
1937
- '"': "&quot;",
1938
- };
1939
- function ie(t) {
1940
- return t.replace(/[&<>"'"]/g, (e) => Ne[e]);
1941
- }
1942
- var F = "mousedown",
1943
- ye = "mousemove",
1944
- j = "mouseup",
1945
- Z = { x: 0, y: 0 },
1946
- ge = !1,
1947
- se = !1,
1948
- Be = !1,
1949
- A = !1,
1950
- xe = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
1951
- navigator.userAgent,
1952
- );
1953
- document.documentElement.classList.add(xe ? "is-mobile" : "not-mobile");
1954
- xe &&
1955
- "ontouchstart" in document.documentElement &&
1956
- ((Be = !0), (F = "touchstart"), (ye = "touchmove"), (j = "touchend"));
1957
- document.addEventListener(F, (t) => {
1958
- (se = !0), (A = !1);
1959
- const e = F == "touchstart" ? t.targetTouches[0] : t;
1960
- (Z.y = e.pageY || 0), (Z.x = e.pageX || 0);
1961
- });
1962
- document.addEventListener(ye, (t) => {
1963
- if (se && !A) {
1964
- const e = F == "touchstart" ? t.targetTouches[0] : t,
1965
- n = Z.x - (e.pageX || 0),
1966
- r = Z.y - (e.pageY || 0);
1967
- A = Math.sqrt(n * n + r * r) > 10;
1968
- }
1969
- });
1970
- document.addEventListener(j, () => {
1971
- se = !1;
1972
- });
1973
- document.addEventListener("click", (t) => {
1974
- ge && (t.preventDefault(), t.stopImmediatePropagation(), (ge = !1));
1975
- });
1976
- var K = class extends I {
1977
- constructor(n) {
1978
- super(n);
1979
- (this.className = this.el.dataset.toggle || ""),
1980
- this.el.addEventListener(j, (r) => this.onPointerUp(r)),
1981
- this.el.addEventListener("click", (r) => r.preventDefault()),
1982
- document.addEventListener(F, (r) => this.onDocumentPointerDown(r)),
1983
- document.addEventListener(j, (r) => this.onDocumentPointerUp(r));
1984
- }
1985
- setActive(n) {
1986
- if (this.active == n) return;
1987
- (this.active = n),
1988
- document.documentElement.classList.toggle("has-" + this.className, n),
1989
- this.el.classList.toggle("active", n);
1990
- const r = (this.active ? "to-has-" : "from-has-") + this.className;
1991
- document.documentElement.classList.add(r),
1992
- setTimeout(() => document.documentElement.classList.remove(r), 500);
1993
- }
1994
- onPointerUp(n) {
1995
- A || (this.setActive(!0), n.preventDefault());
1996
- }
1997
- onDocumentPointerDown(n) {
1998
- if (this.active) {
1999
- if (n.target.closest(".col-menu, .tsd-filter-group")) return;
2000
- this.setActive(!1);
2001
- }
2002
- }
2003
- onDocumentPointerUp(n) {
2004
- if (!A && this.active && n.target.closest(".col-menu")) {
2005
- const r = n.target.closest("a");
2006
- if (r) {
2007
- let i = window.location.href;
2008
- i.indexOf("#") != -1 && (i = i.substring(0, i.indexOf("#"))),
2009
- r.href.substring(0, i.length) == i &&
2010
- setTimeout(() => this.setActive(!1), 250);
2011
- }
2012
- }
2013
- }
2014
- };
2015
- var oe;
2016
- try {
2017
- oe = localStorage;
2018
- } catch {
2019
- oe = {
2020
- getItem() {
2021
- return null;
2022
- },
2023
- setItem() {},
2024
- };
2025
- }
2026
- var Q = oe;
2027
- var Le = document.head.appendChild(document.createElement("style"));
2028
- Le.dataset.for = "filters";
2029
- var ee = class extends I {
2030
- constructor(n) {
2031
- super(n);
2032
- (this.key = `filter-${this.el.name}`),
2033
- (this.value = this.el.checked),
2034
- this.el.addEventListener("change", () => {
2035
- this.setLocalStorage(this.el.checked);
2036
- }),
2037
- this.setLocalStorage(this.fromLocalStorage()),
2038
- (Le.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
2039
- `);
2040
- }
2041
- fromLocalStorage() {
2042
- const n = Q.getItem(this.key);
2043
- return n ? n === "true" : this.el.checked;
2044
- }
2045
- setLocalStorage(n) {
2046
- Q.setItem(this.key, n.toString()),
2047
- (this.value = n),
2048
- this.handleValueChange();
2049
- }
2050
- handleValueChange() {
2051
- (this.el.checked = this.value),
2052
- document.documentElement.classList.toggle(this.key, this.value),
2053
- this.app.filterChanged(),
2054
- document.querySelectorAll(".tsd-index-section").forEach((n) => {
2055
- n.style.display = "block";
2056
- const r = Array.from(n.querySelectorAll(".tsd-index-link")).every(
2057
- (i) => i.offsetParent == null,
2058
- );
2059
- n.style.display = r ? "none" : "block";
2060
- });
2061
- }
2062
- };
2063
- var te = class extends I {
2064
- constructor(n) {
2065
- super(n);
2066
- this.calculateHeights(),
2067
- (this.summary = this.el.querySelector(".tsd-accordion-summary")),
2068
- (this.icon = this.summary.querySelector("svg")),
2069
- (this.key = `tsd-accordion-${this.summary.textContent.replace(/\s+/g, "-").toLowerCase()}`),
2070
- this.setLocalStorage(this.fromLocalStorage(), !0),
2071
- this.summary.addEventListener("click", (r) => this.toggleVisibility(r)),
2072
- (this.icon.style.transform = this.getIconRotation());
2073
- }
2074
- getIconRotation(n = this.el.open) {
2075
- return `rotate(${n ? 0 : -90}deg)`;
2076
- }
2077
- calculateHeights() {
2078
- const n = this.el.open,
2079
- { position: r, left: i } = this.el.style;
2080
- (this.el.style.position = "fixed"),
2081
- (this.el.style.left = "-9999px"),
2082
- (this.el.open = !0),
2083
- (this.expandedHeight = this.el.offsetHeight + "px"),
2084
- (this.el.open = !1),
2085
- (this.collapsedHeight = this.el.offsetHeight + "px"),
2086
- (this.el.open = n),
2087
- (this.el.style.height = n ? this.expandedHeight : this.collapsedHeight),
2088
- (this.el.style.position = r),
2089
- (this.el.style.left = i);
2090
- }
2091
- toggleVisibility(n) {
2092
- n.preventDefault(),
2093
- (this.el.style.overflow = "hidden"),
2094
- this.el.open ? this.collapse() : this.expand();
2095
- }
2096
- expand(n = !0) {
2097
- (this.el.open = !0),
2098
- this.animate(this.collapsedHeight, this.expandedHeight, {
2099
- opening: !0,
2100
- duration: n ? 300 : 0,
2101
- });
2102
- }
2103
- collapse(n = !0) {
2104
- this.animate(this.expandedHeight, this.collapsedHeight, {
2105
- opening: !1,
2106
- duration: n ? 300 : 0,
2107
- });
2108
- }
2109
- animate(n, r, { opening: i, duration: s = 300 }) {
2110
- if (this.animation) return;
2111
- const o = { duration: s, easing: "ease" };
2112
- (this.animation = this.el.animate({ height: [n, r] }, o)),
2113
- this.icon
2114
- .animate(
2115
- {
2116
- transform: [
2117
- this.icon.style.transform || this.getIconRotation(!i),
2118
- this.getIconRotation(i),
2119
- ],
2120
- },
2121
- o,
2122
- )
2123
- .addEventListener("finish", () => {
2124
- this.icon.style.transform = this.getIconRotation(i);
2125
- }),
2126
- this.animation.addEventListener("finish", () => this.animationEnd(i));
2127
- }
2128
- animationEnd(n) {
2129
- (this.el.open = n),
2130
- (this.animation = void 0),
2131
- (this.el.style.height = "auto"),
2132
- (this.el.style.overflow = "visible"),
2133
- this.setLocalStorage(n);
2134
- }
2135
- fromLocalStorage() {
2136
- const n = Q.getItem(this.key);
2137
- return n ? n === "true" : this.el.open;
2138
- }
2139
- setLocalStorage(n, r = !1) {
2140
- (this.fromLocalStorage() === n && !r) ||
2141
- (Q.setItem(this.key, n.toString()),
2142
- (this.el.open = n),
2143
- this.handleValueChange(r));
2144
- }
2145
- handleValueChange(n = !1) {
2146
- (this.fromLocalStorage() === this.el.open && !n) ||
2147
- (this.fromLocalStorage() ? this.expand(!1) : this.collapse(!1));
2148
- }
2149
- };
2150
- function be(t) {
2151
- const e = Q.getItem("tsd-theme") || "os";
2152
- (t.value = e),
2153
- Ee(e),
2154
- t.addEventListener("change", () => {
2155
- Q.setItem("tsd-theme", t.value), Ee(t.value);
2156
- });
2157
- }
2158
- function Ee(t) {
2159
- document.documentElement.dataset.theme = t;
2160
- }
2161
- ve();
2162
- B(X, ".menu-highlight");
2163
- B(K, "a[data-toggle]");
2164
- B(te, ".tsd-index-accordion");
2165
- B(ee, ".tsd-filter-item input[type=checkbox]");
2166
- var we = document.getElementById("theme");
2167
- we && be(we);
2168
- var je = new Y();
2169
- Object.defineProperty(window, "app", { value: je });
2170
- })();
1
+ "use strict";
2
+ window.translations={"copy":"Copy","copied":"Copied!","normally_hidden":"This member is normally hidden due to your filter settings.","hierarchy_expand":"Expand","hierarchy_collapse":"Collapse","folder":"Folder","search_index_not_available":"The search index is not available","search_no_results_found_for_0":"No results found for {0}","kind_1":"Project","kind_2":"Module","kind_4":"Namespace","kind_8":"Enumeration","kind_16":"Enumeration Member","kind_32":"Variable","kind_64":"Function","kind_128":"Class","kind_256":"Interface","kind_512":"Constructor","kind_1024":"Property","kind_2048":"Method","kind_4096":"Call Signature","kind_8192":"Index Signature","kind_16384":"Constructor Signature","kind_32768":"Parameter","kind_65536":"Type Literal","kind_131072":"Type Parameter","kind_262144":"Accessor","kind_524288":"Get Signature","kind_1048576":"Set Signature","kind_2097152":"Type Alias","kind_4194304":"Reference","kind_8388608":"Document"};
3
+ "use strict";(()=>{var Ke=Object.create;var he=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Xe=Object.getPrototypeOf,Ye=Object.prototype.hasOwnProperty;var et=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var tt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ze(e))!Ye.call(t,i)&&i!==n&&he(t,i,{get:()=>e[i],enumerable:!(r=Ge(e,i))||r.enumerable});return t};var nt=(t,e,n)=>(n=t!=null?Ke(Xe(t)):{},tt(e||!t||!t.__esModule?he(n,"default",{value:t,enumerable:!0}):n,t));var ye=et((me,ge)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=(function(e){return function(n){e.console&&console.warn&&console.warn(n)}})(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var s=r[i],o=e[s];if(Array.isArray(o)){n[s]=o.slice();continue}if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){n[s]=o;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},t.FieldRef=function(e,n,r){this.docRef=e,this.fieldName=n,this._stringValue=r},t.FieldRef.joiner="/",t.FieldRef.fromString=function(e){var n=e.indexOf(t.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=e.slice(0,n),i=e.slice(n+1);return new t.FieldRef(i,r,e)},t.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+t.FieldRef.joiner+this.docRef),this._stringValue};t.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var n=0;n<this.length;n++)this.elements[e[n]]=!0}else this.length=0},t.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},t.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},t.Set.prototype.contains=function(e){return!!this.elements[e]},t.Set.prototype.intersect=function(e){var n,r,i,s=[];if(e===t.Set.complete)return this;if(e===t.Set.empty)return e;this.length<e.length?(n=this,r=e):(n=e,r=this),i=Object.keys(n.elements);for(var o=0;o<i.length;o++){var a=i[o];a in r.elements&&s.push(a)}return new t.Set(s)},t.Set.prototype.union=function(e){return e===t.Set.complete?t.Set.complete:e===t.Set.empty?this:new t.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},t.idf=function(e,n){var r=0;for(var i in e)i!="_index"&&(r+=Object.keys(e[i]).length);var s=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(s))},t.Token=function(e,n){this.str=e||"",this.metadata=n||{}},t.Token.prototype.toString=function(){return this.str},t.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},t.Token.prototype.clone=function(e){return e=e||function(n){return n},new t.Token(e(this.str,this.metadata),this.metadata)};t.tokenizer=function(e,n){if(e==null||e==null)return[];if(Array.isArray(e))return e.map(function(f){return new t.Token(t.utils.asString(f).toLowerCase(),t.utils.clone(n))});for(var r=e.toString().toLowerCase(),i=r.length,s=[],o=0,a=0;o<=i;o++){var c=r.charAt(o),l=o-a;if(c.match(t.tokenizer.separator)||o==i){if(l>0){var d=t.utils.clone(n)||{};d.position=[a,l],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
4
+ `,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r<n;r++){for(var i=this._stack[r],s=[],o=0;o<e.length;o++){var a=i(e[o],o,e);if(!(a==null||a===""))if(Array.isArray(a))for(var c=0;c<a.length;c++)s.push(a[c]);else s.push(a)}e=s}return e},t.Pipeline.prototype.runString=function(e,n){var r=new t.Token(e,n);return this.run([r]).map(function(i){return i.toString()})},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})};t.Vector=function(e){this._magnitude=0,this.elements=e||[]},t.Vector.prototype.positionForIndex=function(e){if(this.elements.length==0)return 0;for(var n=0,r=this.elements.length/2,i=r-n,s=Math.floor(i/2),o=this.elements[s*2];i>1&&(o<e&&(n=s),o>e&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(o<e)return(s+1)*2},t.Vector.prototype.insert=function(e,n){this.upsert(e,n,function(){throw"duplicate index"})},t.Vector.prototype.upsert=function(e,n,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],n):this.elements.splice(i,0,e,n)},t.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,n=this.elements.length,r=1;r<n;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},t.Vector.prototype.dot=function(e){for(var n=0,r=this.elements,i=e.elements,s=r.length,o=i.length,a=0,c=0,l=0,d=0;l<s&&d<o;)a=r[l],c=i[d],a<c?l+=2:a>c?d+=2:a==c&&(n+=r[l+1]*i[d+1],l+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n<this.elements.length;n+=2,r++)e[r]=this.elements[n];return e},t.Vector.prototype.toJSON=function(){return this.elements};t.stemmer=(function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",s=r+"[^aeiouy]*",o=i+"[aeiou]*",a="^("+s+")?"+o+s,c="^("+s+")?"+o+s+"("+o+")?$",l="^("+s+")?"+o+s+o+s,d="^("+s+")?"+i,f=new RegExp(a),p=new RegExp(l),v=new RegExp(c),x=new RegExp(d),w=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,T=/^(.+?)(ed|ing)$/,L=/.$/,C=/(at|bl|iz)$/,O=new RegExp("([^aeiouylsz])\\1$"),j=new RegExp("^"+s+i+"[^aeiouwxy]$"),N=/^(.+?[^aeiou])y$/,q=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,W=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,B=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,z=/^(.+?)(s|t)(ion)$/,_=/^(.+?)e$/,U=/ll$/,J=new RegExp("^"+s+i+"[^aeiouwxy]$"),V=function(u){var y,P,k,h,E,Q,H;if(u.length<3)return u;if(k=u.substr(0,1),k=="y"&&(u=k.toUpperCase()+u.substr(1)),h=w,E=m,h.test(u)?u=u.replace(h,"$1$2"):E.test(u)&&(u=u.replace(E,"$1$2")),h=g,E=T,h.test(u)){var b=h.exec(u);h=f,h.test(b[1])&&(h=L,u=u.replace(h,""))}else if(E.test(u)){var b=E.exec(u);y=b[1],E=x,E.test(y)&&(u=y,E=C,Q=O,H=j,E.test(u)?u=u+"e":Q.test(u)?(h=L,u=u.replace(h,"")):H.test(u)&&(u=u+"e"))}if(h=N,h.test(u)){var b=h.exec(u);y=b[1],u=y+"i"}if(h=q,h.test(u)){var b=h.exec(u);y=b[1],P=b[2],h=f,h.test(y)&&(u=y+e[P])}if(h=W,h.test(u)){var b=h.exec(u);y=b[1],P=b[2],h=f,h.test(y)&&(u=y+n[P])}if(h=B,E=z,h.test(u)){var b=h.exec(u);y=b[1],h=p,h.test(y)&&(u=y)}else if(E.test(u)){var b=E.exec(u);y=b[1]+b[2],E=p,E.test(y)&&(u=y)}if(h=_,h.test(u)){var b=h.exec(u);y=b[1],h=p,E=v,Q=J,(h.test(y)||E.test(y)&&!Q.test(y))&&(u=y)}return h=U,E=p,h.test(u)&&E.test(u)&&(h=L,u=u.replace(h,"")),k=="y"&&(u=k.toLowerCase()+u.substr(1)),u};return function(A){return A.update(V)}})(),t.Pipeline.registerFunction(t.stemmer,"stemmer");t.generateStopWordFilter=function(e){var n=e.reduce(function(r,i){return r[i]=i,r},{});return function(r){if(r&&n[r.toString()]!==r.toString())return r}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter");t.trimmer=function(e){return e.update(function(n){return n.replace(/^\W+/,"").replace(/\W+$/,"")})},t.Pipeline.registerFunction(t.trimmer,"trimmer");t.TokenSet=function(){this.final=!1,this.edges={},this.id=t.TokenSet._nextId,t.TokenSet._nextId+=1},t.TokenSet._nextId=1,t.TokenSet.fromArray=function(e){for(var n=new t.TokenSet.Builder,r=0,i=e.length;r<i;r++)n.insert(e[r]);return n.finish(),n.root},t.TokenSet.fromClause=function(e){return"editDistance"in e?t.TokenSet.fromFuzzyString(e.term,e.editDistance):t.TokenSet.fromString(e.term)},t.TokenSet.fromFuzzyString=function(e,n){for(var r=new t.TokenSet,i=[{node:r,editsRemaining:n,str:e}];i.length;){var s=i.pop();if(s.str.length>0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new t.TokenSet;s.node.edges["*"]=c}if(s.str.length==0&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),f=s.str.charAt(1),p;f in s.node.edges?p=s.node.edges[f]:(p=new t.TokenSet,s.node.edges[f]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i<s;i++){var o=e[i],a=i==s-1;if(o=="*")n.edges[o]=n,n.final=a;else{var c=new t.TokenSet;c.final=a,n.edges[o]=c,n=c}}return r},t.TokenSet.prototype.toArray=function(){for(var e=[],n=[{prefix:"",node:this}];n.length;){var r=n.pop(),i=Object.keys(r.node.edges),s=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var o=0;o<s;o++){var a=i[o];n.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return e},t.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",n=Object.keys(this.edges).sort(),r=n.length,i=0;i<r;i++){var s=n[i],o=this.edges[s];e=e+s+o.id}return e},t.TokenSet.prototype.intersect=function(e){for(var n=new t.TokenSet,r=void 0,i=[{qNode:e,output:n,node:this}];i.length;){r=i.pop();for(var s=Object.keys(r.qNode.edges),o=s.length,a=Object.keys(r.node.edges),c=a.length,l=0;l<o;l++)for(var d=s[l],f=0;f<c;f++){var p=a[f];if(p==d||d=="*"){var v=r.node.edges[p],x=r.qNode.edges[d],w=v.final&&x.final,m=void 0;p in r.output.edges?(m=r.output.edges[p],m.final=m.final||w):(m=new t.TokenSet,m.final=w,r.output.edges[p]=m),i.push({qNode:x,output:m,node:v})}}}return n},t.TokenSet.Builder=function(){this.previousWord="",this.root=new t.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},t.TokenSet.Builder.prototype.insert=function(e){var n,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),this.uncheckedNodes.length==0?n=this.root:n=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<e.length;i++){var s=new t.TokenSet,o=e[i];n.edges[o]=s,this.uncheckedNodes.push({parent:n,char:o,child:s}),n=s}n.final=!0,this.previousWord=e},t.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},t.TokenSet.Builder.prototype.minimize=function(e){for(var n=this.uncheckedNodes.length-1;n>=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),c=0;c<this.fields.length;c++)i[this.fields[c]]=new t.Vector;e.call(n,n);for(var c=0;c<n.clauses.length;c++){var l=n.clauses[c],d=null,f=t.Set.empty;l.usePipeline?d=this.pipeline.runString(l.term,{fields:l.fields}):d=[l.term];for(var p=0;p<d.length;p++){var v=d[p];l.term=v;var x=t.TokenSet.fromClause(l),w=this.tokenSet.intersect(x).toArray();if(w.length===0&&l.presence===t.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){var g=l.fields[m];o[g]=t.Set.empty}break}for(var T=0;T<w.length;T++)for(var L=w[T],C=this.invertedIndex[L],O=C._index,m=0;m<l.fields.length;m++){var g=l.fields[m],j=C[g],N=Object.keys(j),q=L+"/"+g,W=new t.Set(N);if(l.presence==t.Query.presence.REQUIRED&&(f=f.union(W),o[g]===void 0&&(o[g]=t.Set.complete)),l.presence==t.Query.presence.PROHIBITED){a[g]===void 0&&(a[g]=t.Set.empty),a[g]=a[g].union(W);continue}if(i[g].upsert(O,l.boost,function(Ue,Je){return Ue+Je}),!s[q]){for(var B=0;B<N.length;B++){var z=N[B],_=new t.FieldRef(z,g),U=j[z],J;(J=r[_])===void 0?r[_]=new t.MatchData(L,g,U):J.add(L,g,U)}s[q]=!0}}}if(l.presence===t.Query.presence.REQUIRED)for(var m=0;m<l.fields.length;m++){var g=l.fields[m];o[g]=o[g].intersect(f)}}for(var V=t.Set.complete,A=t.Set.empty,c=0;c<this.fields.length;c++){var g=this.fields[c];o[g]&&(V=V.intersect(o[g])),a[g]&&(A=A.union(a[g]))}var u=Object.keys(r),y=[],P=Object.create(null);if(n.isNegated()){u=Object.keys(this.fieldVectors);for(var c=0;c<u.length;c++){var _=u[c],k=t.FieldRef.fromString(_);r[_]=new t.MatchData}}for(var c=0;c<u.length;c++){var k=t.FieldRef.fromString(u[c]),h=k.docRef;if(V.contains(h)&&!A.contains(h)){var E=this.fieldVectors[k],Q=i[k.fieldName].similarity(E),H;if((H=P[h])!==void 0)H.score+=Q,H.matchData.combine(r[k]);else{var b={ref:h,score:Q,matchData:r[k]};P[h]=b,y.push(b)}}}return y.sort(function(We,ze){return ze.score-We.score})},t.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map(function(r){return[r,this.invertedIndex[r]]},this),n=Object.keys(this.fieldVectors).map(function(r){return[r,this.fieldVectors[r].toJSON()]},this);return{version:t.version,fields:this.fields,fieldVectors:n,invertedIndex:e,pipeline:this.pipeline.toJSON()}},t.Index.load=function(e){var n={},r={},i=e.fieldVectors,s=Object.create(null),o=e.invertedIndex,a=new t.TokenSet.Builder,c=t.Pipeline.load(e.pipeline);e.version!=t.version&&t.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+t.version+"' does not match serialized index '"+e.version+"'");for(var l=0;l<i.length;l++){var d=i[l],f=d[0],p=d[1];r[f]=new t.Vector(p)}for(var l=0;l<o.length;l++){var d=o[l],v=d[0],x=d[1];a.insert(v),s[v]=x}return a.finish(),n.fields=e.fields,n.fieldVectors=r,n.invertedIndex=s,n.tokenSet=a.root,n.pipeline=c,new t.Index(n)};t.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=t.tokenizer,this.pipeline=new t.Pipeline,this.searchPipeline=new t.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},t.Builder.prototype.ref=function(e){this._ref=e},t.Builder.prototype.field=function(e,n){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=n||{}},t.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,c=a?a(e):e[o],l=this.tokenizer(c,{fields:[o]}),d=this.pipeline.run(l),f=new t.FieldRef(r,o),p=Object.create(null);this.fieldTermFrequencies[f]=p,this.fieldLengths[f]=0,this.fieldLengths[f]+=d.length;for(var v=0;v<d.length;v++){var x=d[v];if(p[x]==null&&(p[x]=0),p[x]+=1,this.invertedIndex[x]==null){var w=Object.create(null);w._index=this.termIndex,this.termIndex+=1;for(var m=0;m<i.length;m++)w[i[m]]=Object.create(null);this.invertedIndex[x]=w}this.invertedIndex[x][o][r]==null&&(this.invertedIndex[x][o][r]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var T=this.metadataWhitelist[g],L=x.metadata[T];this.invertedIndex[x][o][r][T]==null&&(this.invertedIndex[x][o][r][T]=[]),this.invertedIndex[x][o][r][T].push(L)}}}},t.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),n=e.length,r={},i={},s=0;s<n;s++){var o=t.FieldRef.fromString(e[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[o]}for(var c=Object.keys(this._fields),s=0;s<c.length;s++){var l=c[s];r[l]=r[l]/i[l]}this.averageFieldLength=r},t.Builder.prototype.createFieldVectors=function(){for(var e={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),s=0;s<r;s++){for(var o=t.FieldRef.fromString(n[s]),a=o.fieldName,c=this.fieldLengths[o],l=new t.Vector,d=this.fieldTermFrequencies[o],f=Object.keys(d),p=f.length,v=this._fields[a].boost||1,x=this._documents[o.docRef].boost||1,w=0;w<p;w++){var m=f[w],g=d[m],T=this.invertedIndex[m]._index,L,C,O;i[m]===void 0?(L=t.idf(this.invertedIndex[m],this.documentCount),i[m]=L):L=i[m],C=L*((this._k1+1)*g)/(this._k1*(1-this._b+this._b*(c/this.averageFieldLength[a]))+g),C*=v,C*=x,O=Math.round(C*1e3)/1e3,l.insert(T,O)}e[o]=l}this.fieldVectors=e},t.Builder.prototype.createTokenSet=function(){this.tokenSet=t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},t.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new t.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},t.Builder.prototype.use=function(e){var n=Array.prototype.slice.call(arguments,1);n.unshift(this),e.apply(this,n)},t.MatchData=function(e,n,r){for(var i=Object.create(null),s=Object.keys(r||{}),o=0;o<s.length;o++){var a=s[o];i[a]=r[a].slice()}this.metadata=Object.create(null),e!==void 0&&(this.metadata[e]=Object.create(null),this.metadata[e][n]=i)},t.MatchData.prototype.combine=function(e){for(var n=Object.keys(e.metadata),r=0;r<n.length;r++){var i=n[r],s=Object.keys(e.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var o=0;o<s.length;o++){var a=s[o],c=Object.keys(e.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var l=0;l<c.length;l++){var d=c[l];this.metadata[i][a][d]==null?this.metadata[i][a][d]=e.metadata[i][a][d]:this.metadata[i][a][d]=this.metadata[i][a][d].concat(e.metadata[i][a][d])}}}},t.MatchData.prototype.add=function(e,n,r){if(!(e in this.metadata)){this.metadata[e]=Object.create(null),this.metadata[e][n]=r;return}if(!(n in this.metadata[e])){this.metadata[e][n]=r;return}for(var i=Object.keys(r),s=0;s<i.length;s++){var o=i[s];o in this.metadata[e][n]?this.metadata[e][n][o]=this.metadata[e][n][o].concat(r[o]):this.metadata[e][n][o]=r[o]}},t.Query=function(e){this.clauses=[],this.allFields=e},t.Query.wildcard=new String("*"),t.Query.wildcard.NONE=0,t.Query.wildcard.LEADING=1,t.Query.wildcard.TRAILING=2,t.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},t.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=t.Query.wildcard.NONE),e.wildcard&t.Query.wildcard.LEADING&&e.term.charAt(0)!=t.Query.wildcard&&(e.term="*"+e.term),e.wildcard&t.Query.wildcard.TRAILING&&e.term.slice(-1)!=t.Query.wildcard&&(e.term=""+e.term+"*"),"presence"in e||(e.presence=t.Query.presence.OPTIONAL),this.clauses.push(e),this},t.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=t.Query.presence.PROHIBITED)return!1;return!0},t.Query.prototype.term=function(e,n){if(Array.isArray(e))return e.forEach(function(i){this.term(i,t.utils.clone(n))},this),this;var r=n||{};return r.term=e.toString(),this.clause(r),this},t.QueryParseError=function(e,n,r){this.name="QueryParseError",this.message=e,this.start=n,this.end=r},t.QueryParseError.prototype=new Error,t.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},t.QueryLexer.prototype.run=function(){for(var e=t.QueryLexer.lexText;e;)e=e(this)},t.QueryLexer.prototype.sliceString=function(){for(var e=[],n=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(n,r)),n=r+1;return e.push(this.str.slice(n,this.pos)),this.escapeCharPositions.length=0,e.join("")},t.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},t.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},t.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos<this.length},t.QueryLexer.EOS="EOS",t.QueryLexer.FIELD="FIELD",t.QueryLexer.TERM="TERM",t.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",t.QueryLexer.BOOST="BOOST",t.QueryLexer.PRESENCE="PRESENCE",t.QueryLexer.lexField=function(e){return e.backup(),e.emit(t.QueryLexer.FIELD),e.ignore(),t.QueryLexer.lexText},t.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},(function(e,n){typeof define=="function"&&define.amd?define(n):typeof me=="object"?ge.exports=n():e.lunr=n()})(this,function(){return t})})()});var M,G={getItem(){return null},setItem(){}},K;try{K=localStorage,M=K}catch{K=G,M=G}var S={getItem:t=>M.getItem(t),setItem:(t,e)=>M.setItem(t,e),disableWritingLocalStorage(){M=G},disable(){localStorage.clear(),M=G},enable(){M=K}};window.TypeDoc||={disableWritingLocalStorage(){S.disableWritingLocalStorage()},disableLocalStorage:()=>{S.disable()},enableLocalStorage:()=>{S.enable()}};window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse",search_index_not_available:"The search index is not available",search_no_results_found_for_0:"No results found for {0}",folder:"Folder",kind_1:"Project",kind_2:"Module",kind_4:"Namespace",kind_8:"Enumeration",kind_16:"Enumeration Member",kind_32:"Variable",kind_64:"Function",kind_128:"Class",kind_256:"Interface",kind_512:"Constructor",kind_1024:"Property",kind_2048:"Method",kind_4096:"Call Signature",kind_8192:"Index Signature",kind_16384:"Constructor Signature",kind_32768:"Parameter",kind_65536:"Type Literal",kind_131072:"Type Parameter",kind_262144:"Accessor",kind_524288:"Get Signature",kind_1048576:"Set Signature",kind_2097152:"Type Alias",kind_4194304:"Reference",kind_8388608:"Document"};var pe=[];function X(t,e){pe.push({selector:e,constructor:t})}var Z=class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){pe.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!rt(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function rt(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var fe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var Ie=nt(ye(),1);async function R(t){let e=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),r=new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate")),i=await new Response(r).text();return JSON.parse(i)}var Y="closing",ae="tsd-overlay";function it(){let t=Math.abs(window.innerWidth-document.documentElement.clientWidth);document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`}function st(){document.body.style.removeProperty("overflow"),document.body.style.removeProperty("padding-right")}function xe(t,e){t.addEventListener("animationend",()=>{t.classList.contains(Y)&&(t.classList.remove(Y),document.getElementById(ae)?.remove(),t.close(),st())}),t.addEventListener("cancel",n=>{n.preventDefault(),ve(t)}),e?.closeOnClick&&document.addEventListener("click",n=>{t.open&&!t.contains(n.target)&&ve(t)},!0)}function Ee(t){if(t.open)return;let e=document.createElement("div");e.id=ae,document.body.appendChild(e),t.showModal(),it()}function ve(t){if(!t.open)return;document.getElementById(ae)?.classList.add(Y),t.classList.add(Y)}var I=class{el;app;constructor(e){this.el=e.el,this.app=e.app}};var be=document.head.appendChild(document.createElement("style"));be.dataset.for="filters";var le={};function we(t){for(let e of t.split(/\s+/))if(le.hasOwnProperty(e)&&!le[e])return!0;return!1}var ee=class extends I{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),be.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
5
+ `,this.app.updateIndexVisibility()}fromLocalStorage(){let e=S.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){S.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),le[`tsd-is-${this.el.name}`]=this.value,this.app.filterChanged(),this.app.updateIndexVisibility()}};var Le=0;async function Se(t,e){if(!window.searchData)return;let n=await R(window.searchData);t.data=n,t.index=Ie.Index.load(n.index),e.innerHTML=""}function _e(){let t=document.getElementById("tsd-search-trigger"),e=document.getElementById("tsd-search"),n=document.getElementById("tsd-search-input"),r=document.getElementById("tsd-search-results"),i=document.getElementById("tsd-search-script"),s=document.getElementById("tsd-search-status");if(!(t&&e&&n&&r&&i&&s))throw new Error("Search controls missing");let o={base:document.documentElement.dataset.base};o.base.endsWith("/")||(o.base+="/"),i.addEventListener("error",()=>{let a=window.translations.search_index_not_available;Pe(s,a)}),i.addEventListener("load",()=>{Se(o,s)}),Se(o,s),ot({trigger:t,searchEl:e,results:r,field:n,status:s},o)}function ot(t,e){let{field:n,results:r,searchEl:i,status:s,trigger:o}=t;xe(i,{closeOnClick:!0});function a(){Ee(i),n.setSelectionRange(0,n.value.length)}o.addEventListener("click",a),n.addEventListener("input",fe(()=>{at(r,n,s,e)},200)),n.addEventListener("keydown",l=>{if(r.childElementCount===0||l.ctrlKey||l.metaKey||l.altKey)return;let d=n.getAttribute("aria-activedescendant"),f=d?document.getElementById(d):null;if(f){let p=!1,v=!1;switch(l.key){case"Home":case"End":case"ArrowLeft":case"ArrowRight":v=!0;break;case"ArrowDown":case"ArrowUp":p=l.shiftKey;break}(p||v)&&ke(n)}if(!l.shiftKey)switch(l.key){case"Enter":f?.querySelector("a")?.click();break;case"ArrowUp":Te(r,n,f,-1),l.preventDefault();break;case"ArrowDown":Te(r,n,f,1),l.preventDefault();break}});function c(){ke(n)}n.addEventListener("change",c),n.addEventListener("blur",c),n.addEventListener("click",c),document.body.addEventListener("keydown",l=>{if(l.altKey||l.metaKey||l.shiftKey)return;let d=l.ctrlKey&&l.key==="k",f=!l.ctrlKey&&!ut()&&l.key==="/";(d||f)&&(l.preventDefault(),a())})}function at(t,e,n,r){if(!r.index||!r.data)return;t.innerHTML="",n.innerHTML="",Le+=1;let i=e.value.trim(),s;if(i){let a=i.split(" ").map(c=>c.length?`*${c}*`:"").join(" ");s=r.index.search(a).filter(({ref:c})=>{let l=r.data.rows[Number(c)].classes;return!l||!we(l)})}else s=[];if(s.length===0&&i){let a=window.translations.search_no_results_found_for_0.replace("{0}",` "<strong>${te(i)}</strong>" `);Pe(n,a);return}for(let a=0;a<s.length;a++){let c=s[a],l=r.data.rows[Number(c.ref)],d=1;l.name.toLowerCase().startsWith(i.toLowerCase())&&(d*=10/(1+Math.abs(l.name.length-i.length))),c.score*=d}s.sort((a,c)=>c.score-a.score);let o=Math.min(10,s.length);for(let a=0;a<o;a++){let c=r.data.rows[Number(s[a].ref)],d=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${window.translations[`kind_${c.kind}`].replaceAll('"',"&quot;")}"><use href="#icon-${c.icon||c.kind}"></use></svg>`,f=Ce(c.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(f+=` (score: ${s[a].score.toFixed(2)})`),c.parent&&(f=`<span class="parent">
6
+ ${Ce(c.parent,i)}.</span>${f}`);let p=document.createElement("li");p.id=`tsd-search:${Le}-${a}`,p.role="option",p.ariaSelected="false",p.classList.value=c.classes??"";let v=document.createElement("a");v.tabIndex=-1,v.href=r.base+c.url,v.innerHTML=d+`<span class="text">${f}</span>`,p.append(v),t.appendChild(p)}}function Te(t,e,n,r){let i;if(r===1?i=n?.nextElementSibling||t.firstElementChild:i=n?.previousElementSibling||t.lastElementChild,i!==n){if(!i||i.role!=="option"){console.error("Option missing");return}i.ariaSelected="true",i.scrollIntoView({behavior:"smooth",block:"nearest"}),e.setAttribute("aria-activedescendant",i.id),n?.setAttribute("aria-selected","false")}}function ke(t){let e=t.getAttribute("aria-activedescendant");(e?document.getElementById(e):null)?.setAttribute("aria-selected","false"),t.setAttribute("aria-activedescendant","")}function Ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(te(t.substring(s,o)),`<mark>${te(t.substring(o,o+r.length))}</mark>`),s=o+r.length,o=n.indexOf(r,s);return i.push(te(t.substring(s))),i.join("")}var lt={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#039;",'"':"&quot;"};function te(t){return t.replace(/[&<>"'"]/g,e=>lt[e])}function Pe(t,e){t.innerHTML=e?`<div>${e}</div>`:""}var ct=["button","checkbox","file","hidden","image","radio","range","reset","submit"];function ut(){let t=document.activeElement;return t?t.isContentEditable||t.tagName==="TEXTAREA"||t.tagName==="SEARCH"?!0:t.tagName==="INPUT"&&!ct.includes(t.type):!1}var D="mousedown",Me="mousemove",$="mouseup",ne={x:0,y:0},Qe=!1,ce=!1,dt=!1,F=!1,Oe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Oe?"is-mobile":"not-mobile");Oe&&"ontouchstart"in document.documentElement&&(dt=!0,D="touchstart",Me="touchmove",$="touchend");document.addEventListener(D,t=>{ce=!0,F=!1;let e=D=="touchstart"?t.targetTouches[0]:t;ne.y=e.pageY||0,ne.x=e.pageX||0});document.addEventListener(Me,t=>{if(ce&&!F){let e=D=="touchstart"?t.targetTouches[0]:t,n=ne.x-(e.pageX||0),r=ne.y-(e.pageY||0);F=Math.sqrt(n*n+r*r)>10}});document.addEventListener($,()=>{ce=!1});document.addEventListener("click",t=>{Qe&&(t.preventDefault(),t.stopImmediatePropagation(),Qe=!1)});var re=class extends I{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener($,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(D,n=>this.onDocumentPointerDown(n)),document.addEventListener($,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){F||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!F&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var ue=new Map,de=class{open;accordions=[];key;constructor(e,n){this.key=e,this.open=n}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",()=>{this.toggle(e.open)})}toggle(e){for(let n of this.accordions)n.open=e;S.setItem(this.key,e.toString())}},ie=class extends I{constructor(e){super(e);let n=this.el.querySelector("summary"),r=n.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)});let i=`tsd-accordion-${n.dataset.key??n.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`,s;if(ue.has(i))s=ue.get(i);else{let o=S.getItem(i),a=o?o==="true":this.el.open;s=new de(i,a),ue.set(i,s)}s.add(this.el)}};function He(t){let e=S.getItem("tsd-theme")||"os";t.value=e,Ae(e),t.addEventListener("change",()=>{S.setItem("tsd-theme",t.value),Ae(t.value)})}function Ae(t){document.documentElement.dataset.theme=t}var se;function Ne(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Re),Re())}async function Re(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let e=await R(window.navigationData);se=document.documentElement.dataset.base,se.endsWith("/")||(se+="/"),t.innerHTML="";for(let n of e)Be(n,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Be(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>',De(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let c=a.appendChild(document.createElement("ul"));c.className="tsd-nested-navigation";for(let l of t.children)Be(l,c,i)}else De(t,r,t.class)}function De(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));if(r.href=se+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&(r.classList.add("current"),r.ariaCurrent="page"),t.kind){let i=window.translations[`kind_${t.kind}`].replaceAll('"',"&quot;");r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-${t.icon||t.kind}"></use></svg>`}r.appendChild(Fe(t.text,document.createElement("span")))}else{let r=e.appendChild(document.createElement("span")),i=window.translations.folder.replaceAll('"',"&quot;");r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-folder"></use></svg>`,r.appendChild(Fe(t.text,document.createElement("span")))}}function Fe(t,e){let n=t.split(/(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(?<=[_-])(?=[^_-])/);for(let r=0;r<n.length;++r)r!==0&&e.appendChild(document.createElement("wbr")),e.appendChild(document.createTextNode(n[r]));return e}var oe=document.documentElement.dataset.base;oe.endsWith("/")||(oe+="/");function $e(){document.querySelector(".tsd-full-hierarchy")?ht():document.querySelector(".tsd-hierarchy")&&pt()}function ht(){document.addEventListener("click",r=>{let i=r.target;for(;i.parentElement&&i.parentElement.tagName!="LI";)i=i.parentElement;i.dataset.dropdown&&(i.dataset.dropdown=String(i.dataset.dropdown!=="true"))});let t=new Map,e=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let i=r.querySelector("ul");t.has(r.dataset.refl)?e.add(r.dataset.refl):i&&t.set(r.dataset.refl,i)}for(let r of e)n(r);function n(r){let i=t.get(r).cloneNode(!0);i.querySelectorAll("[id]").forEach(s=>{s.removeAttribute("id")}),i.querySelectorAll("[data-dropdown]").forEach(s=>{s.dataset.dropdown="false"});for(let s of document.querySelectorAll(`[data-refl="${r}"]`)){let o=gt(),a=s.querySelector("ul");s.insertBefore(o,a),o.dataset.dropdown=String(!!a),a||s.appendChild(i.cloneNode(!0))}}}function pt(){let t=document.getElementById("tsd-hierarchy-script");t&&(t.addEventListener("load",Ve),Ve())}async function Ve(){let t=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!t||!window.hierarchyData)return;let e=+t.dataset.refl,n=await R(window.hierarchyData),r=t.querySelector("ul"),i=document.createElement("ul");if(i.classList.add("tsd-hierarchy"),ft(i,n,e),r.querySelectorAll("li").length==i.querySelectorAll("li").length)return;let s=document.createElement("span");s.classList.add("tsd-hierarchy-toggle"),s.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",s),s.insertAdjacentText("beforebegin",", "),s.addEventListener("click",()=>{s.textContent===window.translations.hierarchy_expand?(r.insertAdjacentElement("afterend",i),r.remove(),s.textContent=window.translations.hierarchy_collapse):(i.insertAdjacentElement("afterend",r),i.remove(),s.textContent=window.translations.hierarchy_expand)})}function ft(t,e,n){let r=e.roots.filter(i=>mt(e,i,n));for(let i of r)t.appendChild(je(e,i,n))}function je(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let i=t.reflections[e],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),e===n){let o=s.appendChild(document.createElement("span"));o.textContent=i.name,o.classList.add("tsd-hierarchy-target")}else{for(let a of i.uniqueNameParents||[]){let c=t.reflections[a],l=s.appendChild(document.createElement("a"));l.textContent=c.name,l.href=oe+c.url,l.className=c.class+" tsd-signature-type",s.append(document.createTextNode("."))}let o=s.appendChild(document.createElement("a"));o.textContent=t.reflections[e].name,o.href=oe+i.url,o.className=i.class+" tsd-signature-type"}if(i.children){let o=s.appendChild(document.createElement("ul"));o.classList.add("tsd-hierarchy");for(let a of i.children){let c=je(t,a,n,r);c&&o.appendChild(c)}}return r.delete(e),s}function mt(t,e,n){if(e===n)return!0;let r=new Set,i=[t.reflections[e]];for(;i.length;){let s=i.pop();if(!r.has(s)){r.add(s);for(let o of s.children||[]){if(o===n)return!0;i.push(t.reflections[o])}}}return!1}function gt(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.innerHTML='<use href="#icon-chevronDown"></use>',t}X(re,"a[data-toggle]");X(ie,".tsd-accordion");X(ee,".tsd-filter-item input[type=checkbox]");var qe=document.getElementById("tsd-theme");qe&&He(qe);var yt=new Z;Object.defineProperty(window,"app",{value:yt});_e();Ne();$e();"virtualKeyboard"in navigator&&(navigator.virtualKeyboard.overlaysContent=!0);})();
2171
7
  /*! Bundled license information:
2172
8
 
2173
9
  lunr/lunr.js: