@riboseinc/anafero-cli 0.0.34 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap.js +379 -365
- package/bootstrap.js.map +3 -3
- package/build-generator.mts +13 -0
- package/build-site.mjs +11 -1
- package/generate-to-filesystem.tsx +10 -1
- package/package.json +1 -1
- package/riboseinc-anafero-cli-0.0.36.tgz +0 -0
- package/riboseinc-anafero-cli-0.0.34.tgz +0 -0
package/bootstrap.js
CHANGED
|
@@ -72480,36 +72480,36 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72480
72480
|
var require_lunr = __commonJS({
|
|
72481
72481
|
"../../.yarn/cache/lunr-npm-2.3.9-fa3aa9c2d6-77d7dbb4fb.zip/node_modules/lunr/lunr.js"(exports, module) {
|
|
72482
72482
|
(function() {
|
|
72483
|
-
var
|
|
72484
|
-
var builder = new
|
|
72483
|
+
var lunr4 = function(config2) {
|
|
72484
|
+
var builder = new lunr4.Builder();
|
|
72485
72485
|
builder.pipeline.add(
|
|
72486
|
-
|
|
72487
|
-
|
|
72488
|
-
|
|
72486
|
+
lunr4.trimmer,
|
|
72487
|
+
lunr4.stopWordFilter,
|
|
72488
|
+
lunr4.stemmer
|
|
72489
72489
|
);
|
|
72490
72490
|
builder.searchPipeline.add(
|
|
72491
|
-
|
|
72491
|
+
lunr4.stemmer
|
|
72492
72492
|
);
|
|
72493
72493
|
config2.call(builder, builder);
|
|
72494
72494
|
return builder.build();
|
|
72495
72495
|
};
|
|
72496
|
-
|
|
72497
|
-
|
|
72498
|
-
|
|
72496
|
+
lunr4.version = "2.3.9";
|
|
72497
|
+
lunr4.utils = {};
|
|
72498
|
+
lunr4.utils.warn = /* @__PURE__ */ function(global2) {
|
|
72499
72499
|
return function(message) {
|
|
72500
|
-
if (
|
|
72500
|
+
if (window.console && console.warn) {
|
|
72501
72501
|
console.warn(message);
|
|
72502
72502
|
}
|
|
72503
72503
|
};
|
|
72504
72504
|
}(this);
|
|
72505
|
-
|
|
72505
|
+
lunr4.utils.asString = function(obj) {
|
|
72506
72506
|
if (obj === void 0 || obj === null) {
|
|
72507
72507
|
return "";
|
|
72508
72508
|
} else {
|
|
72509
72509
|
return obj.toString();
|
|
72510
72510
|
}
|
|
72511
72511
|
};
|
|
72512
|
-
|
|
72512
|
+
lunr4.utils.clone = function(obj) {
|
|
72513
72513
|
if (obj === null || obj === void 0) {
|
|
72514
72514
|
return obj;
|
|
72515
72515
|
}
|
|
@@ -72528,27 +72528,27 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72528
72528
|
}
|
|
72529
72529
|
return clone3;
|
|
72530
72530
|
};
|
|
72531
|
-
|
|
72531
|
+
lunr4.FieldRef = function(docRef, fieldName, stringValue) {
|
|
72532
72532
|
this.docRef = docRef;
|
|
72533
72533
|
this.fieldName = fieldName;
|
|
72534
72534
|
this._stringValue = stringValue;
|
|
72535
72535
|
};
|
|
72536
|
-
|
|
72537
|
-
|
|
72538
|
-
var n2 = s.indexOf(
|
|
72536
|
+
lunr4.FieldRef.joiner = "/";
|
|
72537
|
+
lunr4.FieldRef.fromString = function(s) {
|
|
72538
|
+
var n2 = s.indexOf(lunr4.FieldRef.joiner);
|
|
72539
72539
|
if (n2 === -1) {
|
|
72540
72540
|
throw "malformed field ref string";
|
|
72541
72541
|
}
|
|
72542
72542
|
var fieldRef = s.slice(0, n2), docRef = s.slice(n2 + 1);
|
|
72543
|
-
return new
|
|
72543
|
+
return new lunr4.FieldRef(docRef, fieldRef, s);
|
|
72544
72544
|
};
|
|
72545
|
-
|
|
72545
|
+
lunr4.FieldRef.prototype.toString = function() {
|
|
72546
72546
|
if (this._stringValue == void 0) {
|
|
72547
|
-
this._stringValue = this.fieldName +
|
|
72547
|
+
this._stringValue = this.fieldName + lunr4.FieldRef.joiner + this.docRef;
|
|
72548
72548
|
}
|
|
72549
72549
|
return this._stringValue;
|
|
72550
72550
|
};
|
|
72551
|
-
|
|
72551
|
+
lunr4.Set = function(elements) {
|
|
72552
72552
|
this.elements = /* @__PURE__ */ Object.create(null);
|
|
72553
72553
|
if (elements) {
|
|
72554
72554
|
this.length = elements.length;
|
|
@@ -72559,7 +72559,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72559
72559
|
this.length = 0;
|
|
72560
72560
|
}
|
|
72561
72561
|
};
|
|
72562
|
-
|
|
72562
|
+
lunr4.Set.complete = {
|
|
72563
72563
|
intersect: function(other) {
|
|
72564
72564
|
return other;
|
|
72565
72565
|
},
|
|
@@ -72570,7 +72570,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72570
72570
|
return true;
|
|
72571
72571
|
}
|
|
72572
72572
|
};
|
|
72573
|
-
|
|
72573
|
+
lunr4.Set.empty = {
|
|
72574
72574
|
intersect: function() {
|
|
72575
72575
|
return this;
|
|
72576
72576
|
},
|
|
@@ -72581,15 +72581,15 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72581
72581
|
return false;
|
|
72582
72582
|
}
|
|
72583
72583
|
};
|
|
72584
|
-
|
|
72584
|
+
lunr4.Set.prototype.contains = function(object2) {
|
|
72585
72585
|
return !!this.elements[object2];
|
|
72586
72586
|
};
|
|
72587
|
-
|
|
72587
|
+
lunr4.Set.prototype.intersect = function(other) {
|
|
72588
72588
|
var a2, b, elements, intersection4 = [];
|
|
72589
|
-
if (other ===
|
|
72589
|
+
if (other === lunr4.Set.complete) {
|
|
72590
72590
|
return this;
|
|
72591
72591
|
}
|
|
72592
|
-
if (other ===
|
|
72592
|
+
if (other === lunr4.Set.empty) {
|
|
72593
72593
|
return other;
|
|
72594
72594
|
}
|
|
72595
72595
|
if (this.length < other.length) {
|
|
@@ -72606,18 +72606,18 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72606
72606
|
intersection4.push(element3);
|
|
72607
72607
|
}
|
|
72608
72608
|
}
|
|
72609
|
-
return new
|
|
72609
|
+
return new lunr4.Set(intersection4);
|
|
72610
72610
|
};
|
|
72611
|
-
|
|
72612
|
-
if (other ===
|
|
72613
|
-
return
|
|
72611
|
+
lunr4.Set.prototype.union = function(other) {
|
|
72612
|
+
if (other === lunr4.Set.complete) {
|
|
72613
|
+
return lunr4.Set.complete;
|
|
72614
72614
|
}
|
|
72615
|
-
if (other ===
|
|
72615
|
+
if (other === lunr4.Set.empty) {
|
|
72616
72616
|
return this;
|
|
72617
72617
|
}
|
|
72618
|
-
return new
|
|
72618
|
+
return new lunr4.Set(Object.keys(this.elements).concat(Object.keys(other.elements)));
|
|
72619
72619
|
};
|
|
72620
|
-
|
|
72620
|
+
lunr4.idf = function(posting, documentCount) {
|
|
72621
72621
|
var documentsWithTerm = 0;
|
|
72622
72622
|
for (var fieldName in posting) {
|
|
72623
72623
|
if (fieldName == "_index") continue;
|
|
@@ -72626,45 +72626,45 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72626
72626
|
var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5);
|
|
72627
72627
|
return Math.log(1 + Math.abs(x));
|
|
72628
72628
|
};
|
|
72629
|
-
|
|
72629
|
+
lunr4.Token = function(str, metadata) {
|
|
72630
72630
|
this.str = str || "";
|
|
72631
72631
|
this.metadata = metadata || {};
|
|
72632
72632
|
};
|
|
72633
|
-
|
|
72633
|
+
lunr4.Token.prototype.toString = function() {
|
|
72634
72634
|
return this.str;
|
|
72635
72635
|
};
|
|
72636
|
-
|
|
72636
|
+
lunr4.Token.prototype.update = function(fn2) {
|
|
72637
72637
|
this.str = fn2(this.str, this.metadata);
|
|
72638
72638
|
return this;
|
|
72639
72639
|
};
|
|
72640
|
-
|
|
72640
|
+
lunr4.Token.prototype.clone = function(fn2) {
|
|
72641
72641
|
fn2 = fn2 || function(s) {
|
|
72642
72642
|
return s;
|
|
72643
72643
|
};
|
|
72644
|
-
return new
|
|
72644
|
+
return new lunr4.Token(fn2(this.str, this.metadata), this.metadata);
|
|
72645
72645
|
};
|
|
72646
|
-
|
|
72646
|
+
lunr4.tokenizer = function(obj, metadata) {
|
|
72647
72647
|
if (obj == null || obj == void 0) {
|
|
72648
72648
|
return [];
|
|
72649
72649
|
}
|
|
72650
72650
|
if (Array.isArray(obj)) {
|
|
72651
72651
|
return obj.map(function(t2) {
|
|
72652
|
-
return new
|
|
72653
|
-
|
|
72654
|
-
|
|
72652
|
+
return new lunr4.Token(
|
|
72653
|
+
lunr4.utils.asString(t2).toLowerCase(),
|
|
72654
|
+
lunr4.utils.clone(metadata)
|
|
72655
72655
|
);
|
|
72656
72656
|
});
|
|
72657
72657
|
}
|
|
72658
72658
|
var str = obj.toString().toLowerCase(), len = str.length, tokens = [];
|
|
72659
72659
|
for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {
|
|
72660
72660
|
var char2 = str.charAt(sliceEnd), sliceLength = sliceEnd - sliceStart;
|
|
72661
|
-
if (char2.match(
|
|
72661
|
+
if (char2.match(lunr4.tokenizer.separator) || sliceEnd == len) {
|
|
72662
72662
|
if (sliceLength > 0) {
|
|
72663
|
-
var tokenMetadata =
|
|
72663
|
+
var tokenMetadata = lunr4.utils.clone(metadata) || {};
|
|
72664
72664
|
tokenMetadata["position"] = [sliceStart, sliceLength];
|
|
72665
72665
|
tokenMetadata["index"] = tokens.length;
|
|
72666
72666
|
tokens.push(
|
|
72667
|
-
new
|
|
72667
|
+
new lunr4.Token(
|
|
72668
72668
|
str.slice(sliceStart, sliceEnd),
|
|
72669
72669
|
tokenMetadata
|
|
72670
72670
|
)
|
|
@@ -72675,28 +72675,28 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72675
72675
|
}
|
|
72676
72676
|
return tokens;
|
|
72677
72677
|
};
|
|
72678
|
-
|
|
72679
|
-
|
|
72678
|
+
lunr4.tokenizer.separator = /[\s\-]+/;
|
|
72679
|
+
lunr4.Pipeline = function() {
|
|
72680
72680
|
this._stack = [];
|
|
72681
72681
|
};
|
|
72682
|
-
|
|
72683
|
-
|
|
72682
|
+
lunr4.Pipeline.registeredFunctions = /* @__PURE__ */ Object.create(null);
|
|
72683
|
+
lunr4.Pipeline.registerFunction = function(fn2, label) {
|
|
72684
72684
|
if (label in this.registeredFunctions) {
|
|
72685
|
-
|
|
72685
|
+
lunr4.utils.warn("Overwriting existing registered function: " + label);
|
|
72686
72686
|
}
|
|
72687
72687
|
fn2.label = label;
|
|
72688
|
-
|
|
72688
|
+
lunr4.Pipeline.registeredFunctions[fn2.label] = fn2;
|
|
72689
72689
|
};
|
|
72690
|
-
|
|
72690
|
+
lunr4.Pipeline.warnIfFunctionNotRegistered = function(fn2) {
|
|
72691
72691
|
var isRegistered = fn2.label && fn2.label in this.registeredFunctions;
|
|
72692
72692
|
if (!isRegistered) {
|
|
72693
|
-
|
|
72693
|
+
lunr4.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n", fn2);
|
|
72694
72694
|
}
|
|
72695
72695
|
};
|
|
72696
|
-
|
|
72697
|
-
var pipeline = new
|
|
72696
|
+
lunr4.Pipeline.load = function(serialised) {
|
|
72697
|
+
var pipeline = new lunr4.Pipeline();
|
|
72698
72698
|
serialised.forEach(function(fnName) {
|
|
72699
|
-
var fn2 =
|
|
72699
|
+
var fn2 = lunr4.Pipeline.registeredFunctions[fnName];
|
|
72700
72700
|
if (fn2) {
|
|
72701
72701
|
pipeline.add(fn2);
|
|
72702
72702
|
} else {
|
|
@@ -72705,15 +72705,15 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72705
72705
|
});
|
|
72706
72706
|
return pipeline;
|
|
72707
72707
|
};
|
|
72708
|
-
|
|
72708
|
+
lunr4.Pipeline.prototype.add = function() {
|
|
72709
72709
|
var fns = Array.prototype.slice.call(arguments);
|
|
72710
72710
|
fns.forEach(function(fn2) {
|
|
72711
|
-
|
|
72711
|
+
lunr4.Pipeline.warnIfFunctionNotRegistered(fn2);
|
|
72712
72712
|
this._stack.push(fn2);
|
|
72713
72713
|
}, this);
|
|
72714
72714
|
};
|
|
72715
|
-
|
|
72716
|
-
|
|
72715
|
+
lunr4.Pipeline.prototype.after = function(existingFn, newFn) {
|
|
72716
|
+
lunr4.Pipeline.warnIfFunctionNotRegistered(newFn);
|
|
72717
72717
|
var pos = this._stack.indexOf(existingFn);
|
|
72718
72718
|
if (pos == -1) {
|
|
72719
72719
|
throw new Error("Cannot find existingFn");
|
|
@@ -72721,22 +72721,22 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72721
72721
|
pos = pos + 1;
|
|
72722
72722
|
this._stack.splice(pos, 0, newFn);
|
|
72723
72723
|
};
|
|
72724
|
-
|
|
72725
|
-
|
|
72724
|
+
lunr4.Pipeline.prototype.before = function(existingFn, newFn) {
|
|
72725
|
+
lunr4.Pipeline.warnIfFunctionNotRegistered(newFn);
|
|
72726
72726
|
var pos = this._stack.indexOf(existingFn);
|
|
72727
72727
|
if (pos == -1) {
|
|
72728
72728
|
throw new Error("Cannot find existingFn");
|
|
72729
72729
|
}
|
|
72730
72730
|
this._stack.splice(pos, 0, newFn);
|
|
72731
72731
|
};
|
|
72732
|
-
|
|
72732
|
+
lunr4.Pipeline.prototype.remove = function(fn2) {
|
|
72733
72733
|
var pos = this._stack.indexOf(fn2);
|
|
72734
72734
|
if (pos == -1) {
|
|
72735
72735
|
return;
|
|
72736
72736
|
}
|
|
72737
72737
|
this._stack.splice(pos, 1);
|
|
72738
72738
|
};
|
|
72739
|
-
|
|
72739
|
+
lunr4.Pipeline.prototype.run = function(tokens) {
|
|
72740
72740
|
var stackLength = this._stack.length;
|
|
72741
72741
|
for (var i2 = 0; i2 < stackLength; i2++) {
|
|
72742
72742
|
var fn2 = this._stack[i2];
|
|
@@ -72756,26 +72756,26 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72756
72756
|
}
|
|
72757
72757
|
return tokens;
|
|
72758
72758
|
};
|
|
72759
|
-
|
|
72760
|
-
var token = new
|
|
72759
|
+
lunr4.Pipeline.prototype.runString = function(str, metadata) {
|
|
72760
|
+
var token = new lunr4.Token(str, metadata);
|
|
72761
72761
|
return this.run([token]).map(function(t2) {
|
|
72762
72762
|
return t2.toString();
|
|
72763
72763
|
});
|
|
72764
72764
|
};
|
|
72765
|
-
|
|
72765
|
+
lunr4.Pipeline.prototype.reset = function() {
|
|
72766
72766
|
this._stack = [];
|
|
72767
72767
|
};
|
|
72768
|
-
|
|
72768
|
+
lunr4.Pipeline.prototype.toJSON = function() {
|
|
72769
72769
|
return this._stack.map(function(fn2) {
|
|
72770
|
-
|
|
72770
|
+
lunr4.Pipeline.warnIfFunctionNotRegistered(fn2);
|
|
72771
72771
|
return fn2.label;
|
|
72772
72772
|
});
|
|
72773
72773
|
};
|
|
72774
|
-
|
|
72774
|
+
lunr4.Vector = function(elements) {
|
|
72775
72775
|
this._magnitude = 0;
|
|
72776
72776
|
this.elements = elements || [];
|
|
72777
72777
|
};
|
|
72778
|
-
|
|
72778
|
+
lunr4.Vector.prototype.positionForIndex = function(index) {
|
|
72779
72779
|
if (this.elements.length == 0) {
|
|
72780
72780
|
return 0;
|
|
72781
72781
|
}
|
|
@@ -72804,12 +72804,12 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72804
72804
|
return (pivotPoint + 1) * 2;
|
|
72805
72805
|
}
|
|
72806
72806
|
};
|
|
72807
|
-
|
|
72807
|
+
lunr4.Vector.prototype.insert = function(insertIdx, val) {
|
|
72808
72808
|
this.upsert(insertIdx, val, function() {
|
|
72809
72809
|
throw "duplicate index";
|
|
72810
72810
|
});
|
|
72811
72811
|
};
|
|
72812
|
-
|
|
72812
|
+
lunr4.Vector.prototype.upsert = function(insertIdx, val, fn2) {
|
|
72813
72813
|
this._magnitude = 0;
|
|
72814
72814
|
var position = this.positionForIndex(insertIdx);
|
|
72815
72815
|
if (this.elements[position] == insertIdx) {
|
|
@@ -72818,7 +72818,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72818
72818
|
this.elements.splice(position, 0, insertIdx, val);
|
|
72819
72819
|
}
|
|
72820
72820
|
};
|
|
72821
|
-
|
|
72821
|
+
lunr4.Vector.prototype.magnitude = function() {
|
|
72822
72822
|
if (this._magnitude) return this._magnitude;
|
|
72823
72823
|
var sumOfSquares = 0, elementsLength = this.elements.length;
|
|
72824
72824
|
for (var i2 = 1; i2 < elementsLength; i2 += 2) {
|
|
@@ -72827,7 +72827,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72827
72827
|
}
|
|
72828
72828
|
return this._magnitude = Math.sqrt(sumOfSquares);
|
|
72829
72829
|
};
|
|
72830
|
-
|
|
72830
|
+
lunr4.Vector.prototype.dot = function(otherVector) {
|
|
72831
72831
|
var dotProduct = 0, a2 = this.elements, b = otherVector.elements, aLen = a2.length, bLen = b.length, aVal = 0, bVal = 0, i2 = 0, j = 0;
|
|
72832
72832
|
while (i2 < aLen && j < bLen) {
|
|
72833
72833
|
aVal = a2[i2], bVal = b[j];
|
|
@@ -72843,20 +72843,20 @@ schema (${ast._tag}): ${ast}`;
|
|
|
72843
72843
|
}
|
|
72844
72844
|
return dotProduct;
|
|
72845
72845
|
};
|
|
72846
|
-
|
|
72846
|
+
lunr4.Vector.prototype.similarity = function(otherVector) {
|
|
72847
72847
|
return this.dot(otherVector) / this.magnitude() || 0;
|
|
72848
72848
|
};
|
|
72849
|
-
|
|
72849
|
+
lunr4.Vector.prototype.toArray = function() {
|
|
72850
72850
|
var output = new Array(this.elements.length / 2);
|
|
72851
72851
|
for (var i2 = 1, j = 0; i2 < this.elements.length; i2 += 2, j++) {
|
|
72852
72852
|
output[j] = this.elements[i2];
|
|
72853
72853
|
}
|
|
72854
72854
|
return output;
|
|
72855
72855
|
};
|
|
72856
|
-
|
|
72856
|
+
lunr4.Vector.prototype.toJSON = function() {
|
|
72857
72857
|
return this.elements;
|
|
72858
72858
|
};
|
|
72859
|
-
|
|
72859
|
+
lunr4.stemmer = function() {
|
|
72860
72860
|
var step2list = {
|
|
72861
72861
|
"ational": "ate",
|
|
72862
72862
|
"tional": "tion",
|
|
@@ -73021,8 +73021,8 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73021
73021
|
return token.update(porterStemmer);
|
|
73022
73022
|
};
|
|
73023
73023
|
}();
|
|
73024
|
-
|
|
73025
|
-
|
|
73024
|
+
lunr4.Pipeline.registerFunction(lunr4.stemmer, "stemmer");
|
|
73025
|
+
lunr4.generateStopWordFilter = function(stopWords) {
|
|
73026
73026
|
var words = stopWords.reduce(function(memo3, stopWord) {
|
|
73027
73027
|
memo3[stopWord] = stopWord;
|
|
73028
73028
|
return memo3;
|
|
@@ -73031,7 +73031,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73031
73031
|
if (token && words[token.toString()] !== token.toString()) return token;
|
|
73032
73032
|
};
|
|
73033
73033
|
};
|
|
73034
|
-
|
|
73034
|
+
lunr4.stopWordFilter = lunr4.generateStopWordFilter([
|
|
73035
73035
|
"a",
|
|
73036
73036
|
"able",
|
|
73037
73037
|
"about",
|
|
@@ -73152,37 +73152,37 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73152
73152
|
"you",
|
|
73153
73153
|
"your"
|
|
73154
73154
|
]);
|
|
73155
|
-
|
|
73156
|
-
|
|
73155
|
+
lunr4.Pipeline.registerFunction(lunr4.stopWordFilter, "stopWordFilter");
|
|
73156
|
+
lunr4.trimmer = function(token) {
|
|
73157
73157
|
return token.update(function(s) {
|
|
73158
73158
|
return s.replace(/^\W+/, "").replace(/\W+$/, "");
|
|
73159
73159
|
});
|
|
73160
73160
|
};
|
|
73161
|
-
|
|
73162
|
-
|
|
73161
|
+
lunr4.Pipeline.registerFunction(lunr4.trimmer, "trimmer");
|
|
73162
|
+
lunr4.TokenSet = function() {
|
|
73163
73163
|
this.final = false;
|
|
73164
73164
|
this.edges = {};
|
|
73165
|
-
this.id =
|
|
73166
|
-
|
|
73165
|
+
this.id = lunr4.TokenSet._nextId;
|
|
73166
|
+
lunr4.TokenSet._nextId += 1;
|
|
73167
73167
|
};
|
|
73168
|
-
|
|
73169
|
-
|
|
73170
|
-
var builder = new
|
|
73168
|
+
lunr4.TokenSet._nextId = 1;
|
|
73169
|
+
lunr4.TokenSet.fromArray = function(arr) {
|
|
73170
|
+
var builder = new lunr4.TokenSet.Builder();
|
|
73171
73171
|
for (var i2 = 0, len = arr.length; i2 < len; i2++) {
|
|
73172
73172
|
builder.insert(arr[i2]);
|
|
73173
73173
|
}
|
|
73174
73174
|
builder.finish();
|
|
73175
73175
|
return builder.root;
|
|
73176
73176
|
};
|
|
73177
|
-
|
|
73177
|
+
lunr4.TokenSet.fromClause = function(clause) {
|
|
73178
73178
|
if ("editDistance" in clause) {
|
|
73179
|
-
return
|
|
73179
|
+
return lunr4.TokenSet.fromFuzzyString(clause.term, clause.editDistance);
|
|
73180
73180
|
} else {
|
|
73181
|
-
return
|
|
73181
|
+
return lunr4.TokenSet.fromString(clause.term);
|
|
73182
73182
|
}
|
|
73183
73183
|
};
|
|
73184
|
-
|
|
73185
|
-
var root = new
|
|
73184
|
+
lunr4.TokenSet.fromFuzzyString = function(str, editDistance) {
|
|
73185
|
+
var root = new lunr4.TokenSet();
|
|
73186
73186
|
var stack = [{
|
|
73187
73187
|
node: root,
|
|
73188
73188
|
editsRemaining: editDistance,
|
|
@@ -73195,7 +73195,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73195
73195
|
if (char2 in frame2.node.edges) {
|
|
73196
73196
|
noEditNode = frame2.node.edges[char2];
|
|
73197
73197
|
} else {
|
|
73198
|
-
noEditNode = new
|
|
73198
|
+
noEditNode = new lunr4.TokenSet();
|
|
73199
73199
|
frame2.node.edges[char2] = noEditNode;
|
|
73200
73200
|
}
|
|
73201
73201
|
if (frame2.str.length == 1) {
|
|
@@ -73213,7 +73213,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73213
73213
|
if ("*" in frame2.node.edges) {
|
|
73214
73214
|
var insertionNode = frame2.node.edges["*"];
|
|
73215
73215
|
} else {
|
|
73216
|
-
var insertionNode = new
|
|
73216
|
+
var insertionNode = new lunr4.TokenSet();
|
|
73217
73217
|
frame2.node.edges["*"] = insertionNode;
|
|
73218
73218
|
}
|
|
73219
73219
|
if (frame2.str.length == 0) {
|
|
@@ -73238,7 +73238,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73238
73238
|
if ("*" in frame2.node.edges) {
|
|
73239
73239
|
var substitutionNode = frame2.node.edges["*"];
|
|
73240
73240
|
} else {
|
|
73241
|
-
var substitutionNode = new
|
|
73241
|
+
var substitutionNode = new lunr4.TokenSet();
|
|
73242
73242
|
frame2.node.edges["*"] = substitutionNode;
|
|
73243
73243
|
}
|
|
73244
73244
|
if (frame2.str.length == 1) {
|
|
@@ -73255,7 +73255,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73255
73255
|
if (charB in frame2.node.edges) {
|
|
73256
73256
|
transposeNode = frame2.node.edges[charB];
|
|
73257
73257
|
} else {
|
|
73258
|
-
transposeNode = new
|
|
73258
|
+
transposeNode = new lunr4.TokenSet();
|
|
73259
73259
|
frame2.node.edges[charB] = transposeNode;
|
|
73260
73260
|
}
|
|
73261
73261
|
if (frame2.str.length == 1) {
|
|
@@ -73270,15 +73270,15 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73270
73270
|
}
|
|
73271
73271
|
return root;
|
|
73272
73272
|
};
|
|
73273
|
-
|
|
73274
|
-
var node = new
|
|
73273
|
+
lunr4.TokenSet.fromString = function(str) {
|
|
73274
|
+
var node = new lunr4.TokenSet(), root = node;
|
|
73275
73275
|
for (var i2 = 0, len = str.length; i2 < len; i2++) {
|
|
73276
73276
|
var char2 = str[i2], final = i2 == len - 1;
|
|
73277
73277
|
if (char2 == "*") {
|
|
73278
73278
|
node.edges[char2] = node;
|
|
73279
73279
|
node.final = final;
|
|
73280
73280
|
} else {
|
|
73281
|
-
var next = new
|
|
73281
|
+
var next = new lunr4.TokenSet();
|
|
73282
73282
|
next.final = final;
|
|
73283
73283
|
node.edges[char2] = next;
|
|
73284
73284
|
node = next;
|
|
@@ -73286,7 +73286,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73286
73286
|
}
|
|
73287
73287
|
return root;
|
|
73288
73288
|
};
|
|
73289
|
-
|
|
73289
|
+
lunr4.TokenSet.prototype.toArray = function() {
|
|
73290
73290
|
var words = [];
|
|
73291
73291
|
var stack = [{
|
|
73292
73292
|
prefix: "",
|
|
@@ -73308,7 +73308,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73308
73308
|
}
|
|
73309
73309
|
return words;
|
|
73310
73310
|
};
|
|
73311
|
-
|
|
73311
|
+
lunr4.TokenSet.prototype.toString = function() {
|
|
73312
73312
|
if (this._str) {
|
|
73313
73313
|
return this._str;
|
|
73314
73314
|
}
|
|
@@ -73319,8 +73319,8 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73319
73319
|
}
|
|
73320
73320
|
return str;
|
|
73321
73321
|
};
|
|
73322
|
-
|
|
73323
|
-
var output = new
|
|
73322
|
+
lunr4.TokenSet.prototype.intersect = function(b) {
|
|
73323
|
+
var output = new lunr4.TokenSet(), frame2 = void 0;
|
|
73324
73324
|
var stack = [{
|
|
73325
73325
|
qNode: b,
|
|
73326
73326
|
output,
|
|
@@ -73339,7 +73339,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73339
73339
|
next = frame2.output.edges[nEdge];
|
|
73340
73340
|
next.final = next.final || final;
|
|
73341
73341
|
} else {
|
|
73342
|
-
next = new
|
|
73342
|
+
next = new lunr4.TokenSet();
|
|
73343
73343
|
next.final = final;
|
|
73344
73344
|
frame2.output.edges[nEdge] = next;
|
|
73345
73345
|
}
|
|
@@ -73354,13 +73354,13 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73354
73354
|
}
|
|
73355
73355
|
return output;
|
|
73356
73356
|
};
|
|
73357
|
-
|
|
73357
|
+
lunr4.TokenSet.Builder = function() {
|
|
73358
73358
|
this.previousWord = "";
|
|
73359
|
-
this.root = new
|
|
73359
|
+
this.root = new lunr4.TokenSet();
|
|
73360
73360
|
this.uncheckedNodes = [];
|
|
73361
73361
|
this.minimizedNodes = {};
|
|
73362
73362
|
};
|
|
73363
|
-
|
|
73363
|
+
lunr4.TokenSet.Builder.prototype.insert = function(word) {
|
|
73364
73364
|
var node, commonPrefix = 0;
|
|
73365
73365
|
if (word < this.previousWord) {
|
|
73366
73366
|
throw new Error("Out of order word insertion");
|
|
@@ -73376,7 +73376,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73376
73376
|
node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child;
|
|
73377
73377
|
}
|
|
73378
73378
|
for (var i2 = commonPrefix; i2 < word.length; i2++) {
|
|
73379
|
-
var nextNode = new
|
|
73379
|
+
var nextNode = new lunr4.TokenSet(), char2 = word[i2];
|
|
73380
73380
|
node.edges[char2] = nextNode;
|
|
73381
73381
|
this.uncheckedNodes.push({
|
|
73382
73382
|
parent: node,
|
|
@@ -73388,10 +73388,10 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73388
73388
|
node.final = true;
|
|
73389
73389
|
this.previousWord = word;
|
|
73390
73390
|
};
|
|
73391
|
-
|
|
73391
|
+
lunr4.TokenSet.Builder.prototype.finish = function() {
|
|
73392
73392
|
this.minimize(0);
|
|
73393
73393
|
};
|
|
73394
|
-
|
|
73394
|
+
lunr4.TokenSet.Builder.prototype.minimize = function(downTo) {
|
|
73395
73395
|
for (var i2 = this.uncheckedNodes.length - 1; i2 >= downTo; i2--) {
|
|
73396
73396
|
var node = this.uncheckedNodes[i2], childKey = node.child.toString();
|
|
73397
73397
|
if (childKey in this.minimizedNodes) {
|
|
@@ -73403,27 +73403,27 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73403
73403
|
this.uncheckedNodes.pop();
|
|
73404
73404
|
}
|
|
73405
73405
|
};
|
|
73406
|
-
|
|
73406
|
+
lunr4.Index = function(attrs) {
|
|
73407
73407
|
this.invertedIndex = attrs.invertedIndex;
|
|
73408
73408
|
this.fieldVectors = attrs.fieldVectors;
|
|
73409
73409
|
this.tokenSet = attrs.tokenSet;
|
|
73410
73410
|
this.fields = attrs.fields;
|
|
73411
73411
|
this.pipeline = attrs.pipeline;
|
|
73412
73412
|
};
|
|
73413
|
-
|
|
73413
|
+
lunr4.Index.prototype.search = function(queryString) {
|
|
73414
73414
|
return this.query(function(query) {
|
|
73415
|
-
var parser = new
|
|
73415
|
+
var parser = new lunr4.QueryParser(queryString, query);
|
|
73416
73416
|
parser.parse();
|
|
73417
73417
|
});
|
|
73418
73418
|
};
|
|
73419
|
-
|
|
73420
|
-
var query = new
|
|
73419
|
+
lunr4.Index.prototype.query = function(fn2) {
|
|
73420
|
+
var query = new lunr4.Query(this.fields), matchingFields = /* @__PURE__ */ Object.create(null), queryVectors = /* @__PURE__ */ Object.create(null), termFieldCache = /* @__PURE__ */ Object.create(null), requiredMatches = /* @__PURE__ */ Object.create(null), prohibitedMatches = /* @__PURE__ */ Object.create(null);
|
|
73421
73421
|
for (var i2 = 0; i2 < this.fields.length; i2++) {
|
|
73422
|
-
queryVectors[this.fields[i2]] = new
|
|
73422
|
+
queryVectors[this.fields[i2]] = new lunr4.Vector();
|
|
73423
73423
|
}
|
|
73424
73424
|
fn2.call(query, query);
|
|
73425
73425
|
for (var i2 = 0; i2 < query.clauses.length; i2++) {
|
|
73426
|
-
var clause = query.clauses[i2], terms = null, clauseMatches =
|
|
73426
|
+
var clause = query.clauses[i2], terms = null, clauseMatches = lunr4.Set.empty;
|
|
73427
73427
|
if (clause.usePipeline) {
|
|
73428
73428
|
terms = this.pipeline.runString(clause.term, {
|
|
73429
73429
|
fields: clause.fields
|
|
@@ -73434,27 +73434,27 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73434
73434
|
for (var m = 0; m < terms.length; m++) {
|
|
73435
73435
|
var term = terms[m];
|
|
73436
73436
|
clause.term = term;
|
|
73437
|
-
var termTokenSet =
|
|
73438
|
-
if (expandedTerms.length === 0 && clause.presence ===
|
|
73437
|
+
var termTokenSet = lunr4.TokenSet.fromClause(clause), expandedTerms = this.tokenSet.intersect(termTokenSet).toArray();
|
|
73438
|
+
if (expandedTerms.length === 0 && clause.presence === lunr4.Query.presence.REQUIRED) {
|
|
73439
73439
|
for (var k = 0; k < clause.fields.length; k++) {
|
|
73440
73440
|
var field = clause.fields[k];
|
|
73441
|
-
requiredMatches[field] =
|
|
73441
|
+
requiredMatches[field] = lunr4.Set.empty;
|
|
73442
73442
|
}
|
|
73443
73443
|
break;
|
|
73444
73444
|
}
|
|
73445
73445
|
for (var j = 0; j < expandedTerms.length; j++) {
|
|
73446
73446
|
var expandedTerm = expandedTerms[j], posting = this.invertedIndex[expandedTerm], termIndex = posting._index;
|
|
73447
73447
|
for (var k = 0; k < clause.fields.length; k++) {
|
|
73448
|
-
var field = clause.fields[k], fieldPosting = posting[field], matchingDocumentRefs = Object.keys(fieldPosting), termField = expandedTerm + "/" + field, matchingDocumentsSet = new
|
|
73449
|
-
if (clause.presence ==
|
|
73448
|
+
var field = clause.fields[k], fieldPosting = posting[field], matchingDocumentRefs = Object.keys(fieldPosting), termField = expandedTerm + "/" + field, matchingDocumentsSet = new lunr4.Set(matchingDocumentRefs);
|
|
73449
|
+
if (clause.presence == lunr4.Query.presence.REQUIRED) {
|
|
73450
73450
|
clauseMatches = clauseMatches.union(matchingDocumentsSet);
|
|
73451
73451
|
if (requiredMatches[field] === void 0) {
|
|
73452
|
-
requiredMatches[field] =
|
|
73452
|
+
requiredMatches[field] = lunr4.Set.complete;
|
|
73453
73453
|
}
|
|
73454
73454
|
}
|
|
73455
|
-
if (clause.presence ==
|
|
73455
|
+
if (clause.presence == lunr4.Query.presence.PROHIBITED) {
|
|
73456
73456
|
if (prohibitedMatches[field] === void 0) {
|
|
73457
|
-
prohibitedMatches[field] =
|
|
73457
|
+
prohibitedMatches[field] = lunr4.Set.empty;
|
|
73458
73458
|
}
|
|
73459
73459
|
prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet);
|
|
73460
73460
|
continue;
|
|
@@ -73466,9 +73466,9 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73466
73466
|
continue;
|
|
73467
73467
|
}
|
|
73468
73468
|
for (var l = 0; l < matchingDocumentRefs.length; l++) {
|
|
73469
|
-
var matchingDocumentRef = matchingDocumentRefs[l], matchingFieldRef = new
|
|
73469
|
+
var matchingDocumentRef = matchingDocumentRefs[l], matchingFieldRef = new lunr4.FieldRef(matchingDocumentRef, field), metadata = fieldPosting[matchingDocumentRef], fieldMatch;
|
|
73470
73470
|
if ((fieldMatch = matchingFields[matchingFieldRef]) === void 0) {
|
|
73471
|
-
matchingFields[matchingFieldRef] = new
|
|
73471
|
+
matchingFields[matchingFieldRef] = new lunr4.MatchData(expandedTerm, field, metadata);
|
|
73472
73472
|
} else {
|
|
73473
73473
|
fieldMatch.add(expandedTerm, field, metadata);
|
|
73474
73474
|
}
|
|
@@ -73477,14 +73477,14 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73477
73477
|
}
|
|
73478
73478
|
}
|
|
73479
73479
|
}
|
|
73480
|
-
if (clause.presence ===
|
|
73480
|
+
if (clause.presence === lunr4.Query.presence.REQUIRED) {
|
|
73481
73481
|
for (var k = 0; k < clause.fields.length; k++) {
|
|
73482
73482
|
var field = clause.fields[k];
|
|
73483
73483
|
requiredMatches[field] = requiredMatches[field].intersect(clauseMatches);
|
|
73484
73484
|
}
|
|
73485
73485
|
}
|
|
73486
73486
|
}
|
|
73487
|
-
var allRequiredMatches =
|
|
73487
|
+
var allRequiredMatches = lunr4.Set.complete, allProhibitedMatches = lunr4.Set.empty;
|
|
73488
73488
|
for (var i2 = 0; i2 < this.fields.length; i2++) {
|
|
73489
73489
|
var field = this.fields[i2];
|
|
73490
73490
|
if (requiredMatches[field]) {
|
|
@@ -73499,12 +73499,12 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73499
73499
|
matchingFieldRefs = Object.keys(this.fieldVectors);
|
|
73500
73500
|
for (var i2 = 0; i2 < matchingFieldRefs.length; i2++) {
|
|
73501
73501
|
var matchingFieldRef = matchingFieldRefs[i2];
|
|
73502
|
-
var fieldRef =
|
|
73503
|
-
matchingFields[matchingFieldRef] = new
|
|
73502
|
+
var fieldRef = lunr4.FieldRef.fromString(matchingFieldRef);
|
|
73503
|
+
matchingFields[matchingFieldRef] = new lunr4.MatchData();
|
|
73504
73504
|
}
|
|
73505
73505
|
}
|
|
73506
73506
|
for (var i2 = 0; i2 < matchingFieldRefs.length; i2++) {
|
|
73507
|
-
var fieldRef =
|
|
73507
|
+
var fieldRef = lunr4.FieldRef.fromString(matchingFieldRefs[i2]), docRef = fieldRef.docRef;
|
|
73508
73508
|
if (!allRequiredMatches.contains(docRef)) {
|
|
73509
73509
|
continue;
|
|
73510
73510
|
}
|
|
@@ -73529,7 +73529,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73529
73529
|
return b.score - a2.score;
|
|
73530
73530
|
});
|
|
73531
73531
|
};
|
|
73532
|
-
|
|
73532
|
+
lunr4.Index.prototype.toJSON = function() {
|
|
73533
73533
|
var invertedIndex = Object.keys(this.invertedIndex).sort().map(function(term) {
|
|
73534
73534
|
return [term, this.invertedIndex[term]];
|
|
73535
73535
|
}, this);
|
|
@@ -73537,21 +73537,21 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73537
73537
|
return [ref, this.fieldVectors[ref].toJSON()];
|
|
73538
73538
|
}, this);
|
|
73539
73539
|
return {
|
|
73540
|
-
version:
|
|
73540
|
+
version: lunr4.version,
|
|
73541
73541
|
fields: this.fields,
|
|
73542
73542
|
fieldVectors,
|
|
73543
73543
|
invertedIndex,
|
|
73544
73544
|
pipeline: this.pipeline.toJSON()
|
|
73545
73545
|
};
|
|
73546
73546
|
};
|
|
73547
|
-
|
|
73548
|
-
var attrs = {}, fieldVectors = {}, serializedVectors = serializedIndex.fieldVectors, invertedIndex = /* @__PURE__ */ Object.create(null), serializedInvertedIndex = serializedIndex.invertedIndex, tokenSetBuilder = new
|
|
73549
|
-
if (serializedIndex.version !=
|
|
73550
|
-
|
|
73547
|
+
lunr4.Index.load = function(serializedIndex) {
|
|
73548
|
+
var attrs = {}, fieldVectors = {}, serializedVectors = serializedIndex.fieldVectors, invertedIndex = /* @__PURE__ */ Object.create(null), serializedInvertedIndex = serializedIndex.invertedIndex, tokenSetBuilder = new lunr4.TokenSet.Builder(), pipeline = lunr4.Pipeline.load(serializedIndex.pipeline);
|
|
73549
|
+
if (serializedIndex.version != lunr4.version) {
|
|
73550
|
+
lunr4.utils.warn("Version mismatch when loading serialised index. Current version of lunr '" + lunr4.version + "' does not match serialized index '" + serializedIndex.version + "'");
|
|
73551
73551
|
}
|
|
73552
73552
|
for (var i2 = 0; i2 < serializedVectors.length; i2++) {
|
|
73553
73553
|
var tuple2 = serializedVectors[i2], ref = tuple2[0], elements = tuple2[1];
|
|
73554
|
-
fieldVectors[ref] = new
|
|
73554
|
+
fieldVectors[ref] = new lunr4.Vector(elements);
|
|
73555
73555
|
}
|
|
73556
73556
|
for (var i2 = 0; i2 < serializedInvertedIndex.length; i2++) {
|
|
73557
73557
|
var tuple2 = serializedInvertedIndex[i2], term = tuple2[0], posting = tuple2[1];
|
|
@@ -73564,34 +73564,34 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73564
73564
|
attrs.invertedIndex = invertedIndex;
|
|
73565
73565
|
attrs.tokenSet = tokenSetBuilder.root;
|
|
73566
73566
|
attrs.pipeline = pipeline;
|
|
73567
|
-
return new
|
|
73567
|
+
return new lunr4.Index(attrs);
|
|
73568
73568
|
};
|
|
73569
|
-
|
|
73569
|
+
lunr4.Builder = function() {
|
|
73570
73570
|
this._ref = "id";
|
|
73571
73571
|
this._fields = /* @__PURE__ */ Object.create(null);
|
|
73572
73572
|
this._documents = /* @__PURE__ */ Object.create(null);
|
|
73573
73573
|
this.invertedIndex = /* @__PURE__ */ Object.create(null);
|
|
73574
73574
|
this.fieldTermFrequencies = {};
|
|
73575
73575
|
this.fieldLengths = {};
|
|
73576
|
-
this.tokenizer =
|
|
73577
|
-
this.pipeline = new
|
|
73578
|
-
this.searchPipeline = new
|
|
73576
|
+
this.tokenizer = lunr4.tokenizer;
|
|
73577
|
+
this.pipeline = new lunr4.Pipeline();
|
|
73578
|
+
this.searchPipeline = new lunr4.Pipeline();
|
|
73579
73579
|
this.documentCount = 0;
|
|
73580
73580
|
this._b = 0.75;
|
|
73581
73581
|
this._k1 = 1.2;
|
|
73582
73582
|
this.termIndex = 0;
|
|
73583
73583
|
this.metadataWhitelist = [];
|
|
73584
73584
|
};
|
|
73585
|
-
|
|
73585
|
+
lunr4.Builder.prototype.ref = function(ref) {
|
|
73586
73586
|
this._ref = ref;
|
|
73587
73587
|
};
|
|
73588
|
-
|
|
73588
|
+
lunr4.Builder.prototype.field = function(fieldName, attributes) {
|
|
73589
73589
|
if (/\//.test(fieldName)) {
|
|
73590
73590
|
throw new RangeError("Field '" + fieldName + "' contains illegal character '/'");
|
|
73591
73591
|
}
|
|
73592
73592
|
this._fields[fieldName] = attributes || {};
|
|
73593
73593
|
};
|
|
73594
|
-
|
|
73594
|
+
lunr4.Builder.prototype.b = function(number6) {
|
|
73595
73595
|
if (number6 < 0) {
|
|
73596
73596
|
this._b = 0;
|
|
73597
73597
|
} else if (number6 > 1) {
|
|
@@ -73600,17 +73600,17 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73600
73600
|
this._b = number6;
|
|
73601
73601
|
}
|
|
73602
73602
|
};
|
|
73603
|
-
|
|
73603
|
+
lunr4.Builder.prototype.k1 = function(number6) {
|
|
73604
73604
|
this._k1 = number6;
|
|
73605
73605
|
};
|
|
73606
|
-
|
|
73606
|
+
lunr4.Builder.prototype.add = function(doc4, attributes) {
|
|
73607
73607
|
var docRef = doc4[this._ref], fields = Object.keys(this._fields);
|
|
73608
73608
|
this._documents[docRef] = attributes || {};
|
|
73609
73609
|
this.documentCount += 1;
|
|
73610
73610
|
for (var i2 = 0; i2 < fields.length; i2++) {
|
|
73611
73611
|
var fieldName = fields[i2], extractor = this._fields[fieldName].extractor, field = extractor ? extractor(doc4) : doc4[fieldName], tokens = this.tokenizer(field, {
|
|
73612
73612
|
fields: [fieldName]
|
|
73613
|
-
}), terms = this.pipeline.run(tokens), fieldRef = new
|
|
73613
|
+
}), terms = this.pipeline.run(tokens), fieldRef = new lunr4.FieldRef(docRef, fieldName), fieldTerms = /* @__PURE__ */ Object.create(null);
|
|
73614
73614
|
this.fieldTermFrequencies[fieldRef] = fieldTerms;
|
|
73615
73615
|
this.fieldLengths[fieldRef] = 0;
|
|
73616
73616
|
this.fieldLengths[fieldRef] += terms.length;
|
|
@@ -73642,10 +73642,10 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73642
73642
|
}
|
|
73643
73643
|
}
|
|
73644
73644
|
};
|
|
73645
|
-
|
|
73645
|
+
lunr4.Builder.prototype.calculateAverageFieldLengths = function() {
|
|
73646
73646
|
var fieldRefs = Object.keys(this.fieldLengths), numberOfFields = fieldRefs.length, accumulator = {}, documentsWithField = {};
|
|
73647
73647
|
for (var i2 = 0; i2 < numberOfFields; i2++) {
|
|
73648
|
-
var fieldRef =
|
|
73648
|
+
var fieldRef = lunr4.FieldRef.fromString(fieldRefs[i2]), field = fieldRef.fieldName;
|
|
73649
73649
|
documentsWithField[field] || (documentsWithField[field] = 0);
|
|
73650
73650
|
documentsWithField[field] += 1;
|
|
73651
73651
|
accumulator[field] || (accumulator[field] = 0);
|
|
@@ -73658,15 +73658,15 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73658
73658
|
}
|
|
73659
73659
|
this.averageFieldLength = accumulator;
|
|
73660
73660
|
};
|
|
73661
|
-
|
|
73661
|
+
lunr4.Builder.prototype.createFieldVectors = function() {
|
|
73662
73662
|
var fieldVectors = {}, fieldRefs = Object.keys(this.fieldTermFrequencies), fieldRefsLength = fieldRefs.length, termIdfCache = /* @__PURE__ */ Object.create(null);
|
|
73663
73663
|
for (var i2 = 0; i2 < fieldRefsLength; i2++) {
|
|
73664
|
-
var fieldRef =
|
|
73664
|
+
var fieldRef = lunr4.FieldRef.fromString(fieldRefs[i2]), fieldName = fieldRef.fieldName, fieldLength = this.fieldLengths[fieldRef], fieldVector = new lunr4.Vector(), termFrequencies = this.fieldTermFrequencies[fieldRef], terms = Object.keys(termFrequencies), termsLength = terms.length;
|
|
73665
73665
|
var fieldBoost = this._fields[fieldName].boost || 1, docBoost = this._documents[fieldRef.docRef].boost || 1;
|
|
73666
73666
|
for (var j = 0; j < termsLength; j++) {
|
|
73667
73667
|
var term = terms[j], tf = termFrequencies[term], termIndex = this.invertedIndex[term]._index, idf, score, scoreWithPrecision;
|
|
73668
73668
|
if (termIdfCache[term] === void 0) {
|
|
73669
|
-
idf =
|
|
73669
|
+
idf = lunr4.idf(this.invertedIndex[term], this.documentCount);
|
|
73670
73670
|
termIdfCache[term] = idf;
|
|
73671
73671
|
} else {
|
|
73672
73672
|
idf = termIdfCache[term];
|
|
@@ -73681,16 +73681,16 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73681
73681
|
}
|
|
73682
73682
|
this.fieldVectors = fieldVectors;
|
|
73683
73683
|
};
|
|
73684
|
-
|
|
73685
|
-
this.tokenSet =
|
|
73684
|
+
lunr4.Builder.prototype.createTokenSet = function() {
|
|
73685
|
+
this.tokenSet = lunr4.TokenSet.fromArray(
|
|
73686
73686
|
Object.keys(this.invertedIndex).sort()
|
|
73687
73687
|
);
|
|
73688
73688
|
};
|
|
73689
|
-
|
|
73689
|
+
lunr4.Builder.prototype.build = function() {
|
|
73690
73690
|
this.calculateAverageFieldLengths();
|
|
73691
73691
|
this.createFieldVectors();
|
|
73692
73692
|
this.createTokenSet();
|
|
73693
|
-
return new
|
|
73693
|
+
return new lunr4.Index({
|
|
73694
73694
|
invertedIndex: this.invertedIndex,
|
|
73695
73695
|
fieldVectors: this.fieldVectors,
|
|
73696
73696
|
tokenSet: this.tokenSet,
|
|
@@ -73698,12 +73698,12 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73698
73698
|
pipeline: this.searchPipeline
|
|
73699
73699
|
});
|
|
73700
73700
|
};
|
|
73701
|
-
|
|
73701
|
+
lunr4.Builder.prototype.use = function(fn2) {
|
|
73702
73702
|
var args2 = Array.prototype.slice.call(arguments, 1);
|
|
73703
73703
|
args2.unshift(this);
|
|
73704
73704
|
fn2.apply(this, args2);
|
|
73705
73705
|
};
|
|
73706
|
-
|
|
73706
|
+
lunr4.MatchData = function(term, field, metadata) {
|
|
73707
73707
|
var clonedMetadata = /* @__PURE__ */ Object.create(null), metadataKeys = Object.keys(metadata || {});
|
|
73708
73708
|
for (var i2 = 0; i2 < metadataKeys.length; i2++) {
|
|
73709
73709
|
var key = metadataKeys[i2];
|
|
@@ -73715,7 +73715,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73715
73715
|
this.metadata[term][field] = clonedMetadata;
|
|
73716
73716
|
}
|
|
73717
73717
|
};
|
|
73718
|
-
|
|
73718
|
+
lunr4.MatchData.prototype.combine = function(otherMatchData) {
|
|
73719
73719
|
var terms = Object.keys(otherMatchData.metadata);
|
|
73720
73720
|
for (var i2 = 0; i2 < terms.length; i2++) {
|
|
73721
73721
|
var term = terms[i2], fields = Object.keys(otherMatchData.metadata[term]);
|
|
@@ -73738,7 +73738,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73738
73738
|
}
|
|
73739
73739
|
}
|
|
73740
73740
|
};
|
|
73741
|
-
|
|
73741
|
+
lunr4.MatchData.prototype.add = function(term, field, metadata) {
|
|
73742
73742
|
if (!(term in this.metadata)) {
|
|
73743
73743
|
this.metadata[term] = /* @__PURE__ */ Object.create(null);
|
|
73744
73744
|
this.metadata[term][field] = metadata;
|
|
@@ -73758,15 +73758,15 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73758
73758
|
}
|
|
73759
73759
|
}
|
|
73760
73760
|
};
|
|
73761
|
-
|
|
73761
|
+
lunr4.Query = function(allFields) {
|
|
73762
73762
|
this.clauses = [];
|
|
73763
73763
|
this.allFields = allFields;
|
|
73764
73764
|
};
|
|
73765
|
-
|
|
73766
|
-
|
|
73767
|
-
|
|
73768
|
-
|
|
73769
|
-
|
|
73765
|
+
lunr4.Query.wildcard = new String("*");
|
|
73766
|
+
lunr4.Query.wildcard.NONE = 0;
|
|
73767
|
+
lunr4.Query.wildcard.LEADING = 1;
|
|
73768
|
+
lunr4.Query.wildcard.TRAILING = 2;
|
|
73769
|
+
lunr4.Query.presence = {
|
|
73770
73770
|
/**
|
|
73771
73771
|
* Term's presence in a document is optional, this is the default value.
|
|
73772
73772
|
*/
|
|
@@ -73782,7 +73782,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73782
73782
|
*/
|
|
73783
73783
|
PROHIBITED: 3
|
|
73784
73784
|
};
|
|
73785
|
-
|
|
73785
|
+
lunr4.Query.prototype.clause = function(clause) {
|
|
73786
73786
|
if (!("fields" in clause)) {
|
|
73787
73787
|
clause.fields = this.allFields;
|
|
73788
73788
|
}
|
|
@@ -73793,32 +73793,32 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73793
73793
|
clause.usePipeline = true;
|
|
73794
73794
|
}
|
|
73795
73795
|
if (!("wildcard" in clause)) {
|
|
73796
|
-
clause.wildcard =
|
|
73796
|
+
clause.wildcard = lunr4.Query.wildcard.NONE;
|
|
73797
73797
|
}
|
|
73798
|
-
if (clause.wildcard &
|
|
73798
|
+
if (clause.wildcard & lunr4.Query.wildcard.LEADING && clause.term.charAt(0) != lunr4.Query.wildcard) {
|
|
73799
73799
|
clause.term = "*" + clause.term;
|
|
73800
73800
|
}
|
|
73801
|
-
if (clause.wildcard &
|
|
73801
|
+
if (clause.wildcard & lunr4.Query.wildcard.TRAILING && clause.term.slice(-1) != lunr4.Query.wildcard) {
|
|
73802
73802
|
clause.term = "" + clause.term + "*";
|
|
73803
73803
|
}
|
|
73804
73804
|
if (!("presence" in clause)) {
|
|
73805
|
-
clause.presence =
|
|
73805
|
+
clause.presence = lunr4.Query.presence.OPTIONAL;
|
|
73806
73806
|
}
|
|
73807
73807
|
this.clauses.push(clause);
|
|
73808
73808
|
return this;
|
|
73809
73809
|
};
|
|
73810
|
-
|
|
73810
|
+
lunr4.Query.prototype.isNegated = function() {
|
|
73811
73811
|
for (var i2 = 0; i2 < this.clauses.length; i2++) {
|
|
73812
|
-
if (this.clauses[i2].presence !=
|
|
73812
|
+
if (this.clauses[i2].presence != lunr4.Query.presence.PROHIBITED) {
|
|
73813
73813
|
return false;
|
|
73814
73814
|
}
|
|
73815
73815
|
}
|
|
73816
73816
|
return true;
|
|
73817
73817
|
};
|
|
73818
|
-
|
|
73818
|
+
lunr4.Query.prototype.term = function(term, options) {
|
|
73819
73819
|
if (Array.isArray(term)) {
|
|
73820
73820
|
term.forEach(function(t2) {
|
|
73821
|
-
this.term(t2,
|
|
73821
|
+
this.term(t2, lunr4.utils.clone(options));
|
|
73822
73822
|
}, this);
|
|
73823
73823
|
return this;
|
|
73824
73824
|
}
|
|
@@ -73827,14 +73827,14 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73827
73827
|
this.clause(clause);
|
|
73828
73828
|
return this;
|
|
73829
73829
|
};
|
|
73830
|
-
|
|
73830
|
+
lunr4.QueryParseError = function(message, start, end) {
|
|
73831
73831
|
this.name = "QueryParseError";
|
|
73832
73832
|
this.message = message;
|
|
73833
73833
|
this.start = start;
|
|
73834
73834
|
this.end = end;
|
|
73835
73835
|
};
|
|
73836
|
-
|
|
73837
|
-
|
|
73836
|
+
lunr4.QueryParseError.prototype = new Error();
|
|
73837
|
+
lunr4.QueryLexer = function(str) {
|
|
73838
73838
|
this.lexemes = [];
|
|
73839
73839
|
this.str = str;
|
|
73840
73840
|
this.length = str.length;
|
|
@@ -73842,13 +73842,13 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73842
73842
|
this.start = 0;
|
|
73843
73843
|
this.escapeCharPositions = [];
|
|
73844
73844
|
};
|
|
73845
|
-
|
|
73846
|
-
var state =
|
|
73845
|
+
lunr4.QueryLexer.prototype.run = function() {
|
|
73846
|
+
var state = lunr4.QueryLexer.lexText;
|
|
73847
73847
|
while (state) {
|
|
73848
73848
|
state = state(this);
|
|
73849
73849
|
}
|
|
73850
73850
|
};
|
|
73851
|
-
|
|
73851
|
+
lunr4.QueryLexer.prototype.sliceString = function() {
|
|
73852
73852
|
var subSlices = [], sliceStart = this.start, sliceEnd = this.pos;
|
|
73853
73853
|
for (var i2 = 0; i2 < this.escapeCharPositions.length; i2++) {
|
|
73854
73854
|
sliceEnd = this.escapeCharPositions[i2];
|
|
@@ -73859,7 +73859,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73859
73859
|
this.escapeCharPositions.length = 0;
|
|
73860
73860
|
return subSlices.join("");
|
|
73861
73861
|
};
|
|
73862
|
-
|
|
73862
|
+
lunr4.QueryLexer.prototype.emit = function(type) {
|
|
73863
73863
|
this.lexemes.push({
|
|
73864
73864
|
type,
|
|
73865
73865
|
str: this.sliceString(),
|
|
@@ -73868,203 +73868,203 @@ schema (${ast._tag}): ${ast}`;
|
|
|
73868
73868
|
});
|
|
73869
73869
|
this.start = this.pos;
|
|
73870
73870
|
};
|
|
73871
|
-
|
|
73871
|
+
lunr4.QueryLexer.prototype.escapeCharacter = function() {
|
|
73872
73872
|
this.escapeCharPositions.push(this.pos - 1);
|
|
73873
73873
|
this.pos += 1;
|
|
73874
73874
|
};
|
|
73875
|
-
|
|
73875
|
+
lunr4.QueryLexer.prototype.next = function() {
|
|
73876
73876
|
if (this.pos >= this.length) {
|
|
73877
|
-
return
|
|
73877
|
+
return lunr4.QueryLexer.EOS;
|
|
73878
73878
|
}
|
|
73879
73879
|
var char2 = this.str.charAt(this.pos);
|
|
73880
73880
|
this.pos += 1;
|
|
73881
73881
|
return char2;
|
|
73882
73882
|
};
|
|
73883
|
-
|
|
73883
|
+
lunr4.QueryLexer.prototype.width = function() {
|
|
73884
73884
|
return this.pos - this.start;
|
|
73885
73885
|
};
|
|
73886
|
-
|
|
73886
|
+
lunr4.QueryLexer.prototype.ignore = function() {
|
|
73887
73887
|
if (this.start == this.pos) {
|
|
73888
73888
|
this.pos += 1;
|
|
73889
73889
|
}
|
|
73890
73890
|
this.start = this.pos;
|
|
73891
73891
|
};
|
|
73892
|
-
|
|
73892
|
+
lunr4.QueryLexer.prototype.backup = function() {
|
|
73893
73893
|
this.pos -= 1;
|
|
73894
73894
|
};
|
|
73895
|
-
|
|
73895
|
+
lunr4.QueryLexer.prototype.acceptDigitRun = function() {
|
|
73896
73896
|
var char2, charCode;
|
|
73897
73897
|
do {
|
|
73898
73898
|
char2 = this.next();
|
|
73899
73899
|
charCode = char2.charCodeAt(0);
|
|
73900
73900
|
} while (charCode > 47 && charCode < 58);
|
|
73901
|
-
if (char2 !=
|
|
73901
|
+
if (char2 != lunr4.QueryLexer.EOS) {
|
|
73902
73902
|
this.backup();
|
|
73903
73903
|
}
|
|
73904
73904
|
};
|
|
73905
|
-
|
|
73905
|
+
lunr4.QueryLexer.prototype.more = function() {
|
|
73906
73906
|
return this.pos < this.length;
|
|
73907
73907
|
};
|
|
73908
|
-
|
|
73909
|
-
|
|
73910
|
-
|
|
73911
|
-
|
|
73912
|
-
|
|
73913
|
-
|
|
73914
|
-
|
|
73908
|
+
lunr4.QueryLexer.EOS = "EOS";
|
|
73909
|
+
lunr4.QueryLexer.FIELD = "FIELD";
|
|
73910
|
+
lunr4.QueryLexer.TERM = "TERM";
|
|
73911
|
+
lunr4.QueryLexer.EDIT_DISTANCE = "EDIT_DISTANCE";
|
|
73912
|
+
lunr4.QueryLexer.BOOST = "BOOST";
|
|
73913
|
+
lunr4.QueryLexer.PRESENCE = "PRESENCE";
|
|
73914
|
+
lunr4.QueryLexer.lexField = function(lexer) {
|
|
73915
73915
|
lexer.backup();
|
|
73916
|
-
lexer.emit(
|
|
73916
|
+
lexer.emit(lunr4.QueryLexer.FIELD);
|
|
73917
73917
|
lexer.ignore();
|
|
73918
|
-
return
|
|
73918
|
+
return lunr4.QueryLexer.lexText;
|
|
73919
73919
|
};
|
|
73920
|
-
|
|
73920
|
+
lunr4.QueryLexer.lexTerm = function(lexer) {
|
|
73921
73921
|
if (lexer.width() > 1) {
|
|
73922
73922
|
lexer.backup();
|
|
73923
|
-
lexer.emit(
|
|
73923
|
+
lexer.emit(lunr4.QueryLexer.TERM);
|
|
73924
73924
|
}
|
|
73925
73925
|
lexer.ignore();
|
|
73926
73926
|
if (lexer.more()) {
|
|
73927
|
-
return
|
|
73927
|
+
return lunr4.QueryLexer.lexText;
|
|
73928
73928
|
}
|
|
73929
73929
|
};
|
|
73930
|
-
|
|
73930
|
+
lunr4.QueryLexer.lexEditDistance = function(lexer) {
|
|
73931
73931
|
lexer.ignore();
|
|
73932
73932
|
lexer.acceptDigitRun();
|
|
73933
|
-
lexer.emit(
|
|
73934
|
-
return
|
|
73933
|
+
lexer.emit(lunr4.QueryLexer.EDIT_DISTANCE);
|
|
73934
|
+
return lunr4.QueryLexer.lexText;
|
|
73935
73935
|
};
|
|
73936
|
-
|
|
73936
|
+
lunr4.QueryLexer.lexBoost = function(lexer) {
|
|
73937
73937
|
lexer.ignore();
|
|
73938
73938
|
lexer.acceptDigitRun();
|
|
73939
|
-
lexer.emit(
|
|
73940
|
-
return
|
|
73939
|
+
lexer.emit(lunr4.QueryLexer.BOOST);
|
|
73940
|
+
return lunr4.QueryLexer.lexText;
|
|
73941
73941
|
};
|
|
73942
|
-
|
|
73942
|
+
lunr4.QueryLexer.lexEOS = function(lexer) {
|
|
73943
73943
|
if (lexer.width() > 0) {
|
|
73944
|
-
lexer.emit(
|
|
73944
|
+
lexer.emit(lunr4.QueryLexer.TERM);
|
|
73945
73945
|
}
|
|
73946
73946
|
};
|
|
73947
|
-
|
|
73948
|
-
|
|
73947
|
+
lunr4.QueryLexer.termSeparator = lunr4.tokenizer.separator;
|
|
73948
|
+
lunr4.QueryLexer.lexText = function(lexer) {
|
|
73949
73949
|
while (true) {
|
|
73950
73950
|
var char2 = lexer.next();
|
|
73951
|
-
if (char2 ==
|
|
73952
|
-
return
|
|
73951
|
+
if (char2 == lunr4.QueryLexer.EOS) {
|
|
73952
|
+
return lunr4.QueryLexer.lexEOS;
|
|
73953
73953
|
}
|
|
73954
73954
|
if (char2.charCodeAt(0) == 92) {
|
|
73955
73955
|
lexer.escapeCharacter();
|
|
73956
73956
|
continue;
|
|
73957
73957
|
}
|
|
73958
73958
|
if (char2 == ":") {
|
|
73959
|
-
return
|
|
73959
|
+
return lunr4.QueryLexer.lexField;
|
|
73960
73960
|
}
|
|
73961
73961
|
if (char2 == "~") {
|
|
73962
73962
|
lexer.backup();
|
|
73963
73963
|
if (lexer.width() > 0) {
|
|
73964
|
-
lexer.emit(
|
|
73964
|
+
lexer.emit(lunr4.QueryLexer.TERM);
|
|
73965
73965
|
}
|
|
73966
|
-
return
|
|
73966
|
+
return lunr4.QueryLexer.lexEditDistance;
|
|
73967
73967
|
}
|
|
73968
73968
|
if (char2 == "^") {
|
|
73969
73969
|
lexer.backup();
|
|
73970
73970
|
if (lexer.width() > 0) {
|
|
73971
|
-
lexer.emit(
|
|
73971
|
+
lexer.emit(lunr4.QueryLexer.TERM);
|
|
73972
73972
|
}
|
|
73973
|
-
return
|
|
73973
|
+
return lunr4.QueryLexer.lexBoost;
|
|
73974
73974
|
}
|
|
73975
73975
|
if (char2 == "+" && lexer.width() === 1) {
|
|
73976
|
-
lexer.emit(
|
|
73977
|
-
return
|
|
73976
|
+
lexer.emit(lunr4.QueryLexer.PRESENCE);
|
|
73977
|
+
return lunr4.QueryLexer.lexText;
|
|
73978
73978
|
}
|
|
73979
73979
|
if (char2 == "-" && lexer.width() === 1) {
|
|
73980
|
-
lexer.emit(
|
|
73981
|
-
return
|
|
73980
|
+
lexer.emit(lunr4.QueryLexer.PRESENCE);
|
|
73981
|
+
return lunr4.QueryLexer.lexText;
|
|
73982
73982
|
}
|
|
73983
|
-
if (char2.match(
|
|
73984
|
-
return
|
|
73983
|
+
if (char2.match(lunr4.QueryLexer.termSeparator)) {
|
|
73984
|
+
return lunr4.QueryLexer.lexTerm;
|
|
73985
73985
|
}
|
|
73986
73986
|
}
|
|
73987
73987
|
};
|
|
73988
|
-
|
|
73989
|
-
this.lexer = new
|
|
73988
|
+
lunr4.QueryParser = function(str, query) {
|
|
73989
|
+
this.lexer = new lunr4.QueryLexer(str);
|
|
73990
73990
|
this.query = query;
|
|
73991
73991
|
this.currentClause = {};
|
|
73992
73992
|
this.lexemeIdx = 0;
|
|
73993
73993
|
};
|
|
73994
|
-
|
|
73994
|
+
lunr4.QueryParser.prototype.parse = function() {
|
|
73995
73995
|
this.lexer.run();
|
|
73996
73996
|
this.lexemes = this.lexer.lexemes;
|
|
73997
|
-
var state =
|
|
73997
|
+
var state = lunr4.QueryParser.parseClause;
|
|
73998
73998
|
while (state) {
|
|
73999
73999
|
state = state(this);
|
|
74000
74000
|
}
|
|
74001
74001
|
return this.query;
|
|
74002
74002
|
};
|
|
74003
|
-
|
|
74003
|
+
lunr4.QueryParser.prototype.peekLexeme = function() {
|
|
74004
74004
|
return this.lexemes[this.lexemeIdx];
|
|
74005
74005
|
};
|
|
74006
|
-
|
|
74006
|
+
lunr4.QueryParser.prototype.consumeLexeme = function() {
|
|
74007
74007
|
var lexeme = this.peekLexeme();
|
|
74008
74008
|
this.lexemeIdx += 1;
|
|
74009
74009
|
return lexeme;
|
|
74010
74010
|
};
|
|
74011
|
-
|
|
74011
|
+
lunr4.QueryParser.prototype.nextClause = function() {
|
|
74012
74012
|
var completedClause = this.currentClause;
|
|
74013
74013
|
this.query.clause(completedClause);
|
|
74014
74014
|
this.currentClause = {};
|
|
74015
74015
|
};
|
|
74016
|
-
|
|
74016
|
+
lunr4.QueryParser.parseClause = function(parser) {
|
|
74017
74017
|
var lexeme = parser.peekLexeme();
|
|
74018
74018
|
if (lexeme == void 0) {
|
|
74019
74019
|
return;
|
|
74020
74020
|
}
|
|
74021
74021
|
switch (lexeme.type) {
|
|
74022
|
-
case
|
|
74023
|
-
return
|
|
74024
|
-
case
|
|
74025
|
-
return
|
|
74026
|
-
case
|
|
74027
|
-
return
|
|
74022
|
+
case lunr4.QueryLexer.PRESENCE:
|
|
74023
|
+
return lunr4.QueryParser.parsePresence;
|
|
74024
|
+
case lunr4.QueryLexer.FIELD:
|
|
74025
|
+
return lunr4.QueryParser.parseField;
|
|
74026
|
+
case lunr4.QueryLexer.TERM:
|
|
74027
|
+
return lunr4.QueryParser.parseTerm;
|
|
74028
74028
|
default:
|
|
74029
74029
|
var errorMessage = "expected either a field or a term, found " + lexeme.type;
|
|
74030
74030
|
if (lexeme.str.length >= 1) {
|
|
74031
74031
|
errorMessage += " with value '" + lexeme.str + "'";
|
|
74032
74032
|
}
|
|
74033
|
-
throw new
|
|
74033
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74034
74034
|
}
|
|
74035
74035
|
};
|
|
74036
|
-
|
|
74036
|
+
lunr4.QueryParser.parsePresence = function(parser) {
|
|
74037
74037
|
var lexeme = parser.consumeLexeme();
|
|
74038
74038
|
if (lexeme == void 0) {
|
|
74039
74039
|
return;
|
|
74040
74040
|
}
|
|
74041
74041
|
switch (lexeme.str) {
|
|
74042
74042
|
case "-":
|
|
74043
|
-
parser.currentClause.presence =
|
|
74043
|
+
parser.currentClause.presence = lunr4.Query.presence.PROHIBITED;
|
|
74044
74044
|
break;
|
|
74045
74045
|
case "+":
|
|
74046
|
-
parser.currentClause.presence =
|
|
74046
|
+
parser.currentClause.presence = lunr4.Query.presence.REQUIRED;
|
|
74047
74047
|
break;
|
|
74048
74048
|
default:
|
|
74049
74049
|
var errorMessage = "unrecognised presence operator'" + lexeme.str + "'";
|
|
74050
|
-
throw new
|
|
74050
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74051
74051
|
}
|
|
74052
74052
|
var nextLexeme = parser.peekLexeme();
|
|
74053
74053
|
if (nextLexeme == void 0) {
|
|
74054
74054
|
var errorMessage = "expecting term or field, found nothing";
|
|
74055
|
-
throw new
|
|
74055
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74056
74056
|
}
|
|
74057
74057
|
switch (nextLexeme.type) {
|
|
74058
|
-
case
|
|
74059
|
-
return
|
|
74060
|
-
case
|
|
74061
|
-
return
|
|
74058
|
+
case lunr4.QueryLexer.FIELD:
|
|
74059
|
+
return lunr4.QueryParser.parseField;
|
|
74060
|
+
case lunr4.QueryLexer.TERM:
|
|
74061
|
+
return lunr4.QueryParser.parseTerm;
|
|
74062
74062
|
default:
|
|
74063
74063
|
var errorMessage = "expecting term or field, found '" + nextLexeme.type + "'";
|
|
74064
|
-
throw new
|
|
74064
|
+
throw new lunr4.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);
|
|
74065
74065
|
}
|
|
74066
74066
|
};
|
|
74067
|
-
|
|
74067
|
+
lunr4.QueryParser.parseField = function(parser) {
|
|
74068
74068
|
var lexeme = parser.consumeLexeme();
|
|
74069
74069
|
if (lexeme == void 0) {
|
|
74070
74070
|
return;
|
|
@@ -74073,23 +74073,23 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74073
74073
|
var possibleFields = parser.query.allFields.map(function(f) {
|
|
74074
74074
|
return "'" + f + "'";
|
|
74075
74075
|
}).join(", "), errorMessage = "unrecognised field '" + lexeme.str + "', possible fields: " + possibleFields;
|
|
74076
|
-
throw new
|
|
74076
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74077
74077
|
}
|
|
74078
74078
|
parser.currentClause.fields = [lexeme.str];
|
|
74079
74079
|
var nextLexeme = parser.peekLexeme();
|
|
74080
74080
|
if (nextLexeme == void 0) {
|
|
74081
74081
|
var errorMessage = "expecting term, found nothing";
|
|
74082
|
-
throw new
|
|
74082
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74083
74083
|
}
|
|
74084
74084
|
switch (nextLexeme.type) {
|
|
74085
|
-
case
|
|
74086
|
-
return
|
|
74085
|
+
case lunr4.QueryLexer.TERM:
|
|
74086
|
+
return lunr4.QueryParser.parseTerm;
|
|
74087
74087
|
default:
|
|
74088
74088
|
var errorMessage = "expecting term, found '" + nextLexeme.type + "'";
|
|
74089
|
-
throw new
|
|
74089
|
+
throw new lunr4.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);
|
|
74090
74090
|
}
|
|
74091
74091
|
};
|
|
74092
|
-
|
|
74092
|
+
lunr4.QueryParser.parseTerm = function(parser) {
|
|
74093
74093
|
var lexeme = parser.consumeLexeme();
|
|
74094
74094
|
if (lexeme == void 0) {
|
|
74095
74095
|
return;
|
|
@@ -74104,25 +74104,25 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74104
74104
|
return;
|
|
74105
74105
|
}
|
|
74106
74106
|
switch (nextLexeme.type) {
|
|
74107
|
-
case
|
|
74107
|
+
case lunr4.QueryLexer.TERM:
|
|
74108
74108
|
parser.nextClause();
|
|
74109
|
-
return
|
|
74110
|
-
case
|
|
74109
|
+
return lunr4.QueryParser.parseTerm;
|
|
74110
|
+
case lunr4.QueryLexer.FIELD:
|
|
74111
74111
|
parser.nextClause();
|
|
74112
|
-
return
|
|
74113
|
-
case
|
|
74114
|
-
return
|
|
74115
|
-
case
|
|
74116
|
-
return
|
|
74117
|
-
case
|
|
74112
|
+
return lunr4.QueryParser.parseField;
|
|
74113
|
+
case lunr4.QueryLexer.EDIT_DISTANCE:
|
|
74114
|
+
return lunr4.QueryParser.parseEditDistance;
|
|
74115
|
+
case lunr4.QueryLexer.BOOST:
|
|
74116
|
+
return lunr4.QueryParser.parseBoost;
|
|
74117
|
+
case lunr4.QueryLexer.PRESENCE:
|
|
74118
74118
|
parser.nextClause();
|
|
74119
|
-
return
|
|
74119
|
+
return lunr4.QueryParser.parsePresence;
|
|
74120
74120
|
default:
|
|
74121
74121
|
var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'";
|
|
74122
|
-
throw new
|
|
74122
|
+
throw new lunr4.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);
|
|
74123
74123
|
}
|
|
74124
74124
|
};
|
|
74125
|
-
|
|
74125
|
+
lunr4.QueryParser.parseEditDistance = function(parser) {
|
|
74126
74126
|
var lexeme = parser.consumeLexeme();
|
|
74127
74127
|
if (lexeme == void 0) {
|
|
74128
74128
|
return;
|
|
@@ -74130,7 +74130,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74130
74130
|
var editDistance = parseInt(lexeme.str, 10);
|
|
74131
74131
|
if (isNaN(editDistance)) {
|
|
74132
74132
|
var errorMessage = "edit distance must be numeric";
|
|
74133
|
-
throw new
|
|
74133
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74134
74134
|
}
|
|
74135
74135
|
parser.currentClause.editDistance = editDistance;
|
|
74136
74136
|
var nextLexeme = parser.peekLexeme();
|
|
@@ -74139,25 +74139,25 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74139
74139
|
return;
|
|
74140
74140
|
}
|
|
74141
74141
|
switch (nextLexeme.type) {
|
|
74142
|
-
case
|
|
74142
|
+
case lunr4.QueryLexer.TERM:
|
|
74143
74143
|
parser.nextClause();
|
|
74144
|
-
return
|
|
74145
|
-
case
|
|
74144
|
+
return lunr4.QueryParser.parseTerm;
|
|
74145
|
+
case lunr4.QueryLexer.FIELD:
|
|
74146
74146
|
parser.nextClause();
|
|
74147
|
-
return
|
|
74148
|
-
case
|
|
74149
|
-
return
|
|
74150
|
-
case
|
|
74151
|
-
return
|
|
74152
|
-
case
|
|
74147
|
+
return lunr4.QueryParser.parseField;
|
|
74148
|
+
case lunr4.QueryLexer.EDIT_DISTANCE:
|
|
74149
|
+
return lunr4.QueryParser.parseEditDistance;
|
|
74150
|
+
case lunr4.QueryLexer.BOOST:
|
|
74151
|
+
return lunr4.QueryParser.parseBoost;
|
|
74152
|
+
case lunr4.QueryLexer.PRESENCE:
|
|
74153
74153
|
parser.nextClause();
|
|
74154
|
-
return
|
|
74154
|
+
return lunr4.QueryParser.parsePresence;
|
|
74155
74155
|
default:
|
|
74156
74156
|
var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'";
|
|
74157
|
-
throw new
|
|
74157
|
+
throw new lunr4.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);
|
|
74158
74158
|
}
|
|
74159
74159
|
};
|
|
74160
|
-
|
|
74160
|
+
lunr4.QueryParser.parseBoost = function(parser) {
|
|
74161
74161
|
var lexeme = parser.consumeLexeme();
|
|
74162
74162
|
if (lexeme == void 0) {
|
|
74163
74163
|
return;
|
|
@@ -74165,7 +74165,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74165
74165
|
var boost = parseInt(lexeme.str, 10);
|
|
74166
74166
|
if (isNaN(boost)) {
|
|
74167
74167
|
var errorMessage = "boost must be numeric";
|
|
74168
|
-
throw new
|
|
74168
|
+
throw new lunr4.QueryParseError(errorMessage, lexeme.start, lexeme.end);
|
|
74169
74169
|
}
|
|
74170
74170
|
parser.currentClause.boost = boost;
|
|
74171
74171
|
var nextLexeme = parser.peekLexeme();
|
|
@@ -74174,22 +74174,22 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74174
74174
|
return;
|
|
74175
74175
|
}
|
|
74176
74176
|
switch (nextLexeme.type) {
|
|
74177
|
-
case
|
|
74177
|
+
case lunr4.QueryLexer.TERM:
|
|
74178
74178
|
parser.nextClause();
|
|
74179
|
-
return
|
|
74180
|
-
case
|
|
74179
|
+
return lunr4.QueryParser.parseTerm;
|
|
74180
|
+
case lunr4.QueryLexer.FIELD:
|
|
74181
74181
|
parser.nextClause();
|
|
74182
|
-
return
|
|
74183
|
-
case
|
|
74184
|
-
return
|
|
74185
|
-
case
|
|
74186
|
-
return
|
|
74187
|
-
case
|
|
74182
|
+
return lunr4.QueryParser.parseField;
|
|
74183
|
+
case lunr4.QueryLexer.EDIT_DISTANCE:
|
|
74184
|
+
return lunr4.QueryParser.parseEditDistance;
|
|
74185
|
+
case lunr4.QueryLexer.BOOST:
|
|
74186
|
+
return lunr4.QueryParser.parseBoost;
|
|
74187
|
+
case lunr4.QueryLexer.PRESENCE:
|
|
74188
74188
|
parser.nextClause();
|
|
74189
|
-
return
|
|
74189
|
+
return lunr4.QueryParser.parsePresence;
|
|
74190
74190
|
default:
|
|
74191
74191
|
var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'";
|
|
74192
|
-
throw new
|
|
74192
|
+
throw new lunr4.QueryParseError(errorMessage, nextLexeme.start, nextLexeme.end);
|
|
74193
74193
|
}
|
|
74194
74194
|
};
|
|
74195
74195
|
(function(root, factory) {
|
|
@@ -74201,7 +74201,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
74201
74201
|
root.lunr = factory();
|
|
74202
74202
|
}
|
|
74203
74203
|
})(this, function() {
|
|
74204
|
-
return
|
|
74204
|
+
return lunr4;
|
|
74205
74205
|
});
|
|
74206
74206
|
})();
|
|
74207
74207
|
}
|
|
@@ -95265,8 +95265,8 @@ schema (${ast._tag}): ${ast}`;
|
|
|
95265
95265
|
factory()(root.lunr);
|
|
95266
95266
|
}
|
|
95267
95267
|
})(exports, function() {
|
|
95268
|
-
return function(
|
|
95269
|
-
|
|
95268
|
+
return function(lunr4) {
|
|
95269
|
+
lunr4.stemmerSupport = {
|
|
95270
95270
|
Among: function(s, substring_i, result, method) {
|
|
95271
95271
|
this.toCharArray = function(s2) {
|
|
95272
95272
|
var sLength = s2.length, charArr = new Array(sLength);
|
|
@@ -95501,7 +95501,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
95501
95501
|
};
|
|
95502
95502
|
}
|
|
95503
95503
|
};
|
|
95504
|
-
|
|
95504
|
+
lunr4.trimmerSupport = {
|
|
95505
95505
|
generateTrimmer: function(wordCharacters) {
|
|
95506
95506
|
var startRegex = new RegExp("^[^" + wordCharacters + "]+");
|
|
95507
95507
|
var endRegex = new RegExp("[^" + wordCharacters + "]+$");
|
|
@@ -95533,7 +95533,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
95533
95533
|
factory()(root.lunr);
|
|
95534
95534
|
}
|
|
95535
95535
|
})(exports, function() {
|
|
95536
|
-
return function(
|
|
95536
|
+
return function(lunr4) {
|
|
95537
95537
|
function TinySegmenter() {
|
|
95538
95538
|
var patterns = {
|
|
95539
95539
|
"[\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u5341\u767E\u5343\u4E07\u5104\u5146]": "M",
|
|
@@ -95699,7 +95699,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
95699
95699
|
result.push(word);
|
|
95700
95700
|
return result;
|
|
95701
95701
|
};
|
|
95702
|
-
|
|
95702
|
+
lunr4.TinySegmenter = TinySegmenter;
|
|
95703
95703
|
};
|
|
95704
95704
|
});
|
|
95705
95705
|
}
|
|
@@ -95717,30 +95717,30 @@ schema (${ast._tag}): ${ast}`;
|
|
|
95717
95717
|
factory()(root.lunr);
|
|
95718
95718
|
}
|
|
95719
95719
|
})(exports, function() {
|
|
95720
|
-
return function(
|
|
95721
|
-
if ("undefined" === typeof
|
|
95720
|
+
return function(lunr4) {
|
|
95721
|
+
if ("undefined" === typeof lunr4) {
|
|
95722
95722
|
throw new Error("Lunr is not present. Please include / require Lunr before this script.");
|
|
95723
95723
|
}
|
|
95724
|
-
if ("undefined" === typeof
|
|
95724
|
+
if ("undefined" === typeof lunr4.stemmerSupport) {
|
|
95725
95725
|
throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");
|
|
95726
95726
|
}
|
|
95727
|
-
|
|
95727
|
+
lunr4.fr = function() {
|
|
95728
95728
|
this.pipeline.reset();
|
|
95729
95729
|
this.pipeline.add(
|
|
95730
|
-
|
|
95731
|
-
|
|
95732
|
-
|
|
95730
|
+
lunr4.fr.trimmer,
|
|
95731
|
+
lunr4.fr.stopWordFilter,
|
|
95732
|
+
lunr4.fr.stemmer
|
|
95733
95733
|
);
|
|
95734
95734
|
if (this.searchPipeline) {
|
|
95735
95735
|
this.searchPipeline.reset();
|
|
95736
|
-
this.searchPipeline.add(
|
|
95736
|
+
this.searchPipeline.add(lunr4.fr.stemmer);
|
|
95737
95737
|
}
|
|
95738
95738
|
};
|
|
95739
|
-
|
|
95740
|
-
|
|
95741
|
-
|
|
95742
|
-
|
|
95743
|
-
var Among =
|
|
95739
|
+
lunr4.fr.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
|
|
95740
|
+
lunr4.fr.trimmer = lunr4.trimmerSupport.generateTrimmer(lunr4.fr.wordCharacters);
|
|
95741
|
+
lunr4.Pipeline.registerFunction(lunr4.fr.trimmer, "trimmer-fr");
|
|
95742
|
+
lunr4.fr.stemmer = function() {
|
|
95743
|
+
var Among = lunr4.stemmerSupport.Among, SnowballProgram = lunr4.stemmerSupport.SnowballProgram, st = new function FrenchStemmer() {
|
|
95744
95744
|
var a_0 = [
|
|
95745
95745
|
new Among("col", -1, -1),
|
|
95746
95746
|
new Among("par", -1, -1),
|
|
@@ -96428,9 +96428,9 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96428
96428
|
}
|
|
96429
96429
|
};
|
|
96430
96430
|
}();
|
|
96431
|
-
|
|
96432
|
-
|
|
96433
|
-
|
|
96431
|
+
lunr4.Pipeline.registerFunction(lunr4.fr.stemmer, "stemmer-fr");
|
|
96432
|
+
lunr4.fr.stopWordFilter = lunr4.generateStopWordFilter("ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c ce ceci cel\xE0 ces cet cette d dans de des du elle en es est et eu eue eues eurent eus eusse eussent eusses eussiez eussions eut eux e\xFBmes e\xFBt e\xFBtes furent fus fusse fussent fusses fussiez fussions fut f\xFBmes f\xFBt f\xFBtes ici il ils j je l la le les leur leurs lui m ma mais me mes moi mon m\xEAme n ne nos notre nous on ont ou par pas pour qu que quel quelle quelles quels qui s sa sans se sera serai seraient serais serait seras serez seriez serions serons seront ses soi soient sois soit sommes son sont soyez soyons suis sur t ta te tes toi ton tu un une vos votre vous y \xE0 \xE9taient \xE9tais \xE9tait \xE9tant \xE9tiez \xE9tions \xE9t\xE9 \xE9t\xE9e \xE9t\xE9es \xE9t\xE9s \xEAtes".split(" "));
|
|
96433
|
+
lunr4.Pipeline.registerFunction(lunr4.fr.stopWordFilter, "stopWordFilter-fr");
|
|
96434
96434
|
};
|
|
96435
96435
|
});
|
|
96436
96436
|
}
|
|
@@ -96448,34 +96448,34 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96448
96448
|
factory()(root.lunr);
|
|
96449
96449
|
}
|
|
96450
96450
|
})(exports, function() {
|
|
96451
|
-
return function(
|
|
96452
|
-
if ("undefined" === typeof
|
|
96451
|
+
return function(lunr4) {
|
|
96452
|
+
if ("undefined" === typeof lunr4) {
|
|
96453
96453
|
throw new Error("Lunr is not present. Please include / require Lunr before this script.");
|
|
96454
96454
|
}
|
|
96455
|
-
if ("undefined" === typeof
|
|
96455
|
+
if ("undefined" === typeof lunr4.stemmerSupport) {
|
|
96456
96456
|
throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");
|
|
96457
96457
|
}
|
|
96458
|
-
var isLunr2 =
|
|
96459
|
-
|
|
96458
|
+
var isLunr2 = lunr4.version[0] == "2";
|
|
96459
|
+
lunr4.ja = function() {
|
|
96460
96460
|
this.pipeline.reset();
|
|
96461
96461
|
this.pipeline.add(
|
|
96462
|
-
|
|
96463
|
-
|
|
96464
|
-
|
|
96462
|
+
lunr4.ja.trimmer,
|
|
96463
|
+
lunr4.ja.stopWordFilter,
|
|
96464
|
+
lunr4.ja.stemmer
|
|
96465
96465
|
);
|
|
96466
96466
|
if (isLunr2) {
|
|
96467
|
-
this.tokenizer =
|
|
96467
|
+
this.tokenizer = lunr4.ja.tokenizer;
|
|
96468
96468
|
} else {
|
|
96469
|
-
if (
|
|
96470
|
-
|
|
96469
|
+
if (lunr4.tokenizer) {
|
|
96470
|
+
lunr4.tokenizer = lunr4.ja.tokenizer;
|
|
96471
96471
|
}
|
|
96472
96472
|
if (this.tokenizerFn) {
|
|
96473
|
-
this.tokenizerFn =
|
|
96473
|
+
this.tokenizerFn = lunr4.ja.tokenizer;
|
|
96474
96474
|
}
|
|
96475
96475
|
}
|
|
96476
96476
|
};
|
|
96477
|
-
var segmenter = new
|
|
96478
|
-
|
|
96477
|
+
var segmenter = new lunr4.TinySegmenter();
|
|
96478
|
+
lunr4.ja.tokenizer = function(obj) {
|
|
96479
96479
|
var i2;
|
|
96480
96480
|
var str;
|
|
96481
96481
|
var len;
|
|
@@ -96491,7 +96491,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96491
96491
|
if (Array.isArray(obj)) {
|
|
96492
96492
|
return obj.map(
|
|
96493
96493
|
function(t2) {
|
|
96494
|
-
return isLunr2 ? new
|
|
96494
|
+
return isLunr2 ? new lunr4.Token(t2.toLowerCase()) : t2.toLowerCase();
|
|
96495
96495
|
}
|
|
96496
96496
|
);
|
|
96497
96497
|
}
|
|
@@ -96518,7 +96518,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96518
96518
|
for (i2 = 0; i2 < segs.length; i2++) {
|
|
96519
96519
|
if (isLunr2) {
|
|
96520
96520
|
tokens.push(
|
|
96521
|
-
new
|
|
96521
|
+
new lunr4.Token(
|
|
96522
96522
|
segs[i2],
|
|
96523
96523
|
{
|
|
96524
96524
|
position: [segStart, segs[i2].length],
|
|
@@ -96537,23 +96537,23 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96537
96537
|
}
|
|
96538
96538
|
return tokens;
|
|
96539
96539
|
};
|
|
96540
|
-
|
|
96540
|
+
lunr4.ja.stemmer = /* @__PURE__ */ function() {
|
|
96541
96541
|
return function(word) {
|
|
96542
96542
|
return word;
|
|
96543
96543
|
};
|
|
96544
96544
|
}();
|
|
96545
|
-
|
|
96546
|
-
|
|
96547
|
-
|
|
96548
|
-
|
|
96549
|
-
|
|
96545
|
+
lunr4.Pipeline.registerFunction(lunr4.ja.stemmer, "stemmer-ja");
|
|
96546
|
+
lunr4.ja.wordCharacters = "\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u5341\u767E\u5343\u4E07\u5104\u5146\u4E00-\u9FA0\u3005\u3006\u30F5\u30F6\u3041-\u3093\u30A1-\u30F4\u30FC\uFF71-\uFF9D\uFF9Ea-zA-Z\uFF41-\uFF5A\uFF21-\uFF3A0-9\uFF10-\uFF19";
|
|
96547
|
+
lunr4.ja.trimmer = lunr4.trimmerSupport.generateTrimmer(lunr4.ja.wordCharacters);
|
|
96548
|
+
lunr4.Pipeline.registerFunction(lunr4.ja.trimmer, "trimmer-ja");
|
|
96549
|
+
lunr4.ja.stopWordFilter = lunr4.generateStopWordFilter(
|
|
96550
96550
|
"\u3053\u308C \u305D\u308C \u3042\u308C \u3053\u306E \u305D\u306E \u3042\u306E \u3053\u3053 \u305D\u3053 \u3042\u305D\u3053 \u3053\u3061\u3089 \u3069\u3053 \u3060\u308C \u306A\u306B \u306A\u3093 \u4F55 \u79C1 \u8CB4\u65B9 \u8CB4\u65B9\u65B9 \u6211\u3005 \u79C1\u9054 \u3042\u306E\u4EBA \u3042\u306E\u304B\u305F \u5F7C\u5973 \u5F7C \u3067\u3059 \u3042\u308A\u307E\u3059 \u304A\u308A\u307E\u3059 \u3044\u307E\u3059 \u306F \u304C \u306E \u306B \u3092 \u3067 \u3048 \u304B\u3089 \u307E\u3067 \u3088\u308A \u3082 \u3069\u306E \u3068 \u3057 \u305D\u308C\u3067 \u3057\u304B\u3057".split(" ")
|
|
96551
96551
|
);
|
|
96552
|
-
|
|
96553
|
-
|
|
96554
|
-
|
|
96555
|
-
|
|
96556
|
-
|
|
96552
|
+
lunr4.Pipeline.registerFunction(lunr4.ja.stopWordFilter, "stopWordFilter-ja");
|
|
96553
|
+
lunr4.jp = lunr4.ja;
|
|
96554
|
+
lunr4.Pipeline.registerFunction(lunr4.jp.stemmer, "stemmer-jp");
|
|
96555
|
+
lunr4.Pipeline.registerFunction(lunr4.jp.trimmer, "trimmer-jp");
|
|
96556
|
+
lunr4.Pipeline.registerFunction(lunr4.jp.stopWordFilter, "stopWordFilter-jp");
|
|
96557
96557
|
};
|
|
96558
96558
|
});
|
|
96559
96559
|
}
|
|
@@ -96571,8 +96571,8 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96571
96571
|
factory()(root.lunr);
|
|
96572
96572
|
}
|
|
96573
96573
|
})(exports, function() {
|
|
96574
|
-
return function(
|
|
96575
|
-
|
|
96574
|
+
return function(lunr4) {
|
|
96575
|
+
lunr4.multiLanguage = function() {
|
|
96576
96576
|
var languages = Array.prototype.slice.call(arguments);
|
|
96577
96577
|
var nameSuffix = languages.join("-");
|
|
96578
96578
|
var wordCharacters = "";
|
|
@@ -96581,23 +96581,23 @@ schema (${ast._tag}): ${ast}`;
|
|
|
96581
96581
|
for (var i2 = 0; i2 < languages.length; ++i2) {
|
|
96582
96582
|
if (languages[i2] == "en") {
|
|
96583
96583
|
wordCharacters += "\\w";
|
|
96584
|
-
pipeline.unshift(
|
|
96585
|
-
pipeline.push(
|
|
96586
|
-
searchPipeline.push(
|
|
96584
|
+
pipeline.unshift(lunr4.stopWordFilter);
|
|
96585
|
+
pipeline.push(lunr4.stemmer);
|
|
96586
|
+
searchPipeline.push(lunr4.stemmer);
|
|
96587
96587
|
} else {
|
|
96588
|
-
wordCharacters +=
|
|
96589
|
-
if (
|
|
96590
|
-
pipeline.unshift(
|
|
96588
|
+
wordCharacters += lunr4[languages[i2]].wordCharacters;
|
|
96589
|
+
if (lunr4[languages[i2]].stopWordFilter) {
|
|
96590
|
+
pipeline.unshift(lunr4[languages[i2]].stopWordFilter);
|
|
96591
96591
|
}
|
|
96592
|
-
if (
|
|
96593
|
-
pipeline.push(
|
|
96594
|
-
searchPipeline.push(
|
|
96592
|
+
if (lunr4[languages[i2]].stemmer) {
|
|
96593
|
+
pipeline.push(lunr4[languages[i2]].stemmer);
|
|
96594
|
+
searchPipeline.push(lunr4[languages[i2]].stemmer);
|
|
96595
96595
|
}
|
|
96596
96596
|
}
|
|
96597
96597
|
}
|
|
96598
96598
|
;
|
|
96599
|
-
var multiTrimmer =
|
|
96600
|
-
|
|
96599
|
+
var multiTrimmer = lunr4.trimmerSupport.generateTrimmer(wordCharacters);
|
|
96600
|
+
lunr4.Pipeline.registerFunction(multiTrimmer, "lunr-multi-trimmer-" + nameSuffix);
|
|
96601
96601
|
pipeline.unshift(multiTrimmer);
|
|
96602
96602
|
return function() {
|
|
96603
96603
|
this.pipeline.reset();
|
|
@@ -130433,7 +130433,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
130433
130433
|
if (!parentURI) {
|
|
130434
130434
|
console.warn("Unable to find URI for parent path", parentPath);
|
|
130435
130435
|
}
|
|
130436
|
-
const shouldAppear = !!expanded.values().find((expandedURI) => expandedURI === parentURI);
|
|
130436
|
+
const shouldAppear = !![...expanded.values()].find((expandedURI) => expandedURI === parentURI);
|
|
130437
130437
|
return shouldAppear;
|
|
130438
130438
|
}).map(([path, id3]) => {
|
|
130439
130439
|
const level = path === "" ? 0 : (path.match(/\//g) ?? []).length + 1;
|
|
@@ -131359,7 +131359,21 @@ schema (${ast._tag}): ${ast}`;
|
|
|
131359
131359
|
}
|
|
131360
131360
|
|
|
131361
131361
|
// bootstrap.tsx
|
|
131362
|
+
var import_lunr6 = __toESM(require_lunr(), 1);
|
|
131362
131363
|
setTimeout(initApp, 50);
|
|
131364
|
+
import_lunr6.default.TokenSet.prototype.toString = function() {
|
|
131365
|
+
if (this._str) {
|
|
131366
|
+
return this._str;
|
|
131367
|
+
}
|
|
131368
|
+
let str = this.final ? "1" : "0", labels = Object.keys(this.edges).sort(), len = labels.length;
|
|
131369
|
+
for (var i2 = 0; i2 < len; i2++) {
|
|
131370
|
+
let label = labels[i2], node = label ? this.edges[label] : void 0;
|
|
131371
|
+
if (node) {
|
|
131372
|
+
str = str + ", L(" + label + ")I(" + node.id + ")";
|
|
131373
|
+
}
|
|
131374
|
+
}
|
|
131375
|
+
return str;
|
|
131376
|
+
};
|
|
131363
131377
|
function initApp() {
|
|
131364
131378
|
const appRoot = document.getElementById("app");
|
|
131365
131379
|
if (!appRoot) {
|