@digipair/skill-vespa 0.103.2 → 0.105.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.
- package/index.esm.js +113 -57
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -72686,14 +72686,14 @@ function indent(str, spaces) {
|
|
|
72686
72686
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
72687
72687
|
// match is required
|
|
72688
72688
|
if (!match) {
|
|
72689
|
-
return
|
|
72689
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
72690
72690
|
v: nextMatch1
|
|
72691
72691
|
};
|
|
72692
72692
|
}
|
|
72693
72693
|
var token = match.token, offset = match.offset;
|
|
72694
72694
|
i1 += offset;
|
|
72695
72695
|
if (token === " ") {
|
|
72696
|
-
return
|
|
72696
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
72697
72697
|
}
|
|
72698
72698
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
72699
72699
|
token
|
|
@@ -72712,7 +72712,7 @@ function indent(str, spaces) {
|
|
|
72712
72712
|
if (contextKeys.some(function(el) {
|
|
72713
72713
|
return el.startsWith(name);
|
|
72714
72714
|
})) {
|
|
72715
|
-
return
|
|
72715
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
72716
72716
|
}
|
|
72717
72717
|
if (dateTimeIdentifiers.some(function(el) {
|
|
72718
72718
|
return el === name;
|
|
@@ -72731,9 +72731,9 @@ function indent(str, spaces) {
|
|
|
72731
72731
|
if (dateTimeIdentifiers.some(function(el) {
|
|
72732
72732
|
return el.startsWith(name);
|
|
72733
72733
|
})) {
|
|
72734
|
-
return
|
|
72734
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
72735
72735
|
}
|
|
72736
|
-
return
|
|
72736
|
+
return nextMatch = nextMatch1, tokens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!Q!['w~+YO$]~~+_O$s~R+fP!]QsP!_!`+iP+nOsPR+uP!YQsP!_!`+i~+}O$l~~,SO!i~~,XO!g~~,[WOY,XZ#O,X#O#P,t#P#S,X#S#T-p#T;'S,X;'S;=`-u<%lO,X~,wRO;'S,X;'S;=`-Q;=`O,X~-TXOY,XZ#O,X#O#P,t#P#S,X#S#T-p#T;'S,X;'S;=`-u;=`<%l,X<%lO,X~-uO$Z~~-xP;=`<%l,X~.QO#S~~.VO#R~",
|
|
73601
73601
|
tokenizers: [
|
|
73602
73602
|
propertyIdentifiers,
|
|
73603
73603
|
identifiers,
|
|
@@ -74113,6 +74113,9 @@ function parseParameterNames(fn) {
|
|
|
74113
74113
|
function notImplemented(thing) {
|
|
74114
74114
|
return new Error("not implemented: ".concat(thing));
|
|
74115
74115
|
}
|
|
74116
|
+
function isNotImplemented(err) {
|
|
74117
|
+
return /^not implemented/.test(err.message);
|
|
74118
|
+
}
|
|
74116
74119
|
/**
|
|
74117
74120
|
* Returns a name from context or undefined if it does not exist.
|
|
74118
74121
|
*
|
|
@@ -74233,6 +74236,9 @@ var builtins = {
|
|
|
74233
74236
|
d = from;
|
|
74234
74237
|
}
|
|
74235
74238
|
if (year) {
|
|
74239
|
+
if (!isNumber(month) || !isNumber(day)) {
|
|
74240
|
+
return null;
|
|
74241
|
+
}
|
|
74236
74242
|
d = date().setZone("utc").set({
|
|
74237
74243
|
year: year,
|
|
74238
74244
|
month: month,
|
|
@@ -74287,7 +74293,7 @@ var builtins = {
|
|
|
74287
74293
|
from = hour;
|
|
74288
74294
|
hour = null;
|
|
74289
74295
|
}
|
|
74290
|
-
if (isString(from)) {
|
|
74296
|
+
if (isString(from) && from) {
|
|
74291
74297
|
t = date(null, from);
|
|
74292
74298
|
}
|
|
74293
74299
|
if (isDateTime(from)) {
|
|
@@ -74298,6 +74304,9 @@ var builtins = {
|
|
|
74298
74304
|
});
|
|
74299
74305
|
}
|
|
74300
74306
|
if (isNumber(hour)) {
|
|
74307
|
+
if (!isNumber(minute) || !isNumber(second)) {
|
|
74308
|
+
return null;
|
|
74309
|
+
}
|
|
74301
74310
|
// TODO: support offset = days and time duration
|
|
74302
74311
|
t = date().set({
|
|
74303
74312
|
hour: hour,
|
|
@@ -74407,7 +74416,8 @@ var builtins = {
|
|
|
74407
74416
|
"string"
|
|
74408
74417
|
]),
|
|
74409
74418
|
"replace": fn(function(input, pattern, replacement, flags) {
|
|
74410
|
-
|
|
74419
|
+
var regexp = createRegexp(pattern, flags || "", "g");
|
|
74420
|
+
return regexp && input.replace(regexp, replacement.replace(/\$0/g, "$$&"));
|
|
74411
74421
|
}, [
|
|
74412
74422
|
"string",
|
|
74413
74423
|
"string",
|
|
@@ -74420,9 +74430,9 @@ var builtins = {
|
|
|
74420
74430
|
"string",
|
|
74421
74431
|
"string"
|
|
74422
74432
|
]),
|
|
74423
|
-
// eslint-disable-next-line
|
|
74424
74433
|
"matches": fn(function(input, pattern, flags) {
|
|
74425
|
-
|
|
74434
|
+
var regexp = createRegexp(pattern, flags || "", "");
|
|
74435
|
+
return regexp && regexp.test(input);
|
|
74426
74436
|
}, [
|
|
74427
74437
|
"string",
|
|
74428
74438
|
"string",
|
|
@@ -74441,7 +74451,8 @@ var builtins = {
|
|
|
74441
74451
|
"string"
|
|
74442
74452
|
]),
|
|
74443
74453
|
"split": fn(function(string, delimiter) {
|
|
74444
|
-
|
|
74454
|
+
var regexp = createRegexp(delimiter, "", "");
|
|
74455
|
+
return regexp && string.split(regexp);
|
|
74445
74456
|
}, [
|
|
74446
74457
|
"string",
|
|
74447
74458
|
"string"
|
|
@@ -75357,6 +75368,35 @@ function mode(array) {
|
|
|
75357
75368
|
function ifValid(o) {
|
|
75358
75369
|
return o.isValid ? o : null;
|
|
75359
75370
|
}
|
|
75371
|
+
/**
|
|
75372
|
+
* Concatenates flags for a regular expression.
|
|
75373
|
+
*
|
|
75374
|
+
* Ensures that default flags are included without duplication, even if
|
|
75375
|
+
* user-specified flags overlap with the defaults.
|
|
75376
|
+
*/ function buildFlags(flags, defaultFlags) {
|
|
75377
|
+
var unsupportedFlags = flags.replace(/[smix]/g, "");
|
|
75378
|
+
if (unsupportedFlags) {
|
|
75379
|
+
throw new Error("illegal flags: " + unsupportedFlags);
|
|
75380
|
+
}
|
|
75381
|
+
// we don't implement the <x> flag
|
|
75382
|
+
if (/x/.test(flags)) {
|
|
75383
|
+
throw notImplemented("matches <x> flag");
|
|
75384
|
+
}
|
|
75385
|
+
return flags + defaultFlags;
|
|
75386
|
+
}
|
|
75387
|
+
/**
|
|
75388
|
+
* Creates a regular expression from a given pattern
|
|
75389
|
+
*/ function createRegexp(pattern, flags) {
|
|
75390
|
+
var defaultFlags = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
75391
|
+
try {
|
|
75392
|
+
return new RegExp(pattern, "u" + buildFlags(flags, defaultFlags));
|
|
75393
|
+
} catch (_err) {
|
|
75394
|
+
if (isNotImplemented(_err)) {
|
|
75395
|
+
throw _err;
|
|
75396
|
+
}
|
|
75397
|
+
}
|
|
75398
|
+
return null;
|
|
75399
|
+
}
|
|
75360
75400
|
function parseExpression(expression) {
|
|
75361
75401
|
var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, dialect = arguments.length > 2 ? arguments[2] : void 0;
|
|
75362
75402
|
return parser.configure({
|
|
@@ -75811,27 +75851,59 @@ function evalNode(node, input, args) {
|
|
|
75811
75851
|
};
|
|
75812
75852
|
case "Type":
|
|
75813
75853
|
return args[0];
|
|
75854
|
+
// (x in [ [1,2], [3,4] ]), (y in x)
|
|
75814
75855
|
case "InExpressions":
|
|
75815
75856
|
return function(context) {
|
|
75816
|
-
|
|
75817
|
-
|
|
75818
|
-
|
|
75819
|
-
|
|
75820
|
-
|
|
75821
|
-
|
|
75822
|
-
|
|
75823
|
-
|
|
75824
|
-
|
|
75825
|
-
|
|
75826
|
-
|
|
75827
|
-
ctx = [
|
|
75828
|
-
ctx
|
|
75829
|
-
];
|
|
75857
|
+
// we build up evaluation contexts from left to right,
|
|
75858
|
+
// ending up with the cartesian product over all available contexts
|
|
75859
|
+
//
|
|
75860
|
+
// previous context is provided to later context providers
|
|
75861
|
+
// producing <null> as a context during evaluation causes the
|
|
75862
|
+
// whole result to turn <null>
|
|
75863
|
+
var isValidContexts = function(contexts) {
|
|
75864
|
+
if (contexts === null || contexts.some(function(arr) {
|
|
75865
|
+
return getType(arr) === "nil";
|
|
75866
|
+
})) {
|
|
75867
|
+
return false;
|
|
75830
75868
|
}
|
|
75831
|
-
return
|
|
75832
|
-
|
|
75833
|
-
|
|
75834
|
-
|
|
75869
|
+
return true;
|
|
75870
|
+
};
|
|
75871
|
+
var join = function(aContexts, bContextProducer) {
|
|
75872
|
+
var _instance;
|
|
75873
|
+
return (_instance = []).concat.apply(_instance, _to_consumable_array(aContexts.map(function(aContext) {
|
|
75874
|
+
var bContexts = bContextProducer(Object.assign(Object.assign({}, context), aContext));
|
|
75875
|
+
if (!isValidContexts(bContexts)) {
|
|
75876
|
+
return null;
|
|
75877
|
+
}
|
|
75878
|
+
return bContexts.map(function(bContext) {
|
|
75879
|
+
return Object.assign(Object.assign({}, aContext), bContext);
|
|
75880
|
+
});
|
|
75881
|
+
})));
|
|
75882
|
+
};
|
|
75883
|
+
var cartesian = function(aContexts, bContextProducer) {
|
|
75884
|
+
for(var _len = arguments.length, otherContextProducers = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
75885
|
+
otherContextProducers[_key - 2] = arguments[_key];
|
|
75886
|
+
}
|
|
75887
|
+
if (!isValidContexts(aContexts)) {
|
|
75888
|
+
return null;
|
|
75889
|
+
}
|
|
75890
|
+
if (!bContextProducer) {
|
|
75891
|
+
return aContexts;
|
|
75892
|
+
}
|
|
75893
|
+
return cartesian.apply(void 0, [
|
|
75894
|
+
join(aContexts, bContextProducer)
|
|
75895
|
+
].concat(_to_consumable_array(otherContextProducers)));
|
|
75896
|
+
};
|
|
75897
|
+
var cartesianProduct = function(contextProducers) {
|
|
75898
|
+
var _contextProducers = _to_array(contextProducers), aContextProducer = _contextProducers[0], otherContextProducers = _contextProducers.slice(1);
|
|
75899
|
+
var aContexts = aContextProducer(context);
|
|
75900
|
+
return cartesian.apply(void 0, [
|
|
75901
|
+
aContexts
|
|
75902
|
+
].concat(_to_consumable_array(otherContextProducers)));
|
|
75903
|
+
};
|
|
75904
|
+
var product = cartesianProduct(args);
|
|
75905
|
+
return product && product.map(function(p) {
|
|
75906
|
+
return Object.assign(Object.assign({}, context), p);
|
|
75835
75907
|
});
|
|
75836
75908
|
};
|
|
75837
75909
|
// Name kw<"in"> Expr
|
|
@@ -76461,31 +76533,6 @@ function createDateTimeRange(start, end, startIncluded, endIncluded) {
|
|
|
76461
76533
|
includes: includes
|
|
76462
76534
|
});
|
|
76463
76535
|
}
|
|
76464
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
76465
|
-
function cartesianProduct(arrays) {
|
|
76466
|
-
var _instance;
|
|
76467
|
-
if (arrays.some(function(arr) {
|
|
76468
|
-
return getType(arr) === "nil";
|
|
76469
|
-
})) {
|
|
76470
|
-
return null;
|
|
76471
|
-
}
|
|
76472
|
-
var f = function(a, b) {
|
|
76473
|
-
return (_instance = []).concat.apply(_instance, _to_consumable_array(a.map(function(d) {
|
|
76474
|
-
return b.map(function(e) {
|
|
76475
|
-
return [].concat(d, e);
|
|
76476
|
-
});
|
|
76477
|
-
})));
|
|
76478
|
-
};
|
|
76479
|
-
var cartesian = function(a, b) {
|
|
76480
|
-
for(var _len = arguments.length, c = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
76481
|
-
c[_key - 2] = arguments[_key];
|
|
76482
|
-
}
|
|
76483
|
-
return b ? cartesian.apply(void 0, [
|
|
76484
|
-
f(a, b)
|
|
76485
|
-
].concat(_to_consumable_array(c))) : a || [];
|
|
76486
|
-
};
|
|
76487
|
-
return cartesian.apply(void 0, _to_consumable_array(arrays));
|
|
76488
|
-
}
|
|
76489
76536
|
function coalecenseTypes(a, b) {
|
|
76490
76537
|
if (!b) {
|
|
76491
76538
|
return a.type;
|
|
@@ -76547,15 +76594,24 @@ function parseString(str) {
|
|
|
76547
76594
|
if (str.endsWith('"')) {
|
|
76548
76595
|
str = str.slice(0, -1);
|
|
76549
76596
|
}
|
|
76550
|
-
return str.replace(/(\\")|(\\\\)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring) {
|
|
76597
|
+
return str.replace(/(\\")|(\\\\)|(\\n)|(\\r)|(\\t)|(\\u[a-fA-F0-9]{5,6})|((?:\\u[a-fA-F0-9]{1,4})+)/ig, function(substring) {
|
|
76551
76598
|
for(var _len = arguments.length, groups = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
76552
76599
|
groups[_key - 1] = arguments[_key];
|
|
76553
76600
|
}
|
|
76554
|
-
var _groups = _sliced_to_array(groups,
|
|
76601
|
+
var _groups = _sliced_to_array(groups, 7), quotes = _groups[0], backslash = _groups[1], newline = _groups[2], carriageReturn = _groups[3], tab = _groups[4], codePoint = _groups[5], charCodes = _groups[6];
|
|
76555
76602
|
if (quotes) {
|
|
76556
76603
|
return '"';
|
|
76557
76604
|
}
|
|
76558
|
-
if (
|
|
76605
|
+
if (newline) {
|
|
76606
|
+
return "\n";
|
|
76607
|
+
}
|
|
76608
|
+
if (carriageReturn) {
|
|
76609
|
+
return "\r";
|
|
76610
|
+
}
|
|
76611
|
+
if (tab) {
|
|
76612
|
+
return " ";
|
|
76613
|
+
}
|
|
76614
|
+
if (backslash) {
|
|
76559
76615
|
return "\\";
|
|
76560
76616
|
}
|
|
76561
76617
|
var escapePattern = /\\u([a-fA-F0-9]+)/ig;
|