camunda-bpmn-js 3.3.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/properties-panel.css +1 -1
- package/dist/base-modeler.development.js +233 -53
- package/dist/base-modeler.production.min.js +33 -33
- package/dist/base-navigated-viewer.development.js +3 -0
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +2 -0
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +920 -1779
- package/dist/camunda-cloud-modeler.production.min.js +46 -46
- package/dist/camunda-cloud-navigated-viewer.development.js +3 -0
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +2 -0
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +229 -49
- package/dist/camunda-platform-modeler.production.min.js +33 -33
- package/dist/camunda-platform-navigated-viewer.development.js +3 -0
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +2 -0
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/package.json +20 -19
|
@@ -3829,10 +3829,7 @@
|
|
|
3829
3829
|
if (typeof f == "function") {
|
|
3830
3830
|
var a = function a () {
|
|
3831
3831
|
if (this instanceof a) {
|
|
3832
|
-
|
|
3833
|
-
args.push.apply(args, arguments);
|
|
3834
|
-
var Ctor = Function.bind.apply(f, args);
|
|
3835
|
-
return new Ctor();
|
|
3832
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
3836
3833
|
}
|
|
3837
3834
|
return f.apply(this, arguments);
|
|
3838
3835
|
};
|
|
@@ -8845,7 +8842,7 @@
|
|
|
8845
8842
|
*
|
|
8846
8843
|
* @return {Object} the parsed name
|
|
8847
8844
|
*/
|
|
8848
|
-
function parseName$
|
|
8845
|
+
function parseName$3(name, defaultPrefix) {
|
|
8849
8846
|
var parts = name.split(/:/),
|
|
8850
8847
|
localName, prefix;
|
|
8851
8848
|
|
|
@@ -8979,8 +8976,8 @@
|
|
|
8979
8976
|
var nsPrefix = p.ns.prefix;
|
|
8980
8977
|
var parts = targetPropertyName.split('#');
|
|
8981
8978
|
|
|
8982
|
-
var name = parseName$
|
|
8983
|
-
var attrName = parseName$
|
|
8979
|
+
var name = parseName$3(parts[0], nsPrefix);
|
|
8980
|
+
var attrName = parseName$3(parts[1], name.prefix).name;
|
|
8984
8981
|
|
|
8985
8982
|
var redefinedProperty = this.propertiesByName[attrName];
|
|
8986
8983
|
if (!redefinedProperty) {
|
|
@@ -9153,7 +9150,7 @@
|
|
|
9153
9150
|
meta: assign$2((type.meta || {}))
|
|
9154
9151
|
});
|
|
9155
9152
|
|
|
9156
|
-
var ns = parseName$
|
|
9153
|
+
var ns = parseName$3(type.name, pkg.prefix),
|
|
9157
9154
|
name = ns.name,
|
|
9158
9155
|
propertiesByName = {};
|
|
9159
9156
|
|
|
@@ -9161,12 +9158,12 @@
|
|
|
9161
9158
|
forEach$2(type.properties, bind$2(function(p) {
|
|
9162
9159
|
|
|
9163
9160
|
// namespace property names
|
|
9164
|
-
var propertyNs = parseName$
|
|
9161
|
+
var propertyNs = parseName$3(p.name, ns.prefix),
|
|
9165
9162
|
propertyName = propertyNs.name;
|
|
9166
9163
|
|
|
9167
9164
|
// namespace property types
|
|
9168
9165
|
if (!isBuiltIn$1(p.type)) {
|
|
9169
|
-
p.type = parseName$
|
|
9166
|
+
p.type = parseName$3(p.type, propertyNs.prefix).name;
|
|
9170
9167
|
}
|
|
9171
9168
|
|
|
9172
9169
|
assign$2(p, {
|
|
@@ -9230,7 +9227,7 @@
|
|
|
9230
9227
|
* @param {Boolean} [trait=false]
|
|
9231
9228
|
*/
|
|
9232
9229
|
function traverseSuper(cls, trait) {
|
|
9233
|
-
var parentNs = parseName$
|
|
9230
|
+
var parentNs = parseName$3(cls, isBuiltIn$1(cls) ? '' : nsName.prefix);
|
|
9234
9231
|
self.mapTypes(parentNs, iterator, trait);
|
|
9235
9232
|
}
|
|
9236
9233
|
|
|
@@ -9256,7 +9253,7 @@
|
|
|
9256
9253
|
*/
|
|
9257
9254
|
Registry$1.prototype.getEffectiveDescriptor = function(name) {
|
|
9258
9255
|
|
|
9259
|
-
var nsName = parseName$
|
|
9256
|
+
var nsName = parseName$3(name);
|
|
9260
9257
|
|
|
9261
9258
|
var builder = new DescriptorBuilder$1(nsName);
|
|
9262
9259
|
|
|
@@ -9542,7 +9539,7 @@
|
|
|
9542
9539
|
*/
|
|
9543
9540
|
Moddle$1.prototype.createAny = function(name, nsUri, properties) {
|
|
9544
9541
|
|
|
9545
|
-
var nameNs = parseName$
|
|
9542
|
+
var nameNs = parseName$3(name);
|
|
9546
9543
|
|
|
9547
9544
|
var element = {
|
|
9548
9545
|
$type: name,
|
|
@@ -10766,7 +10763,7 @@
|
|
|
10766
10763
|
|
|
10767
10764
|
function normalizeXsiTypeName$1(name, model) {
|
|
10768
10765
|
|
|
10769
|
-
var nameNs = parseName$
|
|
10766
|
+
var nameNs = parseName$3(name);
|
|
10770
10767
|
var pkg = model.getPackage(nameNs.prefix);
|
|
10771
10768
|
|
|
10772
10769
|
return prefixedToName$1(nameNs, pkg);
|
|
@@ -10797,7 +10794,7 @@
|
|
|
10797
10794
|
* @param {ElementHandler} options.rootHandler the root handler for parsing a document
|
|
10798
10795
|
* @param {boolean} [options.lax=false] whether or not to ignore invalid elements
|
|
10799
10796
|
*/
|
|
10800
|
-
function Context$
|
|
10797
|
+
function Context$3(options) {
|
|
10801
10798
|
|
|
10802
10799
|
/**
|
|
10803
10800
|
* @property {ElementHandler} rootHandler
|
|
@@ -11060,7 +11057,7 @@
|
|
|
11060
11057
|
value = coerceType$1(prop.type, value);
|
|
11061
11058
|
} else
|
|
11062
11059
|
if (name !== 'xmlns') {
|
|
11063
|
-
propNameNs = parseName$
|
|
11060
|
+
propNameNs = parseName$3(name, descriptor.ns.prefix);
|
|
11064
11061
|
|
|
11065
11062
|
// check whether attribute is defined in a well-known namespace
|
|
11066
11063
|
// if that is the case we emit a warning to indicate potential misuse
|
|
@@ -11085,7 +11082,7 @@
|
|
|
11085
11082
|
ElementHandler$1.prototype.getPropertyForNode = function(node) {
|
|
11086
11083
|
|
|
11087
11084
|
var name = node.name;
|
|
11088
|
-
var nameNs = parseName$
|
|
11085
|
+
var nameNs = parseName$3(name);
|
|
11089
11086
|
|
|
11090
11087
|
var type = this.type,
|
|
11091
11088
|
model = this.model,
|
|
@@ -11243,7 +11240,7 @@
|
|
|
11243
11240
|
RootElementHandler$1.prototype.createElement = function(node) {
|
|
11244
11241
|
|
|
11245
11242
|
var name = node.name,
|
|
11246
|
-
nameNs = parseName$
|
|
11243
|
+
nameNs = parseName$3(name),
|
|
11247
11244
|
model = this.model,
|
|
11248
11245
|
type = this.type,
|
|
11249
11246
|
pkg = model.getPackage(nameNs.prefix),
|
|
@@ -11271,7 +11268,7 @@
|
|
|
11271
11268
|
GenericElementHandler$1.prototype.createElement = function(node) {
|
|
11272
11269
|
|
|
11273
11270
|
var name = node.name,
|
|
11274
|
-
ns = parseName$
|
|
11271
|
+
ns = parseName$3(name),
|
|
11275
11272
|
prefix = ns.prefix,
|
|
11276
11273
|
uri = node.ns[prefix + '$uri'],
|
|
11277
11274
|
attributes = node.attributes;
|
|
@@ -11374,7 +11371,7 @@
|
|
|
11374
11371
|
var model = this.model,
|
|
11375
11372
|
lax = this.lax;
|
|
11376
11373
|
|
|
11377
|
-
var context = new Context$
|
|
11374
|
+
var context = new Context$3(assign$2({}, options, { rootHandler: rootHandler })),
|
|
11378
11375
|
parser = new Parser$2({ proxy: true }),
|
|
11379
11376
|
stack = createStack$1();
|
|
11380
11377
|
|
|
@@ -11988,7 +11985,7 @@
|
|
|
11988
11985
|
var ns;
|
|
11989
11986
|
|
|
11990
11987
|
if (isString$2(element)) {
|
|
11991
|
-
ns = parseName$
|
|
11988
|
+
ns = parseName$3(element);
|
|
11992
11989
|
} else {
|
|
11993
11990
|
ns = element.ns;
|
|
11994
11991
|
}
|
|
@@ -12046,7 +12043,7 @@
|
|
|
12046
12043
|
ElementSerializer$1.prototype.parseNsAttribute = function(element, name, value) {
|
|
12047
12044
|
var model = element.$model;
|
|
12048
12045
|
|
|
12049
|
-
var nameNs = parseName$
|
|
12046
|
+
var nameNs = parseName$3(name);
|
|
12050
12047
|
|
|
12051
12048
|
var ns;
|
|
12052
12049
|
|
|
@@ -17002,6 +16999,7 @@
|
|
|
17002
16999
|
*/
|
|
17003
17000
|
|
|
17004
17001
|
|
|
17002
|
+
|
|
17005
17003
|
// inlined ../../resources/logo.svg
|
|
17006
17004
|
var BPMNIO_LOGO_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';
|
|
17007
17005
|
|
|
@@ -29163,7 +29161,7 @@
|
|
|
29163
29161
|
* @typedef { 'top' | 'right' | 'bottom' | 'left' | 'center' | 'middle' } Alignment
|
|
29164
29162
|
*/
|
|
29165
29163
|
|
|
29166
|
-
function last$
|
|
29164
|
+
function last$2(arr) {
|
|
29167
29165
|
return arr && arr[arr.length - 1];
|
|
29168
29166
|
}
|
|
29169
29167
|
|
|
@@ -29262,7 +29260,7 @@
|
|
|
29262
29260
|
alignment[type] = sortedElements[0][axis];
|
|
29263
29261
|
|
|
29264
29262
|
} else if (this._isType(type, [ 'right', 'bottom' ])) {
|
|
29265
|
-
lastElement = last$
|
|
29263
|
+
lastElement = last$2(sortedElements);
|
|
29266
29264
|
|
|
29267
29265
|
alignment[type] = lastElement[axis] + lastElement[dimension];
|
|
29268
29266
|
|
|
@@ -29292,7 +29290,7 @@
|
|
|
29292
29290
|
});
|
|
29293
29291
|
|
|
29294
29292
|
if (hasSharedCenters) {
|
|
29295
|
-
alignment[type] = last$
|
|
29293
|
+
alignment[type] = last$2(centeredElements).center;
|
|
29296
29294
|
|
|
29297
29295
|
return alignment;
|
|
29298
29296
|
}
|
|
@@ -29303,7 +29301,7 @@
|
|
|
29303
29301
|
return element[axis] + element[dimension];
|
|
29304
29302
|
});
|
|
29305
29303
|
|
|
29306
|
-
lastElement = last$
|
|
29304
|
+
lastElement = last$2(sortedElements);
|
|
29307
29305
|
|
|
29308
29306
|
alignment[type] = getMiddleOrTop(firstElement, lastElement);
|
|
29309
29307
|
}
|
|
@@ -51907,7 +51905,7 @@
|
|
|
51907
51905
|
|
|
51908
51906
|
// during connect user might move mouse out of canvas
|
|
51909
51907
|
// https://github.com/bpmn-io/bpmn-js/issues/1033
|
|
51910
|
-
if (getRootElement$
|
|
51908
|
+
if (getRootElement$3(source) && !getRootElement$3(target)) {
|
|
51911
51909
|
return false;
|
|
51912
51910
|
}
|
|
51913
51911
|
|
|
@@ -52019,7 +52017,7 @@
|
|
|
52019
52017
|
*
|
|
52020
52018
|
* @return {Element|null}
|
|
52021
52019
|
*/
|
|
52022
|
-
function getRootElement$
|
|
52020
|
+
function getRootElement$3(element) {
|
|
52023
52021
|
return getParent$1(element, 'bpmn:Process') || getParent$1(element, 'bpmn:Collaboration');
|
|
52024
52022
|
}
|
|
52025
52023
|
|
|
@@ -52505,6 +52503,7 @@
|
|
|
52505
52503
|
* @typedef {import('../../util/Types').Rect} Rect
|
|
52506
52504
|
*/
|
|
52507
52505
|
|
|
52506
|
+
|
|
52508
52507
|
/**
|
|
52509
52508
|
* Return direction given axis and delta.
|
|
52510
52509
|
*
|
|
@@ -60406,6 +60405,7 @@
|
|
|
60406
60405
|
*/
|
|
60407
60406
|
|
|
60408
60407
|
|
|
60408
|
+
|
|
60409
60409
|
/**
|
|
60410
60410
|
* A base connection layouter implementation
|
|
60411
60411
|
* that layouts the connection by directly connecting
|
|
@@ -63465,7 +63465,7 @@
|
|
|
63465
63465
|
});
|
|
63466
63466
|
|
|
63467
63467
|
keyboard && keyboard.addListener(HIGH_PRIORITY$9, function(e) {
|
|
63468
|
-
if (!isSpace$
|
|
63468
|
+
if (!isSpace$2(e.keyEvent) || self.isActive()) {
|
|
63469
63469
|
return;
|
|
63470
63470
|
}
|
|
63471
63471
|
|
|
@@ -63475,7 +63475,7 @@
|
|
|
63475
63475
|
}, 'keyboard.keydown');
|
|
63476
63476
|
|
|
63477
63477
|
keyboard && keyboard.addListener(HIGH_PRIORITY$9, function(e) {
|
|
63478
|
-
if (!isSpace$
|
|
63478
|
+
if (!isSpace$2(e.keyEvent) || !self.isActive()) {
|
|
63479
63479
|
return;
|
|
63480
63480
|
}
|
|
63481
63481
|
|
|
@@ -63584,7 +63584,7 @@
|
|
|
63584
63584
|
|
|
63585
63585
|
// helpers //////////
|
|
63586
63586
|
|
|
63587
|
-
function isSpace$
|
|
63587
|
+
function isSpace$2(keyEvent) {
|
|
63588
63588
|
return isKey$1('Space', keyEvent);
|
|
63589
63589
|
}
|
|
63590
63590
|
|
|
@@ -73315,6 +73315,7 @@
|
|
|
73315
73315
|
* @private
|
|
73316
73316
|
*/
|
|
73317
73317
|
|
|
73318
|
+
|
|
73318
73319
|
function normalizeZone(input, defaultZone) {
|
|
73319
73320
|
if (isUndefined$2(input) || input === null) {
|
|
73320
73321
|
return defaultZone;
|
|
@@ -73486,6 +73487,7 @@
|
|
|
73486
73487
|
it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.
|
|
73487
73488
|
*/
|
|
73488
73489
|
|
|
73490
|
+
|
|
73489
73491
|
/**
|
|
73490
73492
|
* @private
|
|
73491
73493
|
*/
|
|
@@ -79397,68 +79399,68 @@
|
|
|
79397
79399
|
}
|
|
79398
79400
|
|
|
79399
79401
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
79400
|
-
const propertyIdentifier$
|
|
79401
|
-
identifier$
|
|
79402
|
-
nameIdentifier$
|
|
79403
|
-
insertSemi$
|
|
79404
|
-
expression0$
|
|
79405
|
-
ForExpression$
|
|
79406
|
-
forExpressionStart$
|
|
79407
|
-
ForInExpression$
|
|
79408
|
-
Name$
|
|
79409
|
-
Identifier$
|
|
79410
|
-
AdditionalIdentifier$
|
|
79411
|
-
forExpressionBodyStart$
|
|
79412
|
-
IfExpression$
|
|
79413
|
-
ifExpressionStart$
|
|
79414
|
-
QuantifiedExpression$
|
|
79415
|
-
quantifiedExpressionStart$
|
|
79416
|
-
QuantifiedInExpression$
|
|
79417
|
-
PositiveUnaryTest$
|
|
79418
|
-
ArithmeticExpression$
|
|
79419
|
-
arithmeticPlusStart$
|
|
79420
|
-
arithmeticTimesStart$
|
|
79421
|
-
arithmeticExpStart$
|
|
79422
|
-
arithmeticUnaryStart$
|
|
79423
|
-
VariableName$
|
|
79424
|
-
PathExpression$
|
|
79425
|
-
pathExpressionStart$
|
|
79426
|
-
FilterExpression$
|
|
79427
|
-
filterExpressionStart$
|
|
79428
|
-
FunctionInvocation$
|
|
79429
|
-
functionInvocationStart$
|
|
79430
|
-
ParameterName$
|
|
79431
|
-
nil$
|
|
79432
|
-
NumericLiteral$
|
|
79433
|
-
StringLiteral$
|
|
79434
|
-
BooleanLiteral$
|
|
79435
|
-
List$
|
|
79436
|
-
listStart$
|
|
79437
|
-
FunctionDefinition$
|
|
79438
|
-
functionDefinitionStart$
|
|
79439
|
-
Context$
|
|
79440
|
-
contextStart$
|
|
79441
|
-
ContextEntry$
|
|
79442
|
-
PropertyName$
|
|
79443
|
-
PropertyIdentifier$
|
|
79402
|
+
const propertyIdentifier$1 = 120,
|
|
79403
|
+
identifier$1 = 121,
|
|
79404
|
+
nameIdentifier$1 = 122,
|
|
79405
|
+
insertSemi$1 = 123,
|
|
79406
|
+
expression0$1 = 127,
|
|
79407
|
+
ForExpression$1 = 4,
|
|
79408
|
+
forExpressionStart$1 = 130,
|
|
79409
|
+
ForInExpression$1 = 7,
|
|
79410
|
+
Name$1 = 8,
|
|
79411
|
+
Identifier$1 = 9,
|
|
79412
|
+
AdditionalIdentifier$1 = 10,
|
|
79413
|
+
forExpressionBodyStart$1 = 138,
|
|
79414
|
+
IfExpression$1 = 19,
|
|
79415
|
+
ifExpressionStart$1 = 139,
|
|
79416
|
+
QuantifiedExpression$1 = 23,
|
|
79417
|
+
quantifiedExpressionStart$1 = 140,
|
|
79418
|
+
QuantifiedInExpression$1 = 27,
|
|
79419
|
+
PositiveUnaryTest$1 = 37,
|
|
79420
|
+
ArithmeticExpression$1 = 41,
|
|
79421
|
+
arithmeticPlusStart$1 = 144,
|
|
79422
|
+
arithmeticTimesStart$1 = 145,
|
|
79423
|
+
arithmeticExpStart$1 = 146,
|
|
79424
|
+
arithmeticUnaryStart$1 = 147,
|
|
79425
|
+
VariableName$1 = 47,
|
|
79426
|
+
PathExpression$1 = 67,
|
|
79427
|
+
pathExpressionStart$1 = 152,
|
|
79428
|
+
FilterExpression$1 = 69,
|
|
79429
|
+
filterExpressionStart$1 = 153,
|
|
79430
|
+
FunctionInvocation$1 = 71,
|
|
79431
|
+
functionInvocationStart$1 = 154,
|
|
79432
|
+
ParameterName$1 = 75,
|
|
79433
|
+
nil$1 = 159,
|
|
79434
|
+
NumericLiteral$1 = 78,
|
|
79435
|
+
StringLiteral$1 = 79,
|
|
79436
|
+
BooleanLiteral$1 = 80,
|
|
79437
|
+
List$1 = 88,
|
|
79438
|
+
listStart$1 = 170,
|
|
79439
|
+
FunctionDefinition$1 = 89,
|
|
79440
|
+
functionDefinitionStart$1 = 172,
|
|
79441
|
+
Context$2 = 96,
|
|
79442
|
+
contextStart$1 = 174,
|
|
79443
|
+
ContextEntry$1 = 97,
|
|
79444
|
+
PropertyName$1 = 99,
|
|
79445
|
+
PropertyIdentifier$1 = 100;
|
|
79444
79446
|
|
|
79445
79447
|
/* global console,process */
|
|
79446
79448
|
|
|
79447
|
-
const LOG_PARSE$
|
|
79448
|
-
const LOG_PARSE_DEBUG$
|
|
79449
|
-
const LOG_VARS$
|
|
79449
|
+
const LOG_PARSE$1 = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
79450
|
+
const LOG_PARSE_DEBUG$1 = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
79451
|
+
const LOG_VARS$1 = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
79450
79452
|
|
|
79451
|
-
const spaceChars$
|
|
79453
|
+
const spaceChars$1 = [
|
|
79452
79454
|
9, 11, 12, 32, 133, 160,
|
|
79453
79455
|
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
79454
79456
|
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
79455
79457
|
];
|
|
79456
79458
|
|
|
79457
|
-
const newlineChars$
|
|
79459
|
+
const newlineChars$1 = chars$2('\n\r');
|
|
79458
79460
|
|
|
79459
79461
|
const asterix = '*'.charCodeAt(0);
|
|
79460
79462
|
|
|
79461
|
-
const additionalNameChars$
|
|
79463
|
+
const additionalNameChars$1 = chars$2("'./-+*^");
|
|
79462
79464
|
|
|
79463
79465
|
/**
|
|
79464
79466
|
* @typedef { VariableContext | any } ContextValue
|
|
@@ -79468,7 +79470,7 @@
|
|
|
79468
79470
|
* @param { string } str
|
|
79469
79471
|
* @return { number[] }
|
|
79470
79472
|
*/
|
|
79471
|
-
function chars$
|
|
79473
|
+
function chars$2(str) {
|
|
79472
79474
|
return Array.from(str).map(s => s.charCodeAt(0));
|
|
79473
79475
|
}
|
|
79474
79476
|
|
|
@@ -79476,7 +79478,7 @@
|
|
|
79476
79478
|
* @param { number } ch
|
|
79477
79479
|
* @return { boolean }
|
|
79478
79480
|
*/
|
|
79479
|
-
function isStartChar$
|
|
79481
|
+
function isStartChar$1(ch) {
|
|
79480
79482
|
return (
|
|
79481
79483
|
ch === 63 // ?
|
|
79482
79484
|
) || (
|
|
@@ -79486,7 +79488,7 @@
|
|
|
79486
79488
|
) || (
|
|
79487
79489
|
ch >= 97 && ch <= 122 // a-z
|
|
79488
79490
|
) || (
|
|
79489
|
-
ch >= 161 && !isPartChar$
|
|
79491
|
+
ch >= 161 && !isPartChar$1(ch) && !isSpace$1(ch)
|
|
79490
79492
|
);
|
|
79491
79493
|
}
|
|
79492
79494
|
|
|
@@ -79494,15 +79496,15 @@
|
|
|
79494
79496
|
* @param { number } ch
|
|
79495
79497
|
* @return { boolean }
|
|
79496
79498
|
*/
|
|
79497
|
-
function isAdditional$
|
|
79498
|
-
return additionalNameChars$
|
|
79499
|
+
function isAdditional$1(ch) {
|
|
79500
|
+
return additionalNameChars$1.includes(ch);
|
|
79499
79501
|
}
|
|
79500
79502
|
|
|
79501
79503
|
/**
|
|
79502
79504
|
* @param { number } ch
|
|
79503
79505
|
* @return { boolean }
|
|
79504
79506
|
*/
|
|
79505
|
-
function isPartChar$
|
|
79507
|
+
function isPartChar$1(ch) {
|
|
79506
79508
|
return (
|
|
79507
79509
|
ch >= 48 && ch <= 57 // 0-9
|
|
79508
79510
|
) || (
|
|
@@ -79518,12 +79520,12 @@
|
|
|
79518
79520
|
* @param { number } ch
|
|
79519
79521
|
* @return { boolean }
|
|
79520
79522
|
*/
|
|
79521
|
-
function isSpace$
|
|
79522
|
-
return spaceChars$
|
|
79523
|
+
function isSpace$1(ch) {
|
|
79524
|
+
return spaceChars$1.includes(ch);
|
|
79523
79525
|
}
|
|
79524
79526
|
|
|
79525
79527
|
// eslint-disable-next-line
|
|
79526
|
-
function indent$
|
|
79528
|
+
function indent$1(str, spaces) {
|
|
79527
79529
|
return spaces.concat(
|
|
79528
79530
|
str.split(/\n/g).join('\n' + spaces)
|
|
79529
79531
|
);
|
|
@@ -79535,7 +79537,7 @@
|
|
|
79535
79537
|
*
|
|
79536
79538
|
* @return { { token: string, offset: number } | null }
|
|
79537
79539
|
*/
|
|
79538
|
-
function parseAdditionalSymbol$
|
|
79540
|
+
function parseAdditionalSymbol$1(input, offset = 0) {
|
|
79539
79541
|
|
|
79540
79542
|
const next = input.peek(offset);
|
|
79541
79543
|
|
|
@@ -79547,7 +79549,7 @@
|
|
|
79547
79549
|
};
|
|
79548
79550
|
}
|
|
79549
79551
|
|
|
79550
|
-
if (isAdditional$
|
|
79552
|
+
if (isAdditional$1(next)) {
|
|
79551
79553
|
return {
|
|
79552
79554
|
offset: 1,
|
|
79553
79555
|
token: String.fromCharCode(next)
|
|
@@ -79564,11 +79566,11 @@
|
|
|
79564
79566
|
*
|
|
79565
79567
|
* @return { { token: string, offset: number } | null }
|
|
79566
79568
|
*/
|
|
79567
|
-
function parseIdentifier$
|
|
79569
|
+
function parseIdentifier$1(input, offset = 0, namePart = false) {
|
|
79568
79570
|
for (let inside = false, chars = [], i = 0;; i++) {
|
|
79569
79571
|
const next = input.peek(offset + i);
|
|
79570
79572
|
|
|
79571
|
-
if (isStartChar$
|
|
79573
|
+
if (isStartChar$1(next) || ((inside || namePart) && isPartChar$1(next))) {
|
|
79572
79574
|
if (!inside) {
|
|
79573
79575
|
inside = true;
|
|
79574
79576
|
}
|
|
@@ -79594,12 +79596,12 @@
|
|
|
79594
79596
|
*
|
|
79595
79597
|
* @return { { token: string, offset: number } | null }
|
|
79596
79598
|
*/
|
|
79597
|
-
function parseSpaces$
|
|
79599
|
+
function parseSpaces$1(input, offset) {
|
|
79598
79600
|
|
|
79599
79601
|
for (let inside = false, i = 0;; i++) {
|
|
79600
79602
|
let next = input.peek(offset + i);
|
|
79601
79603
|
|
|
79602
|
-
if (isSpace$
|
|
79604
|
+
if (isSpace$1(next)) {
|
|
79603
79605
|
if (!inside) {
|
|
79604
79606
|
inside = true;
|
|
79605
79607
|
}
|
|
@@ -79624,7 +79626,7 @@
|
|
|
79624
79626
|
*
|
|
79625
79627
|
* @return { { token: string, offset: number, term: number } | null }
|
|
79626
79628
|
*/
|
|
79627
|
-
function parseName$
|
|
79629
|
+
function parseName$2(input, variables) {
|
|
79628
79630
|
const contextKeys = variables.contextKeys();
|
|
79629
79631
|
|
|
79630
79632
|
const start = variables.tokens;
|
|
@@ -79635,9 +79637,9 @@
|
|
|
79635
79637
|
const maybeSpace = tokens.length > 0;
|
|
79636
79638
|
|
|
79637
79639
|
const match = (
|
|
79638
|
-
parseIdentifier$
|
|
79639
|
-
namePart && parseAdditionalSymbol$
|
|
79640
|
-
maybeSpace && parseSpaces$
|
|
79640
|
+
parseIdentifier$1(input, i, namePart) ||
|
|
79641
|
+
namePart && parseAdditionalSymbol$1(input, i) ||
|
|
79642
|
+
maybeSpace && parseSpaces$1(input, i)
|
|
79641
79643
|
);
|
|
79642
79644
|
|
|
79643
79645
|
// match is required
|
|
@@ -79666,11 +79668,11 @@
|
|
|
79666
79668
|
nextMatch = {
|
|
79667
79669
|
token,
|
|
79668
79670
|
offset: token.length,
|
|
79669
|
-
term: nameIdentifier$
|
|
79671
|
+
term: nameIdentifier$1
|
|
79670
79672
|
};
|
|
79671
79673
|
}
|
|
79672
79674
|
|
|
79673
|
-
if (dateTimeIdentifiers$
|
|
79675
|
+
if (dateTimeIdentifiers$1.some(el => el === name)) {
|
|
79674
79676
|
const token = tokens[0];
|
|
79675
79677
|
|
|
79676
79678
|
// parse date time identifiers as normal
|
|
@@ -79680,13 +79682,13 @@
|
|
|
79680
79682
|
nextMatch = {
|
|
79681
79683
|
token,
|
|
79682
79684
|
offset: token.length,
|
|
79683
|
-
term: identifier$
|
|
79685
|
+
term: identifier$1
|
|
79684
79686
|
};
|
|
79685
79687
|
}
|
|
79686
79688
|
|
|
79687
79689
|
if (
|
|
79688
79690
|
!contextKeys.some(el => el.startsWith(name)) &&
|
|
79689
|
-
!dateTimeIdentifiers$
|
|
79691
|
+
!dateTimeIdentifiers$1.some(el => el.startsWith(name))
|
|
79690
79692
|
) {
|
|
79691
79693
|
return nextMatch;
|
|
79692
79694
|
}
|
|
@@ -79694,50 +79696,50 @@
|
|
|
79694
79696
|
|
|
79695
79697
|
}
|
|
79696
79698
|
|
|
79697
|
-
const identifiersMap$
|
|
79698
|
-
[ identifier$
|
|
79699
|
-
[ nameIdentifier$
|
|
79699
|
+
const identifiersMap$1 = {
|
|
79700
|
+
[ identifier$1 ]: 'identifier',
|
|
79701
|
+
[ nameIdentifier$1 ]: 'nameIdentifier'
|
|
79700
79702
|
};
|
|
79701
79703
|
|
|
79702
|
-
const identifiers$
|
|
79704
|
+
const identifiers$1 = new ExternalTokenizer((input, stack) => {
|
|
79703
79705
|
|
|
79704
|
-
LOG_PARSE_DEBUG$
|
|
79706
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
79705
79707
|
|
|
79706
|
-
const nameMatch = parseName$
|
|
79708
|
+
const nameMatch = parseName$2(input, stack.context);
|
|
79707
79709
|
|
|
79708
79710
|
const start = stack.context.tokens;
|
|
79709
79711
|
|
|
79710
|
-
const match = nameMatch || parseIdentifier$
|
|
79712
|
+
const match = nameMatch || parseIdentifier$1(input, 0, start.length > 0);
|
|
79711
79713
|
|
|
79712
79714
|
if (match) {
|
|
79713
79715
|
input.advance(match.offset);
|
|
79714
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier$
|
|
79716
|
+
input.acceptToken(nameMatch ? nameMatch.term : identifier$1);
|
|
79715
79717
|
|
|
79716
|
-
LOG_PARSE$
|
|
79718
|
+
LOG_PARSE$1 && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap$1[nameMatch.term] : 'identifier', match.token);
|
|
79717
79719
|
}
|
|
79718
79720
|
}, { contextual: true });
|
|
79719
79721
|
|
|
79720
79722
|
|
|
79721
|
-
const propertyIdentifiers$
|
|
79723
|
+
const propertyIdentifiers$1 = new ExternalTokenizer((input, stack) => {
|
|
79722
79724
|
|
|
79723
|
-
LOG_PARSE_DEBUG$
|
|
79725
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
79724
79726
|
|
|
79725
79727
|
const start = stack.context.tokens;
|
|
79726
79728
|
|
|
79727
|
-
const match = parseIdentifier$
|
|
79729
|
+
const match = parseIdentifier$1(input, 0, start.length > 0);
|
|
79728
79730
|
|
|
79729
79731
|
if (match) {
|
|
79730
79732
|
input.advance(match.offset);
|
|
79731
|
-
input.acceptToken(propertyIdentifier$
|
|
79733
|
+
input.acceptToken(propertyIdentifier$1);
|
|
79732
79734
|
|
|
79733
|
-
LOG_PARSE$
|
|
79735
|
+
LOG_PARSE$1 && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
79734
79736
|
}
|
|
79735
79737
|
});
|
|
79736
79738
|
|
|
79737
79739
|
|
|
79738
|
-
const insertSemicolon$
|
|
79740
|
+
const insertSemicolon$1 = new ExternalTokenizer((input, stack) => {
|
|
79739
79741
|
|
|
79740
|
-
LOG_PARSE_DEBUG$
|
|
79742
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <insertSemi>', input.pos);
|
|
79741
79743
|
|
|
79742
79744
|
let offset;
|
|
79743
79745
|
let insert = false;
|
|
@@ -79745,11 +79747,11 @@
|
|
|
79745
79747
|
for (offset = 0;; offset++) {
|
|
79746
79748
|
const char = input.peek(offset);
|
|
79747
79749
|
|
|
79748
|
-
if (spaceChars$
|
|
79750
|
+
if (spaceChars$1.includes(char)) {
|
|
79749
79751
|
continue;
|
|
79750
79752
|
}
|
|
79751
79753
|
|
|
79752
|
-
if (newlineChars$
|
|
79754
|
+
if (newlineChars$1.includes(char)) {
|
|
79753
79755
|
insert = true;
|
|
79754
79756
|
}
|
|
79755
79757
|
|
|
@@ -79758,47 +79760,47 @@
|
|
|
79758
79760
|
|
|
79759
79761
|
if (insert) {
|
|
79760
79762
|
|
|
79761
|
-
const identifier = parseIdentifier$
|
|
79762
|
-
const spaces = parseSpaces$
|
|
79763
|
+
const identifier = parseIdentifier$1(input, offset + 1);
|
|
79764
|
+
const spaces = parseSpaces$1(input, offset + 1);
|
|
79763
79765
|
|
|
79764
79766
|
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
79765
79767
|
return;
|
|
79766
79768
|
}
|
|
79767
79769
|
|
|
79768
|
-
LOG_PARSE$
|
|
79769
|
-
input.acceptToken(insertSemi$
|
|
79770
|
+
LOG_PARSE$1 && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
79771
|
+
input.acceptToken(insertSemi$1);
|
|
79770
79772
|
}
|
|
79771
79773
|
});
|
|
79772
79774
|
|
|
79773
|
-
const prefixedContextStarts$
|
|
79774
|
-
[ functionInvocationStart$
|
|
79775
|
-
[ filterExpressionStart$
|
|
79776
|
-
[ pathExpressionStart$
|
|
79775
|
+
const prefixedContextStarts$1 = {
|
|
79776
|
+
[ functionInvocationStart$1 ]: 'FunctionInvocation',
|
|
79777
|
+
[ filterExpressionStart$1 ]: 'FilterExpression',
|
|
79778
|
+
[ pathExpressionStart$1 ]: 'PathExpression'
|
|
79777
79779
|
};
|
|
79778
79780
|
|
|
79779
|
-
const contextStarts$
|
|
79780
|
-
[ contextStart$
|
|
79781
|
-
[ functionDefinitionStart$
|
|
79782
|
-
[ forExpressionStart$
|
|
79783
|
-
[ listStart$
|
|
79784
|
-
[ ifExpressionStart$
|
|
79785
|
-
[ quantifiedExpressionStart$
|
|
79781
|
+
const contextStarts$1 = {
|
|
79782
|
+
[ contextStart$1 ]: 'Context',
|
|
79783
|
+
[ functionDefinitionStart$1 ]: 'FunctionDefinition',
|
|
79784
|
+
[ forExpressionStart$1 ]: 'ForExpression',
|
|
79785
|
+
[ listStart$1 ]: 'List',
|
|
79786
|
+
[ ifExpressionStart$1 ]: 'IfExpression',
|
|
79787
|
+
[ quantifiedExpressionStart$1 ]: 'QuantifiedExpression'
|
|
79786
79788
|
};
|
|
79787
79789
|
|
|
79788
|
-
const contextEnds$
|
|
79789
|
-
[ Context$
|
|
79790
|
-
[ FunctionDefinition$
|
|
79791
|
-
[ ForExpression$
|
|
79792
|
-
[ List$
|
|
79793
|
-
[ IfExpression$
|
|
79794
|
-
[ QuantifiedExpression$
|
|
79795
|
-
[ PathExpression$
|
|
79796
|
-
[ FunctionInvocation$
|
|
79797
|
-
[ FilterExpression$
|
|
79798
|
-
[ ArithmeticExpression$
|
|
79790
|
+
const contextEnds$1 = {
|
|
79791
|
+
[ Context$2 ]: 'Context',
|
|
79792
|
+
[ FunctionDefinition$1 ]: 'FunctionDefinition',
|
|
79793
|
+
[ ForExpression$1 ]: 'ForExpression',
|
|
79794
|
+
[ List$1 ]: 'List',
|
|
79795
|
+
[ IfExpression$1 ]: 'IfExpression',
|
|
79796
|
+
[ QuantifiedExpression$1 ]: 'QuantifiedExpression',
|
|
79797
|
+
[ PathExpression$1 ]: 'PathExpression',
|
|
79798
|
+
[ FunctionInvocation$1 ]: 'FunctionInvocation',
|
|
79799
|
+
[ FilterExpression$1 ]: 'FilterExpression',
|
|
79800
|
+
[ ArithmeticExpression$1 ]: 'ArithmeticExpression'
|
|
79799
79801
|
};
|
|
79800
79802
|
|
|
79801
|
-
let ValueProducer$
|
|
79803
|
+
let ValueProducer$1 = class ValueProducer {
|
|
79802
79804
|
|
|
79803
79805
|
/**
|
|
79804
79806
|
* @param { Function } fn
|
|
@@ -79822,20 +79824,20 @@
|
|
|
79822
79824
|
|
|
79823
79825
|
};
|
|
79824
79826
|
|
|
79825
|
-
const dateTimeLiterals$
|
|
79827
|
+
const dateTimeLiterals$1 = {
|
|
79826
79828
|
'date and time': 1,
|
|
79827
79829
|
'date': 1,
|
|
79828
79830
|
'time': 1,
|
|
79829
79831
|
'duration': 1
|
|
79830
79832
|
};
|
|
79831
79833
|
|
|
79832
|
-
const dateTimeIdentifiers$
|
|
79834
|
+
const dateTimeIdentifiers$1 = Object.keys(dateTimeLiterals$1);
|
|
79833
79835
|
|
|
79834
79836
|
|
|
79835
79837
|
/**
|
|
79836
79838
|
* A basic key-value store to hold context values.
|
|
79837
79839
|
*/
|
|
79838
|
-
|
|
79840
|
+
class VariableContext {
|
|
79839
79841
|
|
|
79840
79842
|
/**
|
|
79841
79843
|
* Creates a new context from a JavaScript object.
|
|
@@ -79902,7 +79904,7 @@
|
|
|
79902
79904
|
static isAtomic(value) {
|
|
79903
79905
|
return !value ||
|
|
79904
79906
|
value instanceof this ||
|
|
79905
|
-
value instanceof ValueProducer$
|
|
79907
|
+
value instanceof ValueProducer$1 ||
|
|
79906
79908
|
typeof value !== 'object';
|
|
79907
79909
|
}
|
|
79908
79910
|
|
|
@@ -79935,9 +79937,9 @@
|
|
|
79935
79937
|
return new this(merged);
|
|
79936
79938
|
}
|
|
79937
79939
|
|
|
79938
|
-
}
|
|
79940
|
+
}
|
|
79939
79941
|
|
|
79940
|
-
let Variables$
|
|
79942
|
+
let Variables$1 = class Variables {
|
|
79941
79943
|
|
|
79942
79944
|
constructor({
|
|
79943
79945
|
name = 'Expressions',
|
|
@@ -79964,7 +79966,7 @@
|
|
|
79964
79966
|
parent: this
|
|
79965
79967
|
});
|
|
79966
79968
|
|
|
79967
|
-
LOG_VARS$
|
|
79969
|
+
LOG_VARS$1 && console.log('[%s] enter', childScope.path, childScope.context);
|
|
79968
79970
|
|
|
79969
79971
|
return childScope;
|
|
79970
79972
|
}
|
|
@@ -79972,19 +79974,19 @@
|
|
|
79972
79974
|
exitScope(str) {
|
|
79973
79975
|
|
|
79974
79976
|
if (!this.parent) {
|
|
79975
|
-
LOG_VARS$
|
|
79977
|
+
LOG_VARS$1 && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent$1(str, ' '));
|
|
79976
79978
|
|
|
79977
79979
|
return this;
|
|
79978
79980
|
}
|
|
79979
79981
|
|
|
79980
|
-
LOG_VARS$
|
|
79982
|
+
LOG_VARS$1 && console.log('[%s] exit %o\n%s', this.path, this.context, indent$1(str, ' '));
|
|
79981
79983
|
|
|
79982
79984
|
return this.parent.pushChild(this);
|
|
79983
79985
|
}
|
|
79984
79986
|
|
|
79985
79987
|
token(part) {
|
|
79986
79988
|
|
|
79987
|
-
LOG_VARS$
|
|
79989
|
+
LOG_VARS$1 && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
79988
79990
|
|
|
79989
79991
|
return this.assign({
|
|
79990
79992
|
tokens: [ ...this.tokens, part ]
|
|
@@ -79993,7 +79995,7 @@
|
|
|
79993
79995
|
|
|
79994
79996
|
literal(value) {
|
|
79995
79997
|
|
|
79996
|
-
LOG_VARS$
|
|
79998
|
+
LOG_VARS$1 && console.log('[%s] literal %o', this.path, value);
|
|
79997
79999
|
|
|
79998
80000
|
return this.pushChild(this.of({
|
|
79999
80001
|
name: 'Literal',
|
|
@@ -80007,7 +80009,7 @@
|
|
|
80007
80009
|
* @return {any}
|
|
80008
80010
|
*/
|
|
80009
80011
|
computedValue() {
|
|
80010
|
-
for (let scope = this;;scope = last$
|
|
80012
|
+
for (let scope = this;;scope = last$1(scope.children)) {
|
|
80011
80013
|
|
|
80012
80014
|
if (!scope) {
|
|
80013
80015
|
return null;
|
|
@@ -80020,7 +80022,7 @@
|
|
|
80020
80022
|
}
|
|
80021
80023
|
|
|
80022
80024
|
contextKeys() {
|
|
80023
|
-
return this.context.getKeys().map(normalizeContextKey$
|
|
80025
|
+
return this.context.getKeys().map(normalizeContextKey$1);
|
|
80024
80026
|
}
|
|
80025
80027
|
|
|
80026
80028
|
get path() {
|
|
@@ -80035,10 +80037,10 @@
|
|
|
80035
80037
|
*/
|
|
80036
80038
|
get(variable) {
|
|
80037
80039
|
|
|
80038
|
-
const names = [ variable, variable && normalizeContextKey$
|
|
80040
|
+
const names = [ variable, variable && normalizeContextKey$1(variable) ];
|
|
80039
80041
|
|
|
80040
80042
|
const contextKey = this.context.getKeys().find(
|
|
80041
|
-
key => names.includes(normalizeContextKey$
|
|
80043
|
+
key => names.includes(normalizeContextKey$1(key))
|
|
80042
80044
|
);
|
|
80043
80045
|
|
|
80044
80046
|
if (typeof contextKey === 'undefined') {
|
|
@@ -80047,7 +80049,7 @@
|
|
|
80047
80049
|
|
|
80048
80050
|
const val = this.context.get(contextKey);
|
|
80049
80051
|
|
|
80050
|
-
if (val instanceof ValueProducer$
|
|
80052
|
+
if (val instanceof ValueProducer$1) {
|
|
80051
80053
|
return val.get(this);
|
|
80052
80054
|
} else {
|
|
80053
80055
|
return val;
|
|
@@ -80070,7 +80072,7 @@
|
|
|
80070
80072
|
raw: variable
|
|
80071
80073
|
});
|
|
80072
80074
|
|
|
80073
|
-
LOG_VARS$
|
|
80075
|
+
LOG_VARS$1 && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
80074
80076
|
|
|
80075
80077
|
return parentScope.pushChild(variableScope);
|
|
80076
80078
|
}
|
|
@@ -80109,7 +80111,7 @@
|
|
|
80109
80111
|
|
|
80110
80112
|
const variableName = this.tokens.join(' ');
|
|
80111
80113
|
|
|
80112
|
-
LOG_VARS$
|
|
80114
|
+
LOG_VARS$1 && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
80113
80115
|
|
|
80114
80116
|
return this.assign({
|
|
80115
80117
|
tokens: []
|
|
@@ -80124,12 +80126,12 @@
|
|
|
80124
80126
|
define(name, value) {
|
|
80125
80127
|
|
|
80126
80128
|
if (typeof name !== 'string') {
|
|
80127
|
-
LOG_VARS$
|
|
80129
|
+
LOG_VARS$1 && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
80128
80130
|
|
|
80129
80131
|
return this;
|
|
80130
80132
|
}
|
|
80131
80133
|
|
|
80132
|
-
LOG_VARS$
|
|
80134
|
+
LOG_VARS$1 && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
80133
80135
|
|
|
80134
80136
|
const context = this.context.set(name, value);
|
|
80135
80137
|
|
|
@@ -80203,7 +80205,7 @@
|
|
|
80203
80205
|
*
|
|
80204
80206
|
* @return { string } normalizedName
|
|
80205
80207
|
*/
|
|
80206
|
-
function normalizeContextKey$
|
|
80208
|
+
function normalizeContextKey$1(name) {
|
|
80207
80209
|
return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
80208
80210
|
}
|
|
80209
80211
|
|
|
@@ -80215,7 +80217,7 @@
|
|
|
80215
80217
|
* @param { string } code
|
|
80216
80218
|
* @return { Variables }
|
|
80217
80219
|
*/
|
|
80218
|
-
function wrap$
|
|
80220
|
+
function wrap$1(variables, scopeName, code) {
|
|
80219
80221
|
|
|
80220
80222
|
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
80221
80223
|
const children = variables.children.filter(c => c.name === scopeName);
|
|
@@ -80242,9 +80244,9 @@
|
|
|
80242
80244
|
*
|
|
80243
80245
|
* @return { ContextTracker<Variables> }
|
|
80244
80246
|
*/
|
|
80245
|
-
function trackVariables$
|
|
80247
|
+
function trackVariables$1(context = {}, Context = VariableContext) {
|
|
80246
80248
|
|
|
80247
|
-
const start = Variables$
|
|
80249
|
+
const start = Variables$1.of({
|
|
80248
80250
|
context: Context.of(context)
|
|
80249
80251
|
});
|
|
80250
80252
|
|
|
@@ -80252,7 +80254,7 @@
|
|
|
80252
80254
|
start,
|
|
80253
80255
|
reduce(variables, term, stack, input) {
|
|
80254
80256
|
|
|
80255
|
-
if (term === IfExpression$
|
|
80257
|
+
if (term === IfExpression$1) {
|
|
80256
80258
|
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
80257
80259
|
|
|
80258
80260
|
variables = variables.assign({
|
|
@@ -80263,7 +80265,7 @@
|
|
|
80263
80265
|
});
|
|
80264
80266
|
}
|
|
80265
80267
|
|
|
80266
|
-
if (term === List$
|
|
80268
|
+
if (term === List$1) {
|
|
80267
80269
|
variables = variables.assign({
|
|
80268
80270
|
value: Context.of(
|
|
80269
80271
|
...variables.children.map(
|
|
@@ -80273,7 +80275,7 @@
|
|
|
80273
80275
|
});
|
|
80274
80276
|
}
|
|
80275
80277
|
|
|
80276
|
-
if (term === FilterExpression$
|
|
80278
|
+
if (term === FilterExpression$1) {
|
|
80277
80279
|
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
80278
80280
|
|
|
80279
80281
|
variables = variables.assign({
|
|
@@ -80281,7 +80283,7 @@
|
|
|
80281
80283
|
});
|
|
80282
80284
|
}
|
|
80283
80285
|
|
|
80284
|
-
if (term === FunctionInvocation$
|
|
80286
|
+
if (term === FunctionInvocation$1) {
|
|
80285
80287
|
|
|
80286
80288
|
const [
|
|
80287
80289
|
name,
|
|
@@ -80290,17 +80292,17 @@
|
|
|
80290
80292
|
|
|
80291
80293
|
// preserve type information through `get value(context, key)` utility
|
|
80292
80294
|
if (name?.raw === 'get value') {
|
|
80293
|
-
variables = getContextValue$
|
|
80295
|
+
variables = getContextValue$1(variables, args);
|
|
80294
80296
|
}
|
|
80295
80297
|
}
|
|
80296
80298
|
|
|
80297
|
-
const start = contextStarts$
|
|
80299
|
+
const start = contextStarts$1[term];
|
|
80298
80300
|
|
|
80299
80301
|
if (start) {
|
|
80300
80302
|
return variables.enterScope(start);
|
|
80301
80303
|
}
|
|
80302
80304
|
|
|
80303
|
-
const prefixedStart = prefixedContextStarts$
|
|
80305
|
+
const prefixedStart = prefixedContextStarts$1[term];
|
|
80304
80306
|
|
|
80305
80307
|
// pull <expression> into new <prefixedStart> context
|
|
80306
80308
|
if (prefixedStart) {
|
|
@@ -80311,15 +80313,15 @@
|
|
|
80311
80313
|
} = variables;
|
|
80312
80314
|
|
|
80313
80315
|
const children = currentChildren.slice(0, -1);
|
|
80314
|
-
const lastChild = last$
|
|
80316
|
+
const lastChild = last$1(currentChildren);
|
|
80315
80317
|
|
|
80316
80318
|
let newContext = null;
|
|
80317
80319
|
|
|
80318
|
-
if (term === pathExpressionStart$
|
|
80320
|
+
if (term === pathExpressionStart$1) {
|
|
80319
80321
|
newContext = Context.of(lastChild?.computedValue());
|
|
80320
80322
|
}
|
|
80321
80323
|
|
|
80322
|
-
if (term === filterExpressionStart$
|
|
80324
|
+
if (term === filterExpressionStart$1) {
|
|
80323
80325
|
newContext = Context.of(
|
|
80324
80326
|
currentContext,
|
|
80325
80327
|
lastChild?.computedValue()
|
|
@@ -80335,19 +80337,19 @@
|
|
|
80335
80337
|
|
|
80336
80338
|
const code = input.read(input.pos, stack.pos);
|
|
80337
80339
|
|
|
80338
|
-
const end = contextEnds$
|
|
80340
|
+
const end = contextEnds$1[term];
|
|
80339
80341
|
|
|
80340
80342
|
if (end) {
|
|
80341
80343
|
return variables.exitScope(code);
|
|
80342
80344
|
}
|
|
80343
80345
|
|
|
80344
|
-
if (term === ContextEntry$
|
|
80346
|
+
if (term === ContextEntry$1) {
|
|
80345
80347
|
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
80346
80348
|
|
|
80347
80349
|
const name = parts[0];
|
|
80348
|
-
const value = last$
|
|
80350
|
+
const value = last$1(parts);
|
|
80349
80351
|
|
|
80350
|
-
return wrap$
|
|
80352
|
+
return wrap$1(variables, 'ContextEntry', code).assign(
|
|
80351
80353
|
{
|
|
80352
80354
|
value: Context
|
|
80353
80355
|
.of(variables.value)
|
|
@@ -80357,27 +80359,27 @@
|
|
|
80357
80359
|
}
|
|
80358
80360
|
|
|
80359
80361
|
if (
|
|
80360
|
-
term === ForInExpression$
|
|
80361
|
-
term === QuantifiedInExpression$
|
|
80362
|
+
term === ForInExpression$1 ||
|
|
80363
|
+
term === QuantifiedInExpression$1
|
|
80362
80364
|
) {
|
|
80363
|
-
return wrap$
|
|
80365
|
+
return wrap$1(variables, 'InExpression', code);
|
|
80364
80366
|
}
|
|
80365
80367
|
|
|
80366
80368
|
// define <partial> within ForExpression body
|
|
80367
|
-
if (term === forExpressionBodyStart$
|
|
80369
|
+
if (term === forExpressionBodyStart$1) {
|
|
80368
80370
|
|
|
80369
80371
|
return variables.define(
|
|
80370
80372
|
'partial',
|
|
80371
|
-
ValueProducer$
|
|
80372
|
-
return last$
|
|
80373
|
+
ValueProducer$1.of(variables => {
|
|
80374
|
+
return last$1(variables.children)?.computedValue();
|
|
80373
80375
|
})
|
|
80374
80376
|
);
|
|
80375
80377
|
}
|
|
80376
80378
|
|
|
80377
80379
|
if (
|
|
80378
|
-
term === ParameterName$
|
|
80380
|
+
term === ParameterName$1
|
|
80379
80381
|
) {
|
|
80380
|
-
const name = last$
|
|
80382
|
+
const name = last$1(variables.children).computedValue();
|
|
80381
80383
|
|
|
80382
80384
|
// TODO: attach type information
|
|
80383
80385
|
return variables.define(name, 1);
|
|
@@ -80385,71 +80387,71 @@
|
|
|
80385
80387
|
|
|
80386
80388
|
// pull <expression> into ArithmeticExpression child
|
|
80387
80389
|
if (
|
|
80388
|
-
term === arithmeticPlusStart$
|
|
80389
|
-
term === arithmeticTimesStart$
|
|
80390
|
-
term === arithmeticExpStart$
|
|
80390
|
+
term === arithmeticPlusStart$1 ||
|
|
80391
|
+
term === arithmeticTimesStart$1 ||
|
|
80392
|
+
term === arithmeticExpStart$1
|
|
80391
80393
|
) {
|
|
80392
80394
|
const children = variables.children.slice(0, -1);
|
|
80393
|
-
const lastChild = last$
|
|
80395
|
+
const lastChild = last$1(variables.children);
|
|
80394
80396
|
|
|
80395
80397
|
return variables.assign({
|
|
80396
80398
|
children
|
|
80397
80399
|
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
80398
80400
|
}
|
|
80399
80401
|
|
|
80400
|
-
if (term === arithmeticUnaryStart$
|
|
80402
|
+
if (term === arithmeticUnaryStart$1) {
|
|
80401
80403
|
return variables.enterScope('ArithmeticExpression');
|
|
80402
80404
|
}
|
|
80403
80405
|
|
|
80404
80406
|
if (
|
|
80405
|
-
term === Identifier$
|
|
80406
|
-
term === AdditionalIdentifier$
|
|
80407
|
-
term === PropertyIdentifier$
|
|
80407
|
+
term === Identifier$1 ||
|
|
80408
|
+
term === AdditionalIdentifier$1 ||
|
|
80409
|
+
term === PropertyIdentifier$1
|
|
80408
80410
|
) {
|
|
80409
80411
|
return variables.token(code);
|
|
80410
80412
|
}
|
|
80411
80413
|
|
|
80412
80414
|
if (
|
|
80413
|
-
term === StringLiteral$
|
|
80415
|
+
term === StringLiteral$1
|
|
80414
80416
|
) {
|
|
80415
80417
|
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
80416
80418
|
}
|
|
80417
80419
|
|
|
80418
|
-
if (term === BooleanLiteral$
|
|
80420
|
+
if (term === BooleanLiteral$1) {
|
|
80419
80421
|
return variables.literal(code === 'true' ? true : false);
|
|
80420
80422
|
}
|
|
80421
80423
|
|
|
80422
|
-
if (term === NumericLiteral$
|
|
80424
|
+
if (term === NumericLiteral$1) {
|
|
80423
80425
|
return variables.literal(parseFloat(code));
|
|
80424
80426
|
}
|
|
80425
80427
|
|
|
80426
|
-
if (term === nil$
|
|
80428
|
+
if (term === nil$1) {
|
|
80427
80429
|
return variables.literal(null);
|
|
80428
80430
|
}
|
|
80429
80431
|
|
|
80430
80432
|
if (
|
|
80431
|
-
term === VariableName$
|
|
80433
|
+
term === VariableName$1
|
|
80432
80434
|
) {
|
|
80433
80435
|
return variables.resolveName();
|
|
80434
80436
|
}
|
|
80435
80437
|
|
|
80436
80438
|
if (
|
|
80437
|
-
term === Name$
|
|
80438
|
-
term === PropertyName$
|
|
80439
|
+
term === Name$1 ||
|
|
80440
|
+
term === PropertyName$1
|
|
80439
80441
|
) {
|
|
80440
80442
|
return variables.declareName();
|
|
80441
80443
|
}
|
|
80442
80444
|
|
|
80443
80445
|
if (
|
|
80444
|
-
term === expression0$
|
|
80445
|
-
term === PositiveUnaryTest$
|
|
80446
|
+
term === expression0$1 ||
|
|
80447
|
+
term === PositiveUnaryTest$1
|
|
80446
80448
|
) {
|
|
80447
80449
|
if (variables.tokens.length > 0) {
|
|
80448
80450
|
throw new Error('uncleared name');
|
|
80449
80451
|
}
|
|
80450
80452
|
}
|
|
80451
80453
|
|
|
80452
|
-
if (term === expression0$
|
|
80454
|
+
if (term === expression0$1) {
|
|
80453
80455
|
|
|
80454
80456
|
let parent = variables;
|
|
80455
80457
|
|
|
@@ -80465,12 +80467,12 @@
|
|
|
80465
80467
|
});
|
|
80466
80468
|
}
|
|
80467
80469
|
|
|
80468
|
-
const variableTracker$
|
|
80470
|
+
const variableTracker$1 = trackVariables$1({});
|
|
80469
80471
|
|
|
80470
80472
|
|
|
80471
80473
|
// helpers //////////////
|
|
80472
80474
|
|
|
80473
|
-
function getContextValue$
|
|
80475
|
+
function getContextValue$1(variables, args) {
|
|
80474
80476
|
|
|
80475
80477
|
if (!args.length) {
|
|
80476
80478
|
return variables.assign({
|
|
@@ -80479,7 +80481,7 @@
|
|
|
80479
80481
|
}
|
|
80480
80482
|
|
|
80481
80483
|
if (args[0].name === 'Name') {
|
|
80482
|
-
args = extractNamedArgs$
|
|
80484
|
+
args = extractNamedArgs$1(args, [ 'm', 'key' ]);
|
|
80483
80485
|
}
|
|
80484
80486
|
|
|
80485
80487
|
if (args.length !== 2) {
|
|
@@ -80505,13 +80507,13 @@
|
|
|
80505
80507
|
}
|
|
80506
80508
|
|
|
80507
80509
|
return variables.assign({
|
|
80508
|
-
value: [ normalizeContextKey$
|
|
80510
|
+
value: [ normalizeContextKey$1(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
80509
80511
|
return contextValue.get(keyValue) || value;
|
|
80510
80512
|
}, null)
|
|
80511
80513
|
});
|
|
80512
80514
|
}
|
|
80513
80515
|
|
|
80514
|
-
function extractNamedArgs$
|
|
80516
|
+
function extractNamedArgs$1(args, argNames) {
|
|
80515
80517
|
|
|
80516
80518
|
const context = {};
|
|
80517
80519
|
|
|
@@ -80524,11 +80526,11 @@
|
|
|
80524
80526
|
return argNames.map(name => context[name]);
|
|
80525
80527
|
}
|
|
80526
80528
|
|
|
80527
|
-
function last$
|
|
80529
|
+
function last$1(arr) {
|
|
80528
80530
|
return arr[arr.length - 1];
|
|
80529
80531
|
}
|
|
80530
80532
|
|
|
80531
|
-
const feelHighlighting$
|
|
80533
|
+
const feelHighlighting$1 = styleTags({
|
|
80532
80534
|
StringLiteral: tags$1.string,
|
|
80533
80535
|
NumericLiteral: tags$1.number,
|
|
80534
80536
|
BooleanLiteral: tags$1.bool,
|
|
@@ -80561,28 +80563,28 @@
|
|
|
80561
80563
|
});
|
|
80562
80564
|
|
|
80563
80565
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
80564
|
-
const spec_identifier$
|
|
80565
|
-
const parser$
|
|
80566
|
+
const spec_identifier$1 = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:57, or:60, and:64, between:72, instance:86, of:89, days:99, time:101, duration:103, years:105, months:107, date:109, list:115, context:121, function:128, null:154, true:326, false:326, "?":168, external:184, not:209};
|
|
80567
|
+
const parser$3 = LRParser.deserialize({
|
|
80566
80568
|
version: 14,
|
|
80567
80569
|
states: "DSO`QYOOO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQYO'#FPOOQQ'#Fe'#FeO&UQYO'#FeO`QYO'#DVOOQU'#Em'#EmO'rQ^O'#D]OOQO'#Fl'#FlO)oQWO'#DuOOQQ'#D|'#D|OOQQ'#D}'#D}OOQQ'#EO'#EOO)tOWO'#ERO)oQWO'#EPOOQQ'#EP'#EPOOQQ'#Fr'#FrOOQQ'#Fp'#FpOOQQ'#Fw'#FwO,iQYO'#FwO.gQYO'#FwOOQQ'#ET'#ETO`QYO'#EVOOQQ'#FR'#FRO0cQ^O'#FRO2Y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!q[R!saR#y!pQ!wlR#z!p!mdOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%x!m|OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR%{%c!miOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR#}!t!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR$R!w!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$Y$^$_$b$e$r$}%W%d%w%xR#Oo",
|
|
80570
80572
|
nodeNames: "⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",
|
|
80571
80573
|
maxTerm: 176,
|
|
80572
|
-
context: variableTracker$
|
|
80574
|
+
context: variableTracker$1,
|
|
80573
80575
|
nodeProps: [
|
|
80574
80576
|
["closedBy", 38,")",70,"]",95,"}"],
|
|
80575
80577
|
["openedBy", 40,"(",68,"[",94,"{"],
|
|
80576
80578
|
["group", -5,77,78,79,80,81,"Literal"]
|
|
80577
80579
|
],
|
|
80578
|
-
propSources: [feelHighlighting$
|
|
80580
|
+
propSources: [feelHighlighting$1],
|
|
80579
80581
|
skippedNodes: [0,1,2],
|
|
80580
80582
|
repeatNodeCount: 14,
|
|
80581
80583
|
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#q~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#r~~$cP!_!`$f~$kOr~~$pW$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$h~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#z~~&mOv~~&rOx~~&wP^~z{&z~'PO_~~'UO[~~'ZO#}~R'`PZP!`!a'cQ'hO$]Q~'mQ#y~!O!P's!Q!['x~'xO#|~~'}P$g~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$g~!O!P*W!Q![){~*ZP!Q!['x~*cO$Z~~*hO$v~R*oP![QsP!_!`*rP*wOsPR+OP!XQsP!_!`*r~+WO$j~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
80582
|
-
tokenizers: [propertyIdentifiers$
|
|
80584
|
+
tokenizers: [propertyIdentifiers$1, identifiers$1, insertSemicolon$1, 0, 1],
|
|
80583
80585
|
topRules: {"Expression":[0,3],"Expressions":[1,101],"UnaryTests":[2,102]},
|
|
80584
80586
|
dynamicPrecedences: {"31":-1,"71":-1,"73":-1},
|
|
80585
|
-
specialized: [{term: 121, get: value => spec_identifier$
|
|
80587
|
+
specialized: [{term: 121, get: value => spec_identifier$1[value] || -1}],
|
|
80586
80588
|
tokenPrec: 2857
|
|
80587
80589
|
});
|
|
80588
80590
|
|
|
@@ -80785,11 +80787,11 @@
|
|
|
80785
80787
|
if (name in context) {
|
|
80786
80788
|
return context[name];
|
|
80787
80789
|
}
|
|
80788
|
-
const normalizedName = normalizeContextKey$
|
|
80790
|
+
const normalizedName = normalizeContextKey$1(name);
|
|
80789
80791
|
if (normalizedName in context) {
|
|
80790
80792
|
return context[normalizedName];
|
|
80791
80793
|
}
|
|
80792
|
-
const entry = Object.entries(context).find(([key]) => normalizedName === normalizeContextKey$
|
|
80794
|
+
const entry = Object.entries(context).find(([key]) => normalizedName === normalizeContextKey$1(key));
|
|
80793
80795
|
if (entry) {
|
|
80794
80796
|
return entry[1];
|
|
80795
80797
|
}
|
|
@@ -81481,15 +81483,15 @@
|
|
|
81481
81483
|
}
|
|
81482
81484
|
|
|
81483
81485
|
function parseExpression(expression, context = {}) {
|
|
81484
|
-
return parser$
|
|
81486
|
+
return parser$3.configure({
|
|
81485
81487
|
top: 'Expression',
|
|
81486
|
-
contextTracker: trackVariables$
|
|
81488
|
+
contextTracker: trackVariables$1(context)
|
|
81487
81489
|
}).parse(expression);
|
|
81488
81490
|
}
|
|
81489
81491
|
function parseUnaryTests(expression, context = {}) {
|
|
81490
|
-
return parser$
|
|
81492
|
+
return parser$3.configure({
|
|
81491
81493
|
top: 'UnaryTests',
|
|
81492
|
-
contextTracker: trackVariables$
|
|
81494
|
+
contextTracker: trackVariables$1(context)
|
|
81493
81495
|
}).parse(expression);
|
|
81494
81496
|
}
|
|
81495
81497
|
|
|
@@ -81987,7 +81989,7 @@
|
|
|
81987
81989
|
}
|
|
81988
81990
|
return equals$1(test, value);
|
|
81989
81991
|
}
|
|
81990
|
-
const chars$
|
|
81992
|
+
const chars$1 = Array.from('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
|
|
81991
81993
|
function isTyped(type, values) {
|
|
81992
81994
|
return (values.some(e => getType$2(e) === type) &&
|
|
81993
81995
|
values.every(e => e === null || getType$2(e) === type));
|
|
@@ -82106,16 +82108,16 @@
|
|
|
82106
82108
|
return (value) => value === null ? null : tests.every(t => t(value));
|
|
82107
82109
|
}
|
|
82108
82110
|
function createStringRange(start, end, startIncluded = true, endIncluded = true) {
|
|
82109
|
-
if (start !== null && !chars$
|
|
82111
|
+
if (start !== null && !chars$1.includes(start)) {
|
|
82110
82112
|
throw new Error('illegal range start: ' + start);
|
|
82111
82113
|
}
|
|
82112
|
-
if (end !== null && !chars$
|
|
82114
|
+
if (end !== null && !chars$1.includes(end)) {
|
|
82113
82115
|
throw new Error('illegal range end: ' + end);
|
|
82114
82116
|
}
|
|
82115
82117
|
let values;
|
|
82116
82118
|
if (start !== null && end !== null) {
|
|
82117
|
-
let startIdx = chars$
|
|
82118
|
-
let endIdx = chars$
|
|
82119
|
+
let startIdx = chars$1.indexOf(start);
|
|
82120
|
+
let endIdx = chars$1.indexOf(end);
|
|
82119
82121
|
const direction = startIdx > endIdx ? -1 : 1;
|
|
82120
82122
|
if (startIncluded === false) {
|
|
82121
82123
|
startIdx += direction;
|
|
@@ -82123,7 +82125,7 @@
|
|
|
82123
82125
|
if (endIncluded === false) {
|
|
82124
82126
|
endIdx -= direction;
|
|
82125
82127
|
}
|
|
82126
|
-
values = chars$
|
|
82128
|
+
values = chars$1.slice(startIdx, endIdx + 1);
|
|
82127
82129
|
}
|
|
82128
82130
|
const map = values ? valuesMap(values) : noopMap();
|
|
82129
82131
|
const includes = values ? valuesIncludes(values) : anyIncludes(start, end, startIncluded, endIncluded);
|
|
@@ -101803,7 +101805,7 @@
|
|
|
101803
101805
|
Paragraph: tags$1.content
|
|
101804
101806
|
});
|
|
101805
101807
|
/// The default CommonMark parser.
|
|
101806
|
-
const parser$
|
|
101808
|
+
const parser$2 = new MarkdownParser(new NodeSet(nodeTypes).extend(markdownHighlighting), Object.keys(DefaultBlockParsers).map(n => DefaultBlockParsers[n]), Object.keys(DefaultBlockParsers).map(n => DefaultLeafBlocks[n]), Object.keys(DefaultBlockParsers), DefaultEndLeaf, DefaultSkipMarkup, Object.keys(DefaultInline).map(n => DefaultInline[n]), Object.keys(DefaultInline), []);
|
|
101807
101809
|
|
|
101808
101810
|
const StrikethroughDelim = { resolve: "Strikethrough", mark: "StrikethroughMark" };
|
|
101809
101811
|
/// An extension that implements
|
|
@@ -102021,72 +102023,72 @@
|
|
|
102021
102023
|
});
|
|
102022
102024
|
|
|
102023
102025
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
102024
|
-
const propertyIdentifier
|
|
102025
|
-
identifier
|
|
102026
|
-
nameIdentifier
|
|
102027
|
-
insertSemi
|
|
102028
|
-
expression0
|
|
102029
|
-
ForExpression
|
|
102030
|
-
forExpressionStart
|
|
102031
|
-
ForInExpression
|
|
102032
|
-
Name
|
|
102033
|
-
Identifier
|
|
102034
|
-
AdditionalIdentifier
|
|
102035
|
-
forExpressionBodyStart
|
|
102036
|
-
IfExpression
|
|
102037
|
-
ifExpressionStart
|
|
102038
|
-
QuantifiedExpression
|
|
102039
|
-
quantifiedExpressionStart
|
|
102040
|
-
QuantifiedInExpression
|
|
102041
|
-
PositiveUnaryTest
|
|
102042
|
-
ArithmeticExpression
|
|
102043
|
-
arithmeticPlusStart
|
|
102044
|
-
arithmeticTimesStart
|
|
102045
|
-
arithmeticExpStart
|
|
102046
|
-
arithmeticUnaryStart
|
|
102047
|
-
VariableName
|
|
102048
|
-
PathExpression
|
|
102049
|
-
pathExpressionStart
|
|
102050
|
-
FilterExpression
|
|
102051
|
-
filterExpressionStart
|
|
102052
|
-
FunctionInvocation
|
|
102053
|
-
functionInvocationStart
|
|
102054
|
-
ParameterName
|
|
102055
|
-
nil
|
|
102056
|
-
NumericLiteral
|
|
102057
|
-
StringLiteral
|
|
102058
|
-
BooleanLiteral
|
|
102059
|
-
List
|
|
102060
|
-
listStart
|
|
102061
|
-
FunctionDefinition
|
|
102062
|
-
functionDefinitionStart
|
|
102063
|
-
Context$
|
|
102064
|
-
contextStart
|
|
102065
|
-
ContextEntry
|
|
102066
|
-
PropertyName
|
|
102067
|
-
PropertyIdentifier
|
|
102026
|
+
const propertyIdentifier = 119,
|
|
102027
|
+
identifier = 120,
|
|
102028
|
+
nameIdentifier = 121,
|
|
102029
|
+
insertSemi = 122,
|
|
102030
|
+
expression0 = 126,
|
|
102031
|
+
ForExpression = 4,
|
|
102032
|
+
forExpressionStart = 129,
|
|
102033
|
+
ForInExpression = 7,
|
|
102034
|
+
Name = 8,
|
|
102035
|
+
Identifier = 9,
|
|
102036
|
+
AdditionalIdentifier = 10,
|
|
102037
|
+
forExpressionBodyStart = 137,
|
|
102038
|
+
IfExpression = 18,
|
|
102039
|
+
ifExpressionStart = 138,
|
|
102040
|
+
QuantifiedExpression = 22,
|
|
102041
|
+
quantifiedExpressionStart = 139,
|
|
102042
|
+
QuantifiedInExpression = 26,
|
|
102043
|
+
PositiveUnaryTest = 36,
|
|
102044
|
+
ArithmeticExpression = 40,
|
|
102045
|
+
arithmeticPlusStart = 143,
|
|
102046
|
+
arithmeticTimesStart = 144,
|
|
102047
|
+
arithmeticExpStart = 145,
|
|
102048
|
+
arithmeticUnaryStart = 146,
|
|
102049
|
+
VariableName = 47,
|
|
102050
|
+
PathExpression = 67,
|
|
102051
|
+
pathExpressionStart = 151,
|
|
102052
|
+
FilterExpression = 69,
|
|
102053
|
+
filterExpressionStart = 152,
|
|
102054
|
+
FunctionInvocation = 71,
|
|
102055
|
+
functionInvocationStart = 153,
|
|
102056
|
+
ParameterName = 75,
|
|
102057
|
+
nil = 158,
|
|
102058
|
+
NumericLiteral = 78,
|
|
102059
|
+
StringLiteral = 79,
|
|
102060
|
+
BooleanLiteral = 80,
|
|
102061
|
+
List = 88,
|
|
102062
|
+
listStart = 169,
|
|
102063
|
+
FunctionDefinition = 89,
|
|
102064
|
+
functionDefinitionStart = 171,
|
|
102065
|
+
Context$1 = 96,
|
|
102066
|
+
contextStart = 173,
|
|
102067
|
+
ContextEntry = 97,
|
|
102068
|
+
PropertyName = 99,
|
|
102069
|
+
PropertyIdentifier = 100;
|
|
102068
102070
|
|
|
102069
102071
|
/* global console,process */
|
|
102070
102072
|
|
|
102071
|
-
const LOG_PARSE
|
|
102072
|
-
const LOG_PARSE_DEBUG
|
|
102073
|
-
const LOG_VARS
|
|
102073
|
+
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
102074
|
+
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
102075
|
+
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
102074
102076
|
|
|
102075
|
-
const spaceChars
|
|
102077
|
+
const spaceChars = [
|
|
102076
102078
|
9, 11, 12, 32, 133, 160,
|
|
102077
102079
|
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
102078
102080
|
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
102079
102081
|
];
|
|
102080
102082
|
|
|
102081
|
-
const newlineChars
|
|
102083
|
+
const newlineChars = chars('\n\r');
|
|
102082
102084
|
|
|
102083
|
-
const additionalNameChars
|
|
102085
|
+
const additionalNameChars = chars("'./-+*");
|
|
102084
102086
|
|
|
102085
102087
|
/**
|
|
102086
102088
|
* @param { string } str
|
|
102087
102089
|
* @return { number[] }
|
|
102088
102090
|
*/
|
|
102089
|
-
function chars
|
|
102091
|
+
function chars(str) {
|
|
102090
102092
|
return Array.from(str).map(s => s.charCodeAt(0));
|
|
102091
102093
|
}
|
|
102092
102094
|
|
|
@@ -102094,7 +102096,7 @@
|
|
|
102094
102096
|
* @param { number } ch
|
|
102095
102097
|
* @return { boolean }
|
|
102096
102098
|
*/
|
|
102097
|
-
function isStartChar
|
|
102099
|
+
function isStartChar(ch) {
|
|
102098
102100
|
return (
|
|
102099
102101
|
ch === 63 // ?
|
|
102100
102102
|
) || (
|
|
@@ -102104,7 +102106,7 @@
|
|
|
102104
102106
|
) || (
|
|
102105
102107
|
ch >= 97 && ch <= 122 // a-z
|
|
102106
102108
|
) || (
|
|
102107
|
-
ch >= 161 && !isPartChar
|
|
102109
|
+
ch >= 161 && !isPartChar(ch) && !isSpace(ch)
|
|
102108
102110
|
);
|
|
102109
102111
|
}
|
|
102110
102112
|
|
|
@@ -102112,15 +102114,15 @@
|
|
|
102112
102114
|
* @param { number } ch
|
|
102113
102115
|
* @return { boolean }
|
|
102114
102116
|
*/
|
|
102115
|
-
function isAdditional
|
|
102116
|
-
return additionalNameChars
|
|
102117
|
+
function isAdditional(ch) {
|
|
102118
|
+
return additionalNameChars.includes(ch);
|
|
102117
102119
|
}
|
|
102118
102120
|
|
|
102119
102121
|
/**
|
|
102120
102122
|
* @param { number } ch
|
|
102121
102123
|
* @return { boolean }
|
|
102122
102124
|
*/
|
|
102123
|
-
function isPartChar
|
|
102125
|
+
function isPartChar(ch) {
|
|
102124
102126
|
return (
|
|
102125
102127
|
ch >= 48 && ch <= 57 // 0-9
|
|
102126
102128
|
) || (
|
|
@@ -102136,12 +102138,12 @@
|
|
|
102136
102138
|
* @param { number } ch
|
|
102137
102139
|
* @return { boolean }
|
|
102138
102140
|
*/
|
|
102139
|
-
function isSpace
|
|
102140
|
-
return spaceChars
|
|
102141
|
+
function isSpace(ch) {
|
|
102142
|
+
return spaceChars.includes(ch);
|
|
102141
102143
|
}
|
|
102142
102144
|
|
|
102143
102145
|
// eslint-disable-next-line
|
|
102144
|
-
function indent
|
|
102146
|
+
function indent(str, spaces) {
|
|
102145
102147
|
return spaces.concat(
|
|
102146
102148
|
str.split(/\n/g).join('\n' + spaces)
|
|
102147
102149
|
);
|
|
@@ -102154,11 +102156,11 @@
|
|
|
102154
102156
|
*
|
|
102155
102157
|
* @return { { token: string, offset: number } | null }
|
|
102156
102158
|
*/
|
|
102157
|
-
function parseAdditionalSymbol
|
|
102159
|
+
function parseAdditionalSymbol(input, offset = 0) {
|
|
102158
102160
|
|
|
102159
102161
|
const next = input.peek(offset);
|
|
102160
102162
|
|
|
102161
|
-
if (isAdditional
|
|
102163
|
+
if (isAdditional(next)) {
|
|
102162
102164
|
return {
|
|
102163
102165
|
offset: 1,
|
|
102164
102166
|
token: String.fromCharCode(next)
|
|
@@ -102175,11 +102177,11 @@
|
|
|
102175
102177
|
*
|
|
102176
102178
|
* @return { { token: string, offset: number } | null }
|
|
102177
102179
|
*/
|
|
102178
|
-
function parseIdentifier
|
|
102180
|
+
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
102179
102181
|
for (let inside = false, chars = [], i = 0;; i++) {
|
|
102180
102182
|
const next = input.peek(offset + i);
|
|
102181
102183
|
|
|
102182
|
-
if (isStartChar
|
|
102184
|
+
if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
|
|
102183
102185
|
if (!inside) {
|
|
102184
102186
|
inside = true;
|
|
102185
102187
|
}
|
|
@@ -102205,12 +102207,12 @@
|
|
|
102205
102207
|
*
|
|
102206
102208
|
* @return { { token: string, offset: number } | null }
|
|
102207
102209
|
*/
|
|
102208
|
-
function parseSpaces
|
|
102210
|
+
function parseSpaces(input, offset) {
|
|
102209
102211
|
|
|
102210
102212
|
for (let inside = false, i = 0;; i++) {
|
|
102211
102213
|
let next = input.peek(offset + i);
|
|
102212
102214
|
|
|
102213
|
-
if (isSpace
|
|
102215
|
+
if (isSpace(next)) {
|
|
102214
102216
|
if (!inside) {
|
|
102215
102217
|
inside = true;
|
|
102216
102218
|
}
|
|
@@ -102235,7 +102237,7 @@
|
|
|
102235
102237
|
*
|
|
102236
102238
|
* @return { { token: string, offset: number, term: number } | null }
|
|
102237
102239
|
*/
|
|
102238
|
-
function parseName$
|
|
102240
|
+
function parseName$1(input, variables) {
|
|
102239
102241
|
const contextKeys = variables.contextKeys();
|
|
102240
102242
|
|
|
102241
102243
|
const start = variables.tokens;
|
|
@@ -102246,9 +102248,9 @@
|
|
|
102246
102248
|
const maybeSpace = tokens.length > 0;
|
|
102247
102249
|
|
|
102248
102250
|
const match = (
|
|
102249
|
-
parseIdentifier
|
|
102250
|
-
namePart && parseAdditionalSymbol
|
|
102251
|
-
maybeSpace && parseSpaces
|
|
102251
|
+
parseIdentifier(input, i, namePart) ||
|
|
102252
|
+
namePart && parseAdditionalSymbol(input, i) ||
|
|
102253
|
+
maybeSpace && parseSpaces(input, i)
|
|
102252
102254
|
);
|
|
102253
102255
|
|
|
102254
102256
|
// match is required
|
|
@@ -102277,11 +102279,11 @@
|
|
|
102277
102279
|
nextMatch = {
|
|
102278
102280
|
token,
|
|
102279
102281
|
offset: token.length,
|
|
102280
|
-
term: nameIdentifier
|
|
102282
|
+
term: nameIdentifier
|
|
102281
102283
|
};
|
|
102282
102284
|
}
|
|
102283
102285
|
|
|
102284
|
-
if (dateTimeIdentifiers
|
|
102286
|
+
if (dateTimeIdentifiers.some(el => el === name)) {
|
|
102285
102287
|
const token = tokens[0];
|
|
102286
102288
|
|
|
102287
102289
|
// parse date time identifiers as normal
|
|
@@ -102291,13 +102293,13 @@
|
|
|
102291
102293
|
nextMatch = {
|
|
102292
102294
|
token,
|
|
102293
102295
|
offset: token.length,
|
|
102294
|
-
term: identifier
|
|
102296
|
+
term: identifier
|
|
102295
102297
|
};
|
|
102296
102298
|
}
|
|
102297
102299
|
|
|
102298
102300
|
if (
|
|
102299
102301
|
!contextKeys.some(el => el.startsWith(name)) &&
|
|
102300
|
-
!dateTimeIdentifiers
|
|
102302
|
+
!dateTimeIdentifiers.some(el => el.startsWith(name))
|
|
102301
102303
|
) {
|
|
102302
102304
|
return nextMatch;
|
|
102303
102305
|
}
|
|
@@ -102305,50 +102307,50 @@
|
|
|
102305
102307
|
|
|
102306
102308
|
}
|
|
102307
102309
|
|
|
102308
|
-
const identifiersMap
|
|
102309
|
-
[ identifier
|
|
102310
|
-
[ nameIdentifier
|
|
102310
|
+
const identifiersMap = {
|
|
102311
|
+
[ identifier ]: 'identifier',
|
|
102312
|
+
[ nameIdentifier ]: 'nameIdentifier'
|
|
102311
102313
|
};
|
|
102312
102314
|
|
|
102313
|
-
const identifiers
|
|
102315
|
+
const identifiers = new ExternalTokenizer((input, stack) => {
|
|
102314
102316
|
|
|
102315
|
-
LOG_PARSE_DEBUG
|
|
102317
|
+
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
102316
102318
|
|
|
102317
|
-
const nameMatch = parseName$
|
|
102319
|
+
const nameMatch = parseName$1(input, stack.context);
|
|
102318
102320
|
|
|
102319
102321
|
const start = stack.context.tokens;
|
|
102320
102322
|
|
|
102321
|
-
const match = nameMatch || parseIdentifier
|
|
102323
|
+
const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
|
|
102322
102324
|
|
|
102323
102325
|
if (match) {
|
|
102324
102326
|
input.advance(match.offset);
|
|
102325
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier
|
|
102327
|
+
input.acceptToken(nameMatch ? nameMatch.term : identifier);
|
|
102326
102328
|
|
|
102327
|
-
LOG_PARSE
|
|
102329
|
+
LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
|
|
102328
102330
|
}
|
|
102329
102331
|
}, { contextual: true });
|
|
102330
102332
|
|
|
102331
102333
|
|
|
102332
|
-
const propertyIdentifiers
|
|
102334
|
+
const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
|
|
102333
102335
|
|
|
102334
|
-
LOG_PARSE_DEBUG
|
|
102336
|
+
LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
102335
102337
|
|
|
102336
102338
|
const start = stack.context.tokens;
|
|
102337
102339
|
|
|
102338
|
-
const match = parseIdentifier
|
|
102340
|
+
const match = parseIdentifier(input, 0, start.length > 0);
|
|
102339
102341
|
|
|
102340
102342
|
if (match) {
|
|
102341
102343
|
input.advance(match.offset);
|
|
102342
|
-
input.acceptToken(propertyIdentifier
|
|
102344
|
+
input.acceptToken(propertyIdentifier);
|
|
102343
102345
|
|
|
102344
|
-
LOG_PARSE
|
|
102346
|
+
LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
102345
102347
|
}
|
|
102346
102348
|
});
|
|
102347
102349
|
|
|
102348
102350
|
|
|
102349
|
-
const insertSemicolon
|
|
102351
|
+
const insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
102350
102352
|
|
|
102351
|
-
LOG_PARSE_DEBUG
|
|
102353
|
+
LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
|
|
102352
102354
|
|
|
102353
102355
|
let offset;
|
|
102354
102356
|
let insert = false;
|
|
@@ -102356,11 +102358,11 @@
|
|
|
102356
102358
|
for (offset = 0;; offset++) {
|
|
102357
102359
|
const char = input.peek(offset);
|
|
102358
102360
|
|
|
102359
|
-
if (spaceChars
|
|
102361
|
+
if (spaceChars.includes(char)) {
|
|
102360
102362
|
continue;
|
|
102361
102363
|
}
|
|
102362
102364
|
|
|
102363
|
-
if (newlineChars
|
|
102365
|
+
if (newlineChars.includes(char)) {
|
|
102364
102366
|
insert = true;
|
|
102365
102367
|
}
|
|
102366
102368
|
|
|
@@ -102369,47 +102371,47 @@
|
|
|
102369
102371
|
|
|
102370
102372
|
if (insert) {
|
|
102371
102373
|
|
|
102372
|
-
const identifier = parseIdentifier
|
|
102373
|
-
const spaces = parseSpaces
|
|
102374
|
+
const identifier = parseIdentifier(input, offset + 1);
|
|
102375
|
+
const spaces = parseSpaces(input, offset + 1);
|
|
102374
102376
|
|
|
102375
102377
|
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
102376
102378
|
return;
|
|
102377
102379
|
}
|
|
102378
102380
|
|
|
102379
|
-
LOG_PARSE
|
|
102380
|
-
input.acceptToken(insertSemi
|
|
102381
|
+
LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
102382
|
+
input.acceptToken(insertSemi);
|
|
102381
102383
|
}
|
|
102382
102384
|
});
|
|
102383
102385
|
|
|
102384
|
-
const prefixedContextStarts
|
|
102385
|
-
[ functionInvocationStart
|
|
102386
|
-
[ filterExpressionStart
|
|
102387
|
-
[ pathExpressionStart
|
|
102386
|
+
const prefixedContextStarts = {
|
|
102387
|
+
[ functionInvocationStart ]: 'FunctionInvocation',
|
|
102388
|
+
[ filterExpressionStart ]: 'FilterExpression',
|
|
102389
|
+
[ pathExpressionStart ]: 'PathExpression'
|
|
102388
102390
|
};
|
|
102389
102391
|
|
|
102390
|
-
const contextStarts
|
|
102391
|
-
[ contextStart
|
|
102392
|
-
[ functionDefinitionStart
|
|
102393
|
-
[ forExpressionStart
|
|
102394
|
-
[ listStart
|
|
102395
|
-
[ ifExpressionStart
|
|
102396
|
-
[ quantifiedExpressionStart
|
|
102392
|
+
const contextStarts = {
|
|
102393
|
+
[ contextStart ]: 'Context',
|
|
102394
|
+
[ functionDefinitionStart ]: 'FunctionDefinition',
|
|
102395
|
+
[ forExpressionStart ]: 'ForExpression',
|
|
102396
|
+
[ listStart ]: 'List',
|
|
102397
|
+
[ ifExpressionStart ]: 'IfExpression',
|
|
102398
|
+
[ quantifiedExpressionStart ]: 'QuantifiedExpression'
|
|
102397
102399
|
};
|
|
102398
102400
|
|
|
102399
|
-
const contextEnds
|
|
102400
|
-
[ Context$
|
|
102401
|
-
[ FunctionDefinition
|
|
102402
|
-
[ ForExpression
|
|
102403
|
-
[ List
|
|
102404
|
-
[ IfExpression
|
|
102405
|
-
[ QuantifiedExpression
|
|
102406
|
-
[ PathExpression
|
|
102407
|
-
[ FunctionInvocation
|
|
102408
|
-
[ FilterExpression
|
|
102409
|
-
[ ArithmeticExpression
|
|
102401
|
+
const contextEnds = {
|
|
102402
|
+
[ Context$1 ]: 'Context',
|
|
102403
|
+
[ FunctionDefinition ]: 'FunctionDefinition',
|
|
102404
|
+
[ ForExpression ]: 'ForExpression',
|
|
102405
|
+
[ List ]: 'List',
|
|
102406
|
+
[ IfExpression ]: 'IfExpression',
|
|
102407
|
+
[ QuantifiedExpression ]: 'QuantifiedExpression',
|
|
102408
|
+
[ PathExpression ]: 'PathExpression',
|
|
102409
|
+
[ FunctionInvocation ]: 'FunctionInvocation',
|
|
102410
|
+
[ FilterExpression ]: 'FilterExpression',
|
|
102411
|
+
[ ArithmeticExpression ]: 'ArithmeticExpression'
|
|
102410
102412
|
};
|
|
102411
102413
|
|
|
102412
|
-
|
|
102414
|
+
class ValueProducer {
|
|
102413
102415
|
|
|
102414
102416
|
/**
|
|
102415
102417
|
* @param { Function } fn
|
|
@@ -102431,18 +102433,18 @@
|
|
|
102431
102433
|
return new ValueProducer(fn);
|
|
102432
102434
|
}
|
|
102433
102435
|
|
|
102434
|
-
}
|
|
102436
|
+
}
|
|
102435
102437
|
|
|
102436
|
-
const dateTimeLiterals
|
|
102438
|
+
const dateTimeLiterals = {
|
|
102437
102439
|
'date and time': 1,
|
|
102438
102440
|
'date': 1,
|
|
102439
102441
|
'time': 1,
|
|
102440
102442
|
'duration': 1
|
|
102441
102443
|
};
|
|
102442
102444
|
|
|
102443
|
-
const dateTimeIdentifiers
|
|
102445
|
+
const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
102444
102446
|
|
|
102445
|
-
|
|
102447
|
+
class Variables {
|
|
102446
102448
|
|
|
102447
102449
|
constructor({
|
|
102448
102450
|
name = 'Expressions',
|
|
@@ -102469,7 +102471,7 @@
|
|
|
102469
102471
|
parent: this
|
|
102470
102472
|
});
|
|
102471
102473
|
|
|
102472
|
-
LOG_VARS
|
|
102474
|
+
LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
|
|
102473
102475
|
|
|
102474
102476
|
return childScope;
|
|
102475
102477
|
}
|
|
@@ -102477,19 +102479,19 @@
|
|
|
102477
102479
|
exitScope(str) {
|
|
102478
102480
|
|
|
102479
102481
|
if (!this.parent) {
|
|
102480
|
-
LOG_VARS
|
|
102482
|
+
LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
102481
102483
|
|
|
102482
102484
|
return this;
|
|
102483
102485
|
}
|
|
102484
102486
|
|
|
102485
|
-
LOG_VARS
|
|
102487
|
+
LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
102486
102488
|
|
|
102487
102489
|
return this.parent.pushChild(this);
|
|
102488
102490
|
}
|
|
102489
102491
|
|
|
102490
102492
|
token(part) {
|
|
102491
102493
|
|
|
102492
|
-
LOG_VARS
|
|
102494
|
+
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
102493
102495
|
|
|
102494
102496
|
return this.assign({
|
|
102495
102497
|
tokens: [ ...this.tokens, part ]
|
|
@@ -102498,7 +102500,7 @@
|
|
|
102498
102500
|
|
|
102499
102501
|
literal(value) {
|
|
102500
102502
|
|
|
102501
|
-
LOG_VARS
|
|
102503
|
+
LOG_VARS && console.log('[%s] literal %o', this.path, value);
|
|
102502
102504
|
|
|
102503
102505
|
return this.pushChild(this.of({
|
|
102504
102506
|
name: 'Literal',
|
|
@@ -102512,7 +102514,7 @@
|
|
|
102512
102514
|
* @return {any}
|
|
102513
102515
|
*/
|
|
102514
102516
|
computedValue() {
|
|
102515
|
-
for (let scope = this;;scope = last
|
|
102517
|
+
for (let scope = this;;scope = last(scope.children)) {
|
|
102516
102518
|
|
|
102517
102519
|
if (!scope) {
|
|
102518
102520
|
return null;
|
|
@@ -102525,7 +102527,7 @@
|
|
|
102525
102527
|
}
|
|
102526
102528
|
|
|
102527
102529
|
contextKeys() {
|
|
102528
|
-
return Object.keys(this.context).map(normalizeContextKey
|
|
102530
|
+
return Object.keys(this.context).map(normalizeContextKey);
|
|
102529
102531
|
}
|
|
102530
102532
|
|
|
102531
102533
|
get path() {
|
|
@@ -102540,10 +102542,10 @@
|
|
|
102540
102542
|
*/
|
|
102541
102543
|
get(variable) {
|
|
102542
102544
|
|
|
102543
|
-
const names = [ variable, variable && normalizeContextKey
|
|
102545
|
+
const names = [ variable, variable && normalizeContextKey(variable) ];
|
|
102544
102546
|
|
|
102545
102547
|
const contextKey = Object.keys(this.context).find(
|
|
102546
|
-
key => names.includes(normalizeContextKey
|
|
102548
|
+
key => names.includes(normalizeContextKey(key))
|
|
102547
102549
|
);
|
|
102548
102550
|
|
|
102549
102551
|
if (typeof contextKey === 'undefined') {
|
|
@@ -102552,7 +102554,7 @@
|
|
|
102552
102554
|
|
|
102553
102555
|
const val = this.context[contextKey];
|
|
102554
102556
|
|
|
102555
|
-
if (val instanceof ValueProducer
|
|
102557
|
+
if (val instanceof ValueProducer) {
|
|
102556
102558
|
return val.get(this);
|
|
102557
102559
|
} else {
|
|
102558
102560
|
return val;
|
|
@@ -102575,7 +102577,7 @@
|
|
|
102575
102577
|
raw: variable
|
|
102576
102578
|
});
|
|
102577
102579
|
|
|
102578
|
-
LOG_VARS
|
|
102580
|
+
LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
102579
102581
|
|
|
102580
102582
|
return parentScope.pushChild(variableScope);
|
|
102581
102583
|
}
|
|
@@ -102614,7 +102616,7 @@
|
|
|
102614
102616
|
|
|
102615
102617
|
const variableName = this.tokens.join(' ');
|
|
102616
102618
|
|
|
102617
|
-
LOG_VARS
|
|
102619
|
+
LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
102618
102620
|
|
|
102619
102621
|
return this.assign({
|
|
102620
102622
|
tokens: []
|
|
@@ -102629,12 +102631,12 @@
|
|
|
102629
102631
|
define(name, value) {
|
|
102630
102632
|
|
|
102631
102633
|
if (typeof name !== 'string') {
|
|
102632
|
-
LOG_VARS
|
|
102634
|
+
LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
102633
102635
|
|
|
102634
102636
|
return this;
|
|
102635
102637
|
}
|
|
102636
102638
|
|
|
102637
|
-
LOG_VARS
|
|
102639
|
+
LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
102638
102640
|
|
|
102639
102641
|
const context = {
|
|
102640
102642
|
...this.context,
|
|
@@ -102701,14 +102703,14 @@
|
|
|
102701
102703
|
});
|
|
102702
102704
|
}
|
|
102703
102705
|
|
|
102704
|
-
}
|
|
102706
|
+
}
|
|
102705
102707
|
|
|
102706
102708
|
/**
|
|
102707
102709
|
* @param { string } name
|
|
102708
102710
|
*
|
|
102709
102711
|
* @return { string } normalizedName
|
|
102710
102712
|
*/
|
|
102711
|
-
function normalizeContextKey
|
|
102713
|
+
function normalizeContextKey(name) {
|
|
102712
102714
|
return name.replace(/\s*([./\-'+*])\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
102713
102715
|
}
|
|
102714
102716
|
|
|
@@ -102720,7 +102722,7 @@
|
|
|
102720
102722
|
* @param { string } code
|
|
102721
102723
|
* @return { Variables }
|
|
102722
102724
|
*/
|
|
102723
|
-
function wrap
|
|
102725
|
+
function wrap(variables, scopeName, code) {
|
|
102724
102726
|
|
|
102725
102727
|
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
102726
102728
|
const children = variables.children.filter(c => c.name === scopeName);
|
|
@@ -102746,9 +102748,9 @@
|
|
|
102746
102748
|
*
|
|
102747
102749
|
* @return { ContextTracker<Variables> }
|
|
102748
102750
|
*/
|
|
102749
|
-
function trackVariables
|
|
102751
|
+
function trackVariables(context = {}) {
|
|
102750
102752
|
|
|
102751
|
-
const start = Variables
|
|
102753
|
+
const start = Variables.of({
|
|
102752
102754
|
context
|
|
102753
102755
|
});
|
|
102754
102756
|
|
|
@@ -102756,7 +102758,7 @@
|
|
|
102756
102758
|
start,
|
|
102757
102759
|
reduce(variables, term, stack, input) {
|
|
102758
102760
|
|
|
102759
|
-
if (term === IfExpression
|
|
102761
|
+
if (term === IfExpression) {
|
|
102760
102762
|
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
102761
102763
|
|
|
102762
102764
|
variables = variables.assign({
|
|
@@ -102767,7 +102769,7 @@
|
|
|
102767
102769
|
});
|
|
102768
102770
|
}
|
|
102769
102771
|
|
|
102770
|
-
if (term === List
|
|
102772
|
+
if (term === List) {
|
|
102771
102773
|
variables = variables.assign({
|
|
102772
102774
|
value: variables.children.reduce((value, child) => {
|
|
102773
102775
|
return {
|
|
@@ -102778,7 +102780,7 @@
|
|
|
102778
102780
|
});
|
|
102779
102781
|
}
|
|
102780
102782
|
|
|
102781
|
-
if (term === FilterExpression
|
|
102783
|
+
if (term === FilterExpression) {
|
|
102782
102784
|
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
102783
102785
|
|
|
102784
102786
|
variables = variables.assign({
|
|
@@ -102786,7 +102788,7 @@
|
|
|
102786
102788
|
});
|
|
102787
102789
|
}
|
|
102788
102790
|
|
|
102789
|
-
if (term === FunctionInvocation
|
|
102791
|
+
if (term === FunctionInvocation) {
|
|
102790
102792
|
|
|
102791
102793
|
const [
|
|
102792
102794
|
name,
|
|
@@ -102795,17 +102797,17 @@
|
|
|
102795
102797
|
|
|
102796
102798
|
// preserve type information through `get value(context, key)` utility
|
|
102797
102799
|
if (name?.raw === 'get value') {
|
|
102798
|
-
variables = getContextValue
|
|
102800
|
+
variables = getContextValue(variables, args);
|
|
102799
102801
|
}
|
|
102800
102802
|
}
|
|
102801
102803
|
|
|
102802
|
-
const start = contextStarts
|
|
102804
|
+
const start = contextStarts[term];
|
|
102803
102805
|
|
|
102804
102806
|
if (start) {
|
|
102805
102807
|
return variables.enterScope(start);
|
|
102806
102808
|
}
|
|
102807
102809
|
|
|
102808
|
-
const prefixedStart = prefixedContextStarts
|
|
102810
|
+
const prefixedStart = prefixedContextStarts[term];
|
|
102809
102811
|
|
|
102810
102812
|
// pull <expression> into new <prefixedStart> context
|
|
102811
102813
|
if (prefixedStart) {
|
|
@@ -102816,15 +102818,15 @@
|
|
|
102816
102818
|
} = variables;
|
|
102817
102819
|
|
|
102818
102820
|
const children = currentChildren.slice(0, -1);
|
|
102819
|
-
const lastChild = last
|
|
102821
|
+
const lastChild = last(currentChildren);
|
|
102820
102822
|
|
|
102821
102823
|
let newContext = null;
|
|
102822
102824
|
|
|
102823
|
-
if (term === pathExpressionStart
|
|
102825
|
+
if (term === pathExpressionStart) {
|
|
102824
102826
|
newContext = lastChild?.computedValue();
|
|
102825
102827
|
}
|
|
102826
102828
|
|
|
102827
|
-
if (term === filterExpressionStart
|
|
102829
|
+
if (term === filterExpressionStart) {
|
|
102828
102830
|
newContext = {
|
|
102829
102831
|
...currentContext,
|
|
102830
102832
|
...lastChild?.computedValue(),
|
|
@@ -102841,19 +102843,19 @@
|
|
|
102841
102843
|
|
|
102842
102844
|
const code = input.read(input.pos, stack.pos);
|
|
102843
102845
|
|
|
102844
|
-
const end = contextEnds
|
|
102846
|
+
const end = contextEnds[term];
|
|
102845
102847
|
|
|
102846
102848
|
if (end) {
|
|
102847
102849
|
return variables.exitScope(code);
|
|
102848
102850
|
}
|
|
102849
102851
|
|
|
102850
|
-
if (term === ContextEntry
|
|
102852
|
+
if (term === ContextEntry) {
|
|
102851
102853
|
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
102852
102854
|
|
|
102853
102855
|
const name = parts[0];
|
|
102854
|
-
const value = last
|
|
102856
|
+
const value = last(parts);
|
|
102855
102857
|
|
|
102856
|
-
return wrap
|
|
102858
|
+
return wrap(variables, 'ContextEntry', code).assign(
|
|
102857
102859
|
{
|
|
102858
102860
|
value: {
|
|
102859
102861
|
...variables.value,
|
|
@@ -102864,27 +102866,27 @@
|
|
|
102864
102866
|
}
|
|
102865
102867
|
|
|
102866
102868
|
if (
|
|
102867
|
-
term === ForInExpression
|
|
102868
|
-
term === QuantifiedInExpression
|
|
102869
|
+
term === ForInExpression ||
|
|
102870
|
+
term === QuantifiedInExpression
|
|
102869
102871
|
) {
|
|
102870
|
-
return wrap
|
|
102872
|
+
return wrap(variables, 'InExpression', code);
|
|
102871
102873
|
}
|
|
102872
102874
|
|
|
102873
102875
|
// define <partial> within ForExpression body
|
|
102874
|
-
if (term === forExpressionBodyStart
|
|
102876
|
+
if (term === forExpressionBodyStart) {
|
|
102875
102877
|
|
|
102876
102878
|
return variables.define(
|
|
102877
102879
|
'partial',
|
|
102878
|
-
ValueProducer
|
|
102879
|
-
return last
|
|
102880
|
+
ValueProducer.of(variables => {
|
|
102881
|
+
return last(variables.children)?.computedValue();
|
|
102880
102882
|
})
|
|
102881
102883
|
);
|
|
102882
102884
|
}
|
|
102883
102885
|
|
|
102884
102886
|
if (
|
|
102885
|
-
term === ParameterName
|
|
102887
|
+
term === ParameterName
|
|
102886
102888
|
) {
|
|
102887
|
-
const name = last
|
|
102889
|
+
const name = last(variables.children).computedValue();
|
|
102888
102890
|
|
|
102889
102891
|
// TODO: attach type information
|
|
102890
102892
|
return variables.define(name, 1);
|
|
@@ -102892,71 +102894,71 @@
|
|
|
102892
102894
|
|
|
102893
102895
|
// pull <expression> into ArithmeticExpression child
|
|
102894
102896
|
if (
|
|
102895
|
-
term === arithmeticPlusStart
|
|
102896
|
-
term === arithmeticTimesStart
|
|
102897
|
-
term === arithmeticExpStart
|
|
102897
|
+
term === arithmeticPlusStart ||
|
|
102898
|
+
term === arithmeticTimesStart ||
|
|
102899
|
+
term === arithmeticExpStart
|
|
102898
102900
|
) {
|
|
102899
102901
|
const children = variables.children.slice(0, -1);
|
|
102900
|
-
const lastChild = last
|
|
102902
|
+
const lastChild = last(variables.children);
|
|
102901
102903
|
|
|
102902
102904
|
return variables.assign({
|
|
102903
102905
|
children
|
|
102904
102906
|
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
102905
102907
|
}
|
|
102906
102908
|
|
|
102907
|
-
if (term === arithmeticUnaryStart
|
|
102909
|
+
if (term === arithmeticUnaryStart) {
|
|
102908
102910
|
return variables.enterScope('ArithmeticExpression');
|
|
102909
102911
|
}
|
|
102910
102912
|
|
|
102911
102913
|
if (
|
|
102912
|
-
term === Identifier
|
|
102913
|
-
term === AdditionalIdentifier
|
|
102914
|
-
term === PropertyIdentifier
|
|
102914
|
+
term === Identifier ||
|
|
102915
|
+
term === AdditionalIdentifier ||
|
|
102916
|
+
term === PropertyIdentifier
|
|
102915
102917
|
) {
|
|
102916
102918
|
return variables.token(code);
|
|
102917
102919
|
}
|
|
102918
102920
|
|
|
102919
102921
|
if (
|
|
102920
|
-
term === StringLiteral
|
|
102922
|
+
term === StringLiteral
|
|
102921
102923
|
) {
|
|
102922
102924
|
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
102923
102925
|
}
|
|
102924
102926
|
|
|
102925
|
-
if (term === BooleanLiteral
|
|
102927
|
+
if (term === BooleanLiteral) {
|
|
102926
102928
|
return variables.literal(code === 'true' ? true : false);
|
|
102927
102929
|
}
|
|
102928
102930
|
|
|
102929
|
-
if (term === NumericLiteral
|
|
102931
|
+
if (term === NumericLiteral) {
|
|
102930
102932
|
return variables.literal(parseFloat(code));
|
|
102931
102933
|
}
|
|
102932
102934
|
|
|
102933
|
-
if (term === nil
|
|
102935
|
+
if (term === nil) {
|
|
102934
102936
|
return variables.literal(null);
|
|
102935
102937
|
}
|
|
102936
102938
|
|
|
102937
102939
|
if (
|
|
102938
|
-
term === VariableName
|
|
102940
|
+
term === VariableName
|
|
102939
102941
|
) {
|
|
102940
102942
|
return variables.resolveName();
|
|
102941
102943
|
}
|
|
102942
102944
|
|
|
102943
102945
|
if (
|
|
102944
|
-
term === Name
|
|
102945
|
-
term === PropertyName
|
|
102946
|
+
term === Name ||
|
|
102947
|
+
term === PropertyName
|
|
102946
102948
|
) {
|
|
102947
102949
|
return variables.declareName();
|
|
102948
102950
|
}
|
|
102949
102951
|
|
|
102950
102952
|
if (
|
|
102951
|
-
term === expression0
|
|
102952
|
-
term === PositiveUnaryTest
|
|
102953
|
+
term === expression0 ||
|
|
102954
|
+
term === PositiveUnaryTest
|
|
102953
102955
|
) {
|
|
102954
102956
|
if (variables.tokens.length > 0) {
|
|
102955
102957
|
throw new Error('uncleared name');
|
|
102956
102958
|
}
|
|
102957
102959
|
}
|
|
102958
102960
|
|
|
102959
|
-
if (term === expression0
|
|
102961
|
+
if (term === expression0) {
|
|
102960
102962
|
|
|
102961
102963
|
let parent = variables;
|
|
102962
102964
|
|
|
@@ -102972,12 +102974,12 @@
|
|
|
102972
102974
|
});
|
|
102973
102975
|
}
|
|
102974
102976
|
|
|
102975
|
-
const variableTracker
|
|
102977
|
+
const variableTracker = trackVariables({});
|
|
102976
102978
|
|
|
102977
102979
|
|
|
102978
102980
|
// helpers //////////////
|
|
102979
102981
|
|
|
102980
|
-
function getContextValue
|
|
102982
|
+
function getContextValue(variables, args) {
|
|
102981
102983
|
|
|
102982
102984
|
if (!args.length) {
|
|
102983
102985
|
return variables.assign({
|
|
@@ -102986,7 +102988,7 @@
|
|
|
102986
102988
|
}
|
|
102987
102989
|
|
|
102988
102990
|
if (args[0].name === 'Name') {
|
|
102989
|
-
args = extractNamedArgs
|
|
102991
|
+
args = extractNamedArgs(args, [ 'm', 'key' ]);
|
|
102990
102992
|
}
|
|
102991
102993
|
|
|
102992
102994
|
if (args.length !== 2) {
|
|
@@ -103012,7 +103014,7 @@
|
|
|
103012
103014
|
}
|
|
103013
103015
|
|
|
103014
103016
|
return variables.assign({
|
|
103015
|
-
value: [ normalizeContextKey
|
|
103017
|
+
value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
103016
103018
|
if (keyValue in contextValue) {
|
|
103017
103019
|
return contextValue[keyValue];
|
|
103018
103020
|
}
|
|
@@ -103022,7 +103024,7 @@
|
|
|
103022
103024
|
});
|
|
103023
103025
|
}
|
|
103024
103026
|
|
|
103025
|
-
function extractNamedArgs
|
|
103027
|
+
function extractNamedArgs(args, argNames) {
|
|
103026
103028
|
|
|
103027
103029
|
const context = {};
|
|
103028
103030
|
|
|
@@ -103035,11 +103037,11 @@
|
|
|
103035
103037
|
return argNames.map(name => context[name]);
|
|
103036
103038
|
}
|
|
103037
103039
|
|
|
103038
|
-
function last
|
|
103040
|
+
function last(arr) {
|
|
103039
103041
|
return arr[arr.length - 1];
|
|
103040
103042
|
}
|
|
103041
103043
|
|
|
103042
|
-
const feelHighlighting
|
|
103044
|
+
const feelHighlighting = styleTags({
|
|
103043
103045
|
StringLiteral: tags$1.string,
|
|
103044
103046
|
NumericLiteral: tags$1.number,
|
|
103045
103047
|
BooleanLiteral: tags$1.bool,
|
|
@@ -103072,28 +103074,28 @@
|
|
|
103072
103074
|
});
|
|
103073
103075
|
|
|
103074
103076
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
103075
|
-
const spec_identifier
|
|
103076
|
-
const parser$
|
|
103077
|
+
const spec_identifier = {__proto__:null,for:10, in:30, return:34, if:38, then:40, else:42, some:46, every:48, satisfies:55, or:58, and:62, between:70, instance:86, of:89, days:99, time:101, duration:103, years:105, months:107, date:109, list:115, context:121, function:128, null:154, true:324, false:324, "?":168, external:184, not:207};
|
|
103078
|
+
const parser$1 = LRParser.deserialize({
|
|
103077
103079
|
version: 14,
|
|
103078
103080
|
states: "IWO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQ^O'#FOOOQQ'#Fd'#FdO'dQYO'#FdO`QYO'#DUOOQU'#Em'#EmO)QQ^O'#D]OOQO'#Fk'#FkO,PQWO'#DuOOQU'#D|'#D|OOQU'#D}'#D}OOQU'#EO'#EOO,UOWO'#ERO,PQWO'#EPOOQU'#EP'#EPOOQU'#Fq'#FqOOQU'#Fo'#FoOOQQ'#Fv'#FvO.yQYO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y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR#Pn",
|
|
103081
103083
|
nodeNames: "⚠ LineComment BlockComment Expressions ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression ArithOp InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier UnaryTests Wildcard not",
|
|
103082
103084
|
maxTerm: 175,
|
|
103083
|
-
context: variableTracker
|
|
103085
|
+
context: variableTracker,
|
|
103084
103086
|
nodeProps: [
|
|
103085
103087
|
["group", -17,4,18,22,28,30,32,40,42,67,69,71,84,85,87,88,89,96,"Expression",47,"Expression Expression",-5,77,78,79,80,81,"Expression Literal"],
|
|
103086
103088
|
["closedBy", 37,")",70,"]",95,"}"],
|
|
103087
103089
|
["openedBy", 39,"(",68,"[",94,"{"]
|
|
103088
103090
|
],
|
|
103089
|
-
propSources: [feelHighlighting
|
|
103091
|
+
propSources: [feelHighlighting],
|
|
103090
103092
|
skippedNodes: [0,1,2],
|
|
103091
103093
|
repeatNodeCount: 14,
|
|
103092
103094
|
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#p~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#q~~$cP!_!`$f~$kOq~~$pW$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$g~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#y~~&mOu~~&rOw~~&wP^~z{&z~'POy~~'UO[~~'ZO#|~R'`PZP!`!a'cQ'hO$[Q~'mQ#x~!O!P's!Q!['x~'xO#{~~'}P$f~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$f~!O!P*W!Q![){~*ZP!Q!['x~*cO$Y~~*hO$u~R*oP![QrP!_!`*rP*wOrPR+OP!XQrP!_!`*r~+WO$i~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
103093
|
-
tokenizers: [propertyIdentifiers
|
|
103095
|
+
tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
|
|
103094
103096
|
topRules: {"Expressions":[0,3],"UnaryTests":[1,101]},
|
|
103095
103097
|
dynamicPrecedences: {"30":-1,"71":-1,"73":-1,"126":-1},
|
|
103096
|
-
specialized: [{term: 120, get: value => spec_identifier
|
|
103098
|
+
specialized: [{term: 120, get: value => spec_identifier[value] || -1}],
|
|
103097
103099
|
tokenPrec: 0
|
|
103098
103100
|
});
|
|
103099
103101
|
|
|
@@ -103645,7 +103647,7 @@
|
|
|
103645
103647
|
});
|
|
103646
103648
|
|
|
103647
103649
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
103648
|
-
const parser
|
|
103650
|
+
const parser = LRParser.deserialize({
|
|
103649
103651
|
version: 14,
|
|
103650
103652
|
states: "$bOQOaOOOfOXO'#CbOOO`'#Cm'#CmOqOWO'#CcOvOWO'#CfOOO`'#Cp'#CpOOO`'#Ci'#CiO{OaO'#ClO!jOSOOQOOOOOO!oOPO,58{O!tOXO,58|OOO`,58|,58|O!|OQO,58}O#ROQO,59QOOO`-E6g-E6gOOO`1G.g1G.gO#WOPO1G.gOOO`1G.h1G.hO#]OaO1G.iO#qOaO1G.lOOO`7+$R7+$RO$VOPO7+$TO$_OPO7+$WOOO`<<Go<<GoOOO`<<Gr<<Gr",
|
|
103651
103653
|
stateData: "$g~ORUO_WObPOeROgSO^`P~OQYO_ZOc[O~OQ]O~OQ^O~ORUObPOeROgSO^`XW`XX`XZ`X[`X~OPXO~Oc`O~OQaOcbO~OfcO~OfdO~OceO~ORUObPOeROgSOW`PX`P~ORUObPOeROgSOZ`P[`P~OWhOXhO~OZiO[iO~O",
|
|
@@ -103712,7 +103714,7 @@
|
|
|
103712
103714
|
strict = false
|
|
103713
103715
|
} = options;
|
|
103714
103716
|
|
|
103715
|
-
const parseTree = parser
|
|
103717
|
+
const parseTree = parser.parse(templateString);
|
|
103716
103718
|
|
|
103717
103719
|
const simpleTreeRoot = buildSimpleTree(parseTree, templateString);
|
|
103718
103720
|
|
|
@@ -103868,12 +103870,12 @@
|
|
|
103868
103870
|
};
|
|
103869
103871
|
|
|
103870
103872
|
function createMixedLanguage(hostLanguage = null) {
|
|
103871
|
-
const _mixedParser = parser
|
|
103873
|
+
const _mixedParser = parser.configure({
|
|
103872
103874
|
|
|
103873
103875
|
wrap: parseMixed(node => {
|
|
103874
103876
|
|
|
103875
103877
|
if (node.name == 'Feel' || node.name == 'FeelBlock') {
|
|
103876
|
-
return { parser: parser$
|
|
103878
|
+
return { parser: parser$1 };
|
|
103877
103879
|
}
|
|
103878
103880
|
|
|
103879
103881
|
if (hostLanguage && node.name == 'SimpleTextBlock') {
|
|
@@ -104049,7 +104051,7 @@
|
|
|
104049
104051
|
const _getHostLanguageParser = (hostLanguage) => {
|
|
104050
104052
|
switch (hostLanguage) {
|
|
104051
104053
|
case 'markdown':
|
|
104052
|
-
return parser$
|
|
104054
|
+
return parser$2;
|
|
104053
104055
|
default:
|
|
104054
104056
|
return null;
|
|
104055
104057
|
}
|
|
@@ -104178,7 +104180,7 @@
|
|
|
104178
104180
|
// / parser](https://github.com/nikku/lezer-feel), extended with
|
|
104179
104181
|
// / highlighting and indentation information.
|
|
104180
104182
|
const feelLanguage = /*@__PURE__*/LRLanguage.define({
|
|
104181
|
-
parser: /*@__PURE__*/parser$
|
|
104183
|
+
parser: /*@__PURE__*/parser$3.configure({
|
|
104182
104184
|
props: [
|
|
104183
104185
|
/*@__PURE__*/indentNodeProp.add({
|
|
104184
104186
|
'Context': /*@__PURE__*/delimitedIndent({
|
|
@@ -107207,20 +107209,24 @@
|
|
|
107207
107209
|
|
|
107208
107210
|
// set edited state depending on all entries
|
|
107209
107211
|
p$2(() => {
|
|
107210
|
-
|
|
107211
|
-
|
|
107212
|
-
|
|
107213
|
-
|
|
107214
|
-
|
|
107215
|
-
|
|
107216
|
-
|
|
107217
|
-
|
|
107218
|
-
|
|
107219
|
-
|
|
107220
|
-
|
|
107212
|
+
// TODO(@barmac): replace with CSS when `:has()` is supported in all major browsers, or rewrite as in https://github.com/camunda/camunda-modeler/issues/3815#issuecomment-1733038161
|
|
107213
|
+
const scheduled = requestAnimationFrame(() => {
|
|
107214
|
+
const hasOneEditedEntry = entries.find(entry => {
|
|
107215
|
+
const {
|
|
107216
|
+
id,
|
|
107217
|
+
isEdited
|
|
107218
|
+
} = entry;
|
|
107219
|
+
const entryNode = query$1(`[data-entry-id="${id}"]`);
|
|
107220
|
+
if (!isFunction$1(isEdited) || !entryNode) {
|
|
107221
|
+
return false;
|
|
107222
|
+
}
|
|
107223
|
+
const inputNode = query$1('.bio-properties-panel-input', entryNode);
|
|
107224
|
+
return isEdited(inputNode);
|
|
107225
|
+
});
|
|
107226
|
+
setEdited(hasOneEditedEntry);
|
|
107221
107227
|
});
|
|
107222
|
-
|
|
107223
|
-
}, [entries]);
|
|
107228
|
+
return () => cancelAnimationFrame(scheduled);
|
|
107229
|
+
}, [entries, setEdited]);
|
|
107224
107230
|
|
|
107225
107231
|
// set error state depending on all entries
|
|
107226
107232
|
const allErrors = useErrors();
|
|
@@ -107654,7 +107660,11 @@
|
|
|
107654
107660
|
// (2) setup drag listeners
|
|
107655
107661
|
|
|
107656
107662
|
// attach drag + cleanup event
|
|
107657
|
-
|
|
107663
|
+
// we need to do this to make sure we track cursor
|
|
107664
|
+
// movements before we reach other drag event handlers,
|
|
107665
|
+
// e.g. in child containers.
|
|
107666
|
+
document.addEventListener('dragover', onDrag, true);
|
|
107667
|
+
document.addEventListener('dragenter', preventDefault, true);
|
|
107658
107668
|
document.addEventListener('dragend', onEnd);
|
|
107659
107669
|
document.addEventListener('drop', preventDefault);
|
|
107660
107670
|
}
|
|
@@ -107668,7 +107678,8 @@
|
|
|
107668
107678
|
return fn.call(self, event, delta);
|
|
107669
107679
|
}
|
|
107670
107680
|
function onEnd() {
|
|
107671
|
-
document.removeEventListener('dragover', onDrag);
|
|
107681
|
+
document.removeEventListener('dragover', onDrag, true);
|
|
107682
|
+
document.removeEventListener('dragenter', preventDefault, true);
|
|
107672
107683
|
document.removeEventListener('dragend', onEnd);
|
|
107673
107684
|
document.removeEventListener('drop', preventDefault);
|
|
107674
107685
|
}
|
|
@@ -107690,6 +107701,7 @@
|
|
|
107690
107701
|
* @param {Object} props
|
|
107691
107702
|
* @param {HTMLElement} [props.container]
|
|
107692
107703
|
* @param {string} [props.className]
|
|
107704
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
107693
107705
|
* @param {{x: number, y: number}} [props.position]
|
|
107694
107706
|
* @param {number} [props.width]
|
|
107695
107707
|
* @param {number} [props.height]
|
|
@@ -107697,12 +107709,15 @@
|
|
|
107697
107709
|
* @param {Function} [props.onPostActivate]
|
|
107698
107710
|
* @param {Function} [props.onPostDeactivate]
|
|
107699
107711
|
* @param {boolean} [props.returnFocus]
|
|
107712
|
+
* @param {boolean} [props.closeOnEscape]
|
|
107700
107713
|
* @param {string} props.title
|
|
107714
|
+
* @param {Ref} [ref]
|
|
107701
107715
|
*/
|
|
107702
|
-
function
|
|
107716
|
+
function PopupComponent(props, globalRef) {
|
|
107703
107717
|
const {
|
|
107704
107718
|
container,
|
|
107705
107719
|
className,
|
|
107720
|
+
delayInitialFocus,
|
|
107706
107721
|
position,
|
|
107707
107722
|
width,
|
|
107708
107723
|
height,
|
|
@@ -107710,12 +107725,16 @@
|
|
|
107710
107725
|
onPostActivate = noop$3,
|
|
107711
107726
|
onPostDeactivate = noop$3,
|
|
107712
107727
|
returnFocus = true,
|
|
107728
|
+
closeOnEscape = true,
|
|
107713
107729
|
title
|
|
107714
107730
|
} = props;
|
|
107715
107731
|
const focusTrapRef = _$2(null);
|
|
107716
|
-
const
|
|
107717
|
-
const
|
|
107718
|
-
|
|
107732
|
+
const localRef = _$2(null);
|
|
107733
|
+
const popupRef = globalRef || localRef;
|
|
107734
|
+
const handleKeydown = event => {
|
|
107735
|
+
// do not allow keyboard events to bubble
|
|
107736
|
+
event.stopPropagation();
|
|
107737
|
+
if (closeOnEscape && event.key === 'Escape') {
|
|
107719
107738
|
onClose();
|
|
107720
107739
|
}
|
|
107721
107740
|
};
|
|
@@ -107740,14 +107759,6 @@
|
|
|
107740
107759
|
if (height) {
|
|
107741
107760
|
style.height = height + 'px';
|
|
107742
107761
|
}
|
|
107743
|
-
p$2(() => {
|
|
107744
|
-
if (popupRef.current) {
|
|
107745
|
-
popupRef.current.addEventListener('keydown', handleKeyPress);
|
|
107746
|
-
}
|
|
107747
|
-
return () => {
|
|
107748
|
-
popupRef.current.removeEventListener('keydown', handleKeyPress);
|
|
107749
|
-
};
|
|
107750
|
-
}, [popupRef]);
|
|
107751
107762
|
p$2(() => {
|
|
107752
107763
|
if (popupRef.current) {
|
|
107753
107764
|
popupRef.current.addEventListener('focusin', handleFocus);
|
|
@@ -107760,6 +107771,7 @@
|
|
|
107760
107771
|
if (popupRef.current) {
|
|
107761
107772
|
focusTrapRef.current = createFocusTrap(popupRef.current, {
|
|
107762
107773
|
clickOutsideDeactivates: true,
|
|
107774
|
+
delayInitialFocus,
|
|
107763
107775
|
fallbackFocus: popupRef.current,
|
|
107764
107776
|
onPostActivate,
|
|
107765
107777
|
onPostDeactivate,
|
|
@@ -107773,12 +107785,14 @@
|
|
|
107773
107785
|
"aria-label": title,
|
|
107774
107786
|
tabIndex: -1,
|
|
107775
107787
|
ref: popupRef,
|
|
107788
|
+
onKeyDown: handleKeydown,
|
|
107776
107789
|
role: "dialog",
|
|
107777
107790
|
class: classNames('bio-properties-panel-popup', className),
|
|
107778
107791
|
style: style,
|
|
107779
107792
|
children: props.children
|
|
107780
107793
|
}), container || document.body);
|
|
107781
107794
|
}
|
|
107795
|
+
const Popup = k(PopupComponent);
|
|
107782
107796
|
Popup.Title = Title;
|
|
107783
107797
|
Popup.Body = Body;
|
|
107784
107798
|
Popup.Footer = Footer;
|
|
@@ -107787,6 +107801,7 @@
|
|
|
107787
107801
|
children,
|
|
107788
107802
|
className,
|
|
107789
107803
|
draggable,
|
|
107804
|
+
emit = () => {},
|
|
107790
107805
|
title,
|
|
107791
107806
|
...rest
|
|
107792
107807
|
} = props;
|
|
@@ -107799,7 +107814,8 @@
|
|
|
107799
107814
|
});
|
|
107800
107815
|
const dragPreviewRef = _$2();
|
|
107801
107816
|
const titleRef = _$2();
|
|
107802
|
-
const onMove =
|
|
107817
|
+
const onMove = (event, delta) => {
|
|
107818
|
+
cancel(event);
|
|
107803
107819
|
const {
|
|
107804
107820
|
x: dx,
|
|
107805
107821
|
y: dy
|
|
@@ -107811,20 +107827,33 @@
|
|
|
107811
107827
|
const popupParent = getPopupParent(titleRef.current);
|
|
107812
107828
|
popupParent.style.top = newPosition.y + 'px';
|
|
107813
107829
|
popupParent.style.left = newPosition.x + 'px';
|
|
107814
|
-
|
|
107830
|
+
|
|
107831
|
+
// notify interested parties
|
|
107832
|
+
emit('dragover', {
|
|
107833
|
+
newPosition,
|
|
107834
|
+
delta
|
|
107835
|
+
});
|
|
107836
|
+
};
|
|
107815
107837
|
const onMoveStart = event => {
|
|
107816
107838
|
// initialize drag handler
|
|
107817
107839
|
const onDragStart = createDragger(onMove, dragPreviewRef.current);
|
|
107818
107840
|
onDragStart(event);
|
|
107841
|
+
event.stopPropagation();
|
|
107819
107842
|
const popupParent = getPopupParent(titleRef.current);
|
|
107820
107843
|
const bounds = popupParent.getBoundingClientRect();
|
|
107821
107844
|
context.current.startPosition = {
|
|
107822
107845
|
x: bounds.left,
|
|
107823
107846
|
y: bounds.top
|
|
107824
107847
|
};
|
|
107848
|
+
|
|
107849
|
+
// notify interested parties
|
|
107850
|
+
emit('dragstart');
|
|
107825
107851
|
};
|
|
107826
107852
|
const onMoveEnd = () => {
|
|
107827
107853
|
context.current.newPosition = null;
|
|
107854
|
+
|
|
107855
|
+
// notify interested parties
|
|
107856
|
+
emit('dragend');
|
|
107828
107857
|
};
|
|
107829
107858
|
return o$3("div", {
|
|
107830
107859
|
class: classNames('bio-properties-panel-popup__header', draggable && 'draggable', className),
|
|
@@ -107877,27 +107906,53 @@
|
|
|
107877
107906
|
function getPopupParent(node) {
|
|
107878
107907
|
return node.closest('.bio-properties-panel-popup');
|
|
107879
107908
|
}
|
|
107909
|
+
function cancel(event) {
|
|
107910
|
+
event.preventDefault();
|
|
107911
|
+
event.stopPropagation();
|
|
107912
|
+
}
|
|
107880
107913
|
|
|
107881
107914
|
const FEEL_POPUP_WIDTH = 700;
|
|
107882
107915
|
const FEEL_POPUP_HEIGHT = 250;
|
|
107883
107916
|
|
|
107884
107917
|
/**
|
|
107885
|
-
* FEEL popup component, built as a singleton.
|
|
107918
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
107919
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
107920
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
107921
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
107922
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
107886
107923
|
*/
|
|
107887
107924
|
function FEELPopupRoot(props) {
|
|
107888
107925
|
const {
|
|
107889
|
-
element
|
|
107926
|
+
element,
|
|
107927
|
+
eventBus = {
|
|
107928
|
+
fire() {},
|
|
107929
|
+
on() {},
|
|
107930
|
+
off() {}
|
|
107931
|
+
},
|
|
107932
|
+
popupContainer
|
|
107890
107933
|
} = props;
|
|
107891
107934
|
const prevElement = usePrevious(element);
|
|
107892
107935
|
const [popupConfig, setPopupConfig] = h({});
|
|
107893
107936
|
const [open, setOpen] = h(false);
|
|
107894
107937
|
const [source, setSource] = h(null);
|
|
107895
107938
|
const [sourceElement, setSourceElement] = h(null);
|
|
107896
|
-
const
|
|
107897
|
-
|
|
107939
|
+
const emit = (type, context) => {
|
|
107940
|
+
eventBus.fire('feelPopup.' + type, context);
|
|
107941
|
+
};
|
|
107942
|
+
const isOpen = T$2(() => {
|
|
107943
|
+
return !!open;
|
|
107944
|
+
}, [open]);
|
|
107945
|
+
useUpdateEffect(() => {
|
|
107946
|
+
if (!open) {
|
|
107947
|
+
emit('closed');
|
|
107948
|
+
}
|
|
107949
|
+
}, [open]);
|
|
107950
|
+
const handleOpen = (entryId, config, _sourceElement) => {
|
|
107951
|
+
setSource(entryId);
|
|
107898
107952
|
setPopupConfig(config);
|
|
107899
107953
|
setOpen(true);
|
|
107900
107954
|
setSourceElement(_sourceElement);
|
|
107955
|
+
emit('open');
|
|
107901
107956
|
};
|
|
107902
107957
|
const handleClose = () => {
|
|
107903
107958
|
setOpen(false);
|
|
@@ -107911,21 +107966,47 @@
|
|
|
107911
107966
|
|
|
107912
107967
|
// close popup on element change, cf. https://github.com/bpmn-io/properties-panel/issues/270
|
|
107913
107968
|
p$2(() => {
|
|
107914
|
-
if (element && element !== prevElement) {
|
|
107969
|
+
if (element && prevElement && element !== prevElement) {
|
|
107915
107970
|
handleClose();
|
|
107916
107971
|
}
|
|
107917
107972
|
}, [element]);
|
|
107973
|
+
|
|
107974
|
+
// allow close and open via events
|
|
107975
|
+
p$2(() => {
|
|
107976
|
+
const handlePopupOpen = context => {
|
|
107977
|
+
const {
|
|
107978
|
+
entryId,
|
|
107979
|
+
popupConfig,
|
|
107980
|
+
sourceElement
|
|
107981
|
+
} = context;
|
|
107982
|
+
handleOpen(entryId, popupConfig, sourceElement);
|
|
107983
|
+
};
|
|
107984
|
+
const handleIsOpen = () => {
|
|
107985
|
+
return isOpen();
|
|
107986
|
+
};
|
|
107987
|
+
eventBus.on('feelPopup._close', handleClose);
|
|
107988
|
+
eventBus.on('feelPopup._open', handlePopupOpen);
|
|
107989
|
+
eventBus.on('feelPopup._isOpen', handleIsOpen);
|
|
107990
|
+
return () => {
|
|
107991
|
+
eventBus.off('feelPopup._close', handleClose);
|
|
107992
|
+
eventBus.off('feelPopup._open', handleOpen);
|
|
107993
|
+
eventBus.off('feelPopup._isOpen', handleIsOpen);
|
|
107994
|
+
};
|
|
107995
|
+
}, [eventBus, isOpen]);
|
|
107918
107996
|
return o$3(FeelPopupContext.Provider, {
|
|
107919
107997
|
value: feelPopupContext,
|
|
107920
107998
|
children: [open && o$3(FeelPopupComponent, {
|
|
107921
107999
|
onClose: handleClose,
|
|
108000
|
+
container: popupContainer,
|
|
107922
108001
|
sourceElement: sourceElement,
|
|
108002
|
+
emit: emit,
|
|
107923
108003
|
...popupConfig
|
|
107924
108004
|
}), props.children]
|
|
107925
108005
|
});
|
|
107926
108006
|
}
|
|
107927
108007
|
function FeelPopupComponent(props) {
|
|
107928
108008
|
const {
|
|
108009
|
+
container,
|
|
107929
108010
|
id,
|
|
107930
108011
|
hostLanguage,
|
|
107931
108012
|
onInput,
|
|
@@ -107937,20 +108018,45 @@
|
|
|
107937
108018
|
tooltipContainer,
|
|
107938
108019
|
type,
|
|
107939
108020
|
value,
|
|
107940
|
-
variables
|
|
108021
|
+
variables,
|
|
108022
|
+
emit
|
|
107941
108023
|
} = props;
|
|
107942
108024
|
const editorRef = _$2();
|
|
108025
|
+
const popupRef = _$2();
|
|
108026
|
+
const isAutoCompletionOpen = _$2(false);
|
|
107943
108027
|
const handleSetReturnFocus = () => {
|
|
107944
108028
|
sourceElement && sourceElement.focus();
|
|
107945
108029
|
};
|
|
107946
|
-
|
|
107947
|
-
|
|
107948
|
-
if (
|
|
107949
|
-
|
|
108030
|
+
const onKeyDownCapture = event => {
|
|
108031
|
+
// we use capture here to make sure we handle the event before the editor does
|
|
108032
|
+
if (event.key === 'Escape') {
|
|
108033
|
+
isAutoCompletionOpen.current = autoCompletionOpen(event.target);
|
|
107950
108034
|
}
|
|
107951
|
-
}
|
|
108035
|
+
};
|
|
108036
|
+
const onKeyDown = event => {
|
|
108037
|
+
if (event.key === 'Escape') {
|
|
108038
|
+
// close popup only if auto completion is not open
|
|
108039
|
+
// we need to do check this because the editor is not
|
|
108040
|
+
// stop propagating the keydown event
|
|
108041
|
+
// cf. https://discuss.codemirror.net/t/how-can-i-replace-the-default-autocompletion-keymap-v6/3322/5
|
|
108042
|
+
if (!isAutoCompletionOpen.current) {
|
|
108043
|
+
onClose();
|
|
108044
|
+
isAutoCompletionOpen.current = false;
|
|
108045
|
+
}
|
|
108046
|
+
}
|
|
108047
|
+
};
|
|
108048
|
+
p$2(() => {
|
|
108049
|
+
emit('opened', {
|
|
108050
|
+
domNode: popupRef.current
|
|
108051
|
+
});
|
|
108052
|
+
return () => emit('close', {
|
|
108053
|
+
domNode: popupRef.current
|
|
108054
|
+
});
|
|
108055
|
+
}, []);
|
|
107952
108056
|
return o$3(Popup, {
|
|
108057
|
+
container: container,
|
|
107953
108058
|
className: "bio-properties-panel-feel-popup",
|
|
108059
|
+
emit: emit,
|
|
107954
108060
|
position: position,
|
|
107955
108061
|
title: title,
|
|
107956
108062
|
onClose: onClose
|
|
@@ -107958,14 +108064,20 @@
|
|
|
107958
108064
|
// handle focus manually on deactivate
|
|
107959
108065
|
,
|
|
107960
108066
|
returnFocus: false,
|
|
108067
|
+
closeOnEscape: false,
|
|
108068
|
+
delayInitialFocus: false,
|
|
107961
108069
|
onPostDeactivate: handleSetReturnFocus,
|
|
107962
108070
|
height: FEEL_POPUP_HEIGHT,
|
|
107963
108071
|
width: FEEL_POPUP_WIDTH,
|
|
108072
|
+
ref: popupRef,
|
|
107964
108073
|
children: [o$3(Popup.Title, {
|
|
107965
108074
|
title: title,
|
|
108075
|
+
emit: emit,
|
|
107966
108076
|
draggable: true
|
|
107967
108077
|
}), o$3(Popup.Body, {
|
|
107968
108078
|
children: o$3("div", {
|
|
108079
|
+
onKeyDownCapture: onKeyDownCapture,
|
|
108080
|
+
onKeyDown: onKeyDown,
|
|
107969
108081
|
class: "bio-properties-panel-feel-popup__body",
|
|
107970
108082
|
children: [type === 'feel' && o$3(CodeEditor, {
|
|
107971
108083
|
enableGutters: true,
|
|
@@ -108007,6 +108119,26 @@
|
|
|
108007
108119
|
function prefixId$8(id) {
|
|
108008
108120
|
return `bio-properties-panel-${id}`;
|
|
108009
108121
|
}
|
|
108122
|
+
function autoCompletionOpen(element) {
|
|
108123
|
+
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
108124
|
+
}
|
|
108125
|
+
|
|
108126
|
+
/**
|
|
108127
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
108128
|
+
*
|
|
108129
|
+
* @param {Function} effect
|
|
108130
|
+
* @param {Array} deps
|
|
108131
|
+
*/
|
|
108132
|
+
function useUpdateEffect(effect, deps) {
|
|
108133
|
+
const isMounted = _$2(false);
|
|
108134
|
+
p$2(() => {
|
|
108135
|
+
if (isMounted.current) {
|
|
108136
|
+
return effect();
|
|
108137
|
+
} else {
|
|
108138
|
+
isMounted.current = true;
|
|
108139
|
+
}
|
|
108140
|
+
}, deps);
|
|
108141
|
+
}
|
|
108010
108142
|
|
|
108011
108143
|
function ToggleSwitch(props) {
|
|
108012
108144
|
const {
|
|
@@ -108675,7 +108807,7 @@
|
|
|
108675
108807
|
setLocalError(err);
|
|
108676
108808
|
}, []);
|
|
108677
108809
|
const temporaryError = useError(id);
|
|
108678
|
-
const error =
|
|
108810
|
+
const error = temporaryError || localError || validationError;
|
|
108679
108811
|
return o$3("div", {
|
|
108680
108812
|
class: classNames(props.class, 'bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
108681
108813
|
"data-entry-id": id,
|
|
@@ -108765,7 +108897,7 @@
|
|
|
108765
108897
|
|
|
108766
108898
|
// todo(pinussilvestrus): make this configurable in the future
|
|
108767
108899
|
function getPopupTitle(element, label) {
|
|
108768
|
-
let popupTitle;
|
|
108900
|
+
let popupTitle = '';
|
|
108769
108901
|
if (element && element.type) {
|
|
108770
108902
|
popupTitle = `${element.type} / `;
|
|
108771
108903
|
}
|
|
@@ -108853,6 +108985,7 @@
|
|
|
108853
108985
|
* @param {Function} [props.descriptionLoaded]
|
|
108854
108986
|
* @param {TooltipConfig} [props.tooltipConfig]
|
|
108855
108987
|
* @param {Function} [props.tooltipLoaded]
|
|
108988
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
108856
108989
|
* @param {Object} [props.eventBus]
|
|
108857
108990
|
*/
|
|
108858
108991
|
function PropertiesPanel(props) {
|
|
@@ -108867,6 +109000,7 @@
|
|
|
108867
109000
|
descriptionLoaded,
|
|
108868
109001
|
tooltipConfig,
|
|
108869
109002
|
tooltipLoaded,
|
|
109003
|
+
feelPopupContainer,
|
|
108870
109004
|
eventBus
|
|
108871
109005
|
} = props;
|
|
108872
109006
|
|
|
@@ -108969,6 +109103,8 @@
|
|
|
108969
109103
|
value: eventContext,
|
|
108970
109104
|
children: o$3(FEELPopupRoot, {
|
|
108971
109105
|
element: element,
|
|
109106
|
+
eventBus: eventBus,
|
|
109107
|
+
popupContainer: feelPopupContainer,
|
|
108972
109108
|
children: o$3("div", {
|
|
108973
109109
|
class: "bio-properties-panel",
|
|
108974
109110
|
children: [o$3(Header$1, {
|
|
@@ -110029,10 +110165,51 @@
|
|
|
110029
110165
|
}
|
|
110030
110166
|
debounceInput.$inject = ['config.debounceInput'];
|
|
110031
110167
|
|
|
110032
|
-
var index$
|
|
110168
|
+
var index$1$3 = {
|
|
110033
110169
|
debounceInput: ['factory', debounceInput]
|
|
110034
110170
|
};
|
|
110035
110171
|
|
|
110172
|
+
class FeelPopupModule {
|
|
110173
|
+
constructor(eventBus) {
|
|
110174
|
+
this._eventBus = eventBus;
|
|
110175
|
+
}
|
|
110176
|
+
|
|
110177
|
+
/**
|
|
110178
|
+
* Check if the FEEL popup is open.
|
|
110179
|
+
* @return {Boolean}
|
|
110180
|
+
*/
|
|
110181
|
+
isOpen() {
|
|
110182
|
+
return this._eventBus.fire('feelPopup._isOpen');
|
|
110183
|
+
}
|
|
110184
|
+
|
|
110185
|
+
/**
|
|
110186
|
+
* Open the FEEL popup.
|
|
110187
|
+
*
|
|
110188
|
+
* @param {String} entryId
|
|
110189
|
+
* @param {Object} popupConfig
|
|
110190
|
+
* @param {HTMLElement} sourceElement
|
|
110191
|
+
*/
|
|
110192
|
+
open(entryId, popupConfig, sourceElement) {
|
|
110193
|
+
return this._eventBus.fire('feelPopup._open', {
|
|
110194
|
+
entryId,
|
|
110195
|
+
popupConfig,
|
|
110196
|
+
sourceElement
|
|
110197
|
+
});
|
|
110198
|
+
}
|
|
110199
|
+
|
|
110200
|
+
/**
|
|
110201
|
+
* Close the FEEL popup.
|
|
110202
|
+
*/
|
|
110203
|
+
close() {
|
|
110204
|
+
return this._eventBus.fire('feelPopup._close');
|
|
110205
|
+
}
|
|
110206
|
+
}
|
|
110207
|
+
FeelPopupModule.$inject = ['eventBus'];
|
|
110208
|
+
|
|
110209
|
+
var index$4 = {
|
|
110210
|
+
feelPopup: ['type', FeelPopupModule]
|
|
110211
|
+
};
|
|
110212
|
+
|
|
110036
110213
|
var zeebe = {};
|
|
110037
110214
|
|
|
110038
110215
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(index_esm);
|
|
@@ -110673,7 +110850,7 @@
|
|
|
110673
110850
|
|
|
110674
110851
|
|
|
110675
110852
|
function getVariablesForElement(element, additionalExtractors = []) {
|
|
110676
|
-
return getVariablesForScope$1(getScope$2(element), getRootElement$
|
|
110853
|
+
return getVariablesForScope$1(getScope$2(element), getRootElement$2(element), additionalExtractors);
|
|
110677
110854
|
}
|
|
110678
110855
|
|
|
110679
110856
|
function getScope$2(element) {
|
|
@@ -110686,7 +110863,7 @@
|
|
|
110686
110863
|
return bo.id;
|
|
110687
110864
|
}
|
|
110688
110865
|
|
|
110689
|
-
function getRootElement$
|
|
110866
|
+
function getRootElement$2(element) {
|
|
110690
110867
|
const businessObject = getBusinessObject$1(element);
|
|
110691
110868
|
|
|
110692
110869
|
if (is$4(businessObject, 'bpmn:Participant')) {
|
|
@@ -112913,7 +113090,8 @@
|
|
|
112913
113090
|
getProviders,
|
|
112914
113091
|
layoutConfig: initialLayoutConfig,
|
|
112915
113092
|
descriptionConfig,
|
|
112916
|
-
tooltipConfig
|
|
113093
|
+
tooltipConfig,
|
|
113094
|
+
feelPopupContainer
|
|
112917
113095
|
} = props;
|
|
112918
113096
|
const canvas = injector.get('canvas');
|
|
112919
113097
|
const elementRegistry = injector.get('elementRegistry');
|
|
@@ -113089,6 +113267,7 @@
|
|
|
113089
113267
|
descriptionLoaded: onDescriptionLoaded,
|
|
113090
113268
|
tooltipConfig: tooltipConfig,
|
|
113091
113269
|
tooltipLoaded: onTooltipLoaded,
|
|
113270
|
+
feelPopupContainer: feelPopupContainer,
|
|
113092
113271
|
eventBus: eventBus
|
|
113093
113272
|
})
|
|
113094
113273
|
});
|
|
@@ -113121,13 +113300,15 @@
|
|
|
113121
113300
|
parent,
|
|
113122
113301
|
layout: layoutConfig,
|
|
113123
113302
|
description: descriptionConfig,
|
|
113124
|
-
tooltip: tooltipConfig
|
|
113303
|
+
tooltip: tooltipConfig,
|
|
113304
|
+
feelPopupContainer
|
|
113125
113305
|
} = config || {};
|
|
113126
113306
|
this._eventBus = eventBus;
|
|
113127
113307
|
this._injector = injector;
|
|
113128
113308
|
this._layoutConfig = layoutConfig;
|
|
113129
113309
|
this._descriptionConfig = descriptionConfig;
|
|
113130
113310
|
this._tooltipConfig = tooltipConfig;
|
|
113311
|
+
this._feelPopupContainer = feelPopupContainer;
|
|
113131
113312
|
this._container = domify$1('<div style="height: 100%" class="bio-properties-panel-container"></div>');
|
|
113132
113313
|
var commandStack = injector.get('commandStack', false);
|
|
113133
113314
|
commandStack && setupKeyboard(this._container, eventBus, commandStack);
|
|
@@ -113238,7 +113419,8 @@
|
|
|
113238
113419
|
getProviders: this._getProviders.bind(this),
|
|
113239
113420
|
layoutConfig: this._layoutConfig,
|
|
113240
113421
|
descriptionConfig: this._descriptionConfig,
|
|
113241
|
-
tooltipConfig: this._tooltipConfig
|
|
113422
|
+
tooltipConfig: this._tooltipConfig,
|
|
113423
|
+
feelPopupContainer: this._feelPopupContainer
|
|
113242
113424
|
}), this._container);
|
|
113243
113425
|
this._eventBus.fire('propertiesPanel.rendered');
|
|
113244
113426
|
}
|
|
@@ -113326,7 +113508,7 @@
|
|
|
113326
113508
|
};
|
|
113327
113509
|
|
|
113328
113510
|
var index$3$1 = {
|
|
113329
|
-
__depends__: [Commands, index$4],
|
|
113511
|
+
__depends__: [Commands, index$1$3, index$4],
|
|
113330
113512
|
__init__: ['propertiesPanel'],
|
|
113331
113513
|
propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
|
|
113332
113514
|
};
|
|
@@ -113373,16 +113555,16 @@
|
|
|
113373
113555
|
});
|
|
113374
113556
|
}
|
|
113375
113557
|
function isMessageSupported$1(element) {
|
|
113376
|
-
return is$6(element, 'bpmn:ReceiveTask') || isAny$1(element, ['bpmn:StartEvent', 'bpmn:EndEvent', 'bpmn:IntermediateThrowEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent']) && !!getMessageEventDefinition$
|
|
113558
|
+
return is$6(element, 'bpmn:ReceiveTask') || isAny$1(element, ['bpmn:StartEvent', 'bpmn:EndEvent', 'bpmn:IntermediateThrowEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent']) && !!getMessageEventDefinition$2(element);
|
|
113377
113559
|
}
|
|
113378
|
-
function getMessageEventDefinition$
|
|
113560
|
+
function getMessageEventDefinition$2(element) {
|
|
113379
113561
|
if (is$6(element, 'bpmn:ReceiveTask')) {
|
|
113380
113562
|
return getBusinessObject$2(element);
|
|
113381
113563
|
}
|
|
113382
113564
|
return getEventDefinition$1(element, 'bpmn:MessageEventDefinition');
|
|
113383
113565
|
}
|
|
113384
113566
|
function getMessage$1(element) {
|
|
113385
|
-
const messageEventDefinition = getMessageEventDefinition$
|
|
113567
|
+
const messageEventDefinition = getMessageEventDefinition$2(element);
|
|
113386
113568
|
return messageEventDefinition && messageEventDefinition.get('messageRef');
|
|
113387
113569
|
}
|
|
113388
113570
|
function getLinkEventDefinition(element) {
|
|
@@ -114413,7 +114595,7 @@
|
|
|
114413
114595
|
const bpmnFactory = useService('bpmnFactory');
|
|
114414
114596
|
const commandStack = useService('commandStack');
|
|
114415
114597
|
const translate = useService('translate');
|
|
114416
|
-
const messageEventDefinition = getMessageEventDefinition$
|
|
114598
|
+
const messageEventDefinition = getMessageEventDefinition$2(element);
|
|
114417
114599
|
const getValue = () => {
|
|
114418
114600
|
const message = getMessage$1(element);
|
|
114419
114601
|
if (message) {
|
|
@@ -115920,7 +116102,7 @@
|
|
|
115920
116102
|
function isZeebeServiceTask(element) {
|
|
115921
116103
|
if (!is$6(element, 'zeebe:ZeebeServiceTask')) return false;
|
|
115922
116104
|
if (is$6(element, 'bpmn:EndEvent') || is$6(element, 'bpmn:IntermediateThrowEvent')) {
|
|
115923
|
-
return !!getMessageEventDefinition$
|
|
116105
|
+
return !!getMessageEventDefinition$2(element);
|
|
115924
116106
|
}
|
|
115925
116107
|
|
|
115926
116108
|
// BusinessRuleTask and ScriptTask are ServiceTasks only if they have a TaskDefinition
|
|
@@ -115931,10 +116113,10 @@
|
|
|
115931
116113
|
return true;
|
|
115932
116114
|
}
|
|
115933
116115
|
function isMessageEndEvent(element) {
|
|
115934
|
-
return is$6(element, 'bpmn:EndEvent') && !!getMessageEventDefinition$
|
|
116116
|
+
return is$6(element, 'bpmn:EndEvent') && !!getMessageEventDefinition$2(element);
|
|
115935
116117
|
}
|
|
115936
116118
|
function isMessageThrowEvent(element) {
|
|
115937
|
-
return is$6(element, 'bpmn:IntermediateThrowEvent') && !!getMessageEventDefinition$
|
|
116119
|
+
return is$6(element, 'bpmn:IntermediateThrowEvent') && !!getMessageEventDefinition$2(element);
|
|
115938
116120
|
}
|
|
115939
116121
|
|
|
115940
116122
|
// helper ////////////////
|
|
@@ -116614,7 +116796,7 @@
|
|
|
116614
116796
|
debounce
|
|
116615
116797
|
});
|
|
116616
116798
|
}
|
|
116617
|
-
const USER_TASK_FORM_PREFIX
|
|
116799
|
+
const USER_TASK_FORM_PREFIX = 'userTaskForm_';
|
|
116618
116800
|
function FormHelper(bpmnFactory, commandStack) {
|
|
116619
116801
|
function getFormDefinition(element) {
|
|
116620
116802
|
const businessObject = getBusinessObject$2(element);
|
|
@@ -116762,7 +116944,7 @@
|
|
|
116762
116944
|
return 'camunda-forms:bpmn:' + formId;
|
|
116763
116945
|
}
|
|
116764
116946
|
function createFormId() {
|
|
116765
|
-
return nextId$1(USER_TASK_FORM_PREFIX
|
|
116947
|
+
return nextId$1(USER_TASK_FORM_PREFIX);
|
|
116766
116948
|
}
|
|
116767
116949
|
function resolveFormId(formKey) {
|
|
116768
116950
|
return formKey.split(':')[2];
|
|
@@ -117547,7 +117729,7 @@
|
|
|
117547
117729
|
}
|
|
117548
117730
|
|
|
117549
117731
|
// (2) ensure subscription
|
|
117550
|
-
let subscription = getSubscription(element);
|
|
117732
|
+
let subscription = getSubscription$1(element);
|
|
117551
117733
|
if (!subscription) {
|
|
117552
117734
|
subscription = createElement$3('zeebe:Subscription', {}, extensionElements, bpmnFactory);
|
|
117553
117735
|
commands.push({
|
|
@@ -117608,10 +117790,10 @@
|
|
|
117608
117790
|
return false;
|
|
117609
117791
|
}
|
|
117610
117792
|
function getCorrelationKey(element) {
|
|
117611
|
-
const subscription = getSubscription(element);
|
|
117793
|
+
const subscription = getSubscription$1(element);
|
|
117612
117794
|
return subscription ? subscription.get('correlationKey') : '';
|
|
117613
117795
|
}
|
|
117614
|
-
function getSubscription(element) {
|
|
117796
|
+
function getSubscription$1(element) {
|
|
117615
117797
|
const message = getMessage$1(element);
|
|
117616
117798
|
const subscriptions = getSubscriptions(message);
|
|
117617
117799
|
return subscriptions[0];
|
|
@@ -120345,6 +120527,83 @@
|
|
|
120345
120527
|
return find$2(values, value => is$6(value, 'zeebe:IoMapping'));
|
|
120346
120528
|
}
|
|
120347
120529
|
|
|
120530
|
+
/**
|
|
120531
|
+
* Zeebe BPMN behavior ensuring that zeebe:subscription is removed from bpmn:Message
|
|
120532
|
+
* when it has no properties anymore.
|
|
120533
|
+
*/
|
|
120534
|
+
class CleanUpSubscriptionBehavior extends CommandInterceptor$1 {
|
|
120535
|
+
constructor(eventBus, commandStack) {
|
|
120536
|
+
super(eventBus);
|
|
120537
|
+
|
|
120538
|
+
this.postExecuted([
|
|
120539
|
+
'element.updateProperties',
|
|
120540
|
+
'element.updateModdleProperties'
|
|
120541
|
+
], context => {
|
|
120542
|
+
const element = context.shape || context.newShape || context.element;
|
|
120543
|
+
|
|
120544
|
+
if (element.labelTarget) {
|
|
120545
|
+
return;
|
|
120546
|
+
}
|
|
120547
|
+
|
|
120548
|
+
if (!is$6(element, 'bpmn:Event')) {
|
|
120549
|
+
return;
|
|
120550
|
+
}
|
|
120551
|
+
|
|
120552
|
+
const messageEventDefinition = getMessageEventDefinition$1(element);
|
|
120553
|
+
|
|
120554
|
+
if (!messageEventDefinition) {
|
|
120555
|
+
return;
|
|
120556
|
+
}
|
|
120557
|
+
|
|
120558
|
+
const message = messageEventDefinition.get('messageRef');
|
|
120559
|
+
|
|
120560
|
+
if (!message) {
|
|
120561
|
+
return;
|
|
120562
|
+
}
|
|
120563
|
+
|
|
120564
|
+
const subscription = getSubscription(message);
|
|
120565
|
+
|
|
120566
|
+
if (!subscription) {
|
|
120567
|
+
return;
|
|
120568
|
+
}
|
|
120569
|
+
|
|
120570
|
+
if (!hasNoProperties(subscription)) {
|
|
120571
|
+
return;
|
|
120572
|
+
}
|
|
120573
|
+
|
|
120574
|
+
removeExtensionElements(element, message, subscription, commandStack);
|
|
120575
|
+
}, true);
|
|
120576
|
+
}
|
|
120577
|
+
}
|
|
120578
|
+
|
|
120579
|
+
CleanUpSubscriptionBehavior.$inject = [
|
|
120580
|
+
'eventBus',
|
|
120581
|
+
'commandStack'
|
|
120582
|
+
];
|
|
120583
|
+
|
|
120584
|
+
|
|
120585
|
+
// helpers //////////
|
|
120586
|
+
|
|
120587
|
+
function getMessageEventDefinition$1(event) {
|
|
120588
|
+
const businessObject = getBusinessObject$2(event);
|
|
120589
|
+
|
|
120590
|
+
return businessObject.get('eventDefinitions').find(eventDefinition => {
|
|
120591
|
+
return is$6(eventDefinition, 'bpmn:MessageEventDefinition');
|
|
120592
|
+
});
|
|
120593
|
+
}
|
|
120594
|
+
|
|
120595
|
+
function getSubscription(message) {
|
|
120596
|
+
return getExtensionElementsList$1(message, 'zeebe:Subscription')[ 0 ];
|
|
120597
|
+
}
|
|
120598
|
+
|
|
120599
|
+
function hasNoProperties(element) {
|
|
120600
|
+
const descriptor = element.$descriptor;
|
|
120601
|
+
|
|
120602
|
+
return descriptor.properties.every(property => {
|
|
120603
|
+
return element.get(property.name) === undefined;
|
|
120604
|
+
});
|
|
120605
|
+
}
|
|
120606
|
+
|
|
120348
120607
|
function getTimerEventDefinition(element) {
|
|
120349
120608
|
const businessObject = getBusinessObject$2(element);
|
|
120350
120609
|
|
|
@@ -120857,56 +121116,58 @@
|
|
|
120857
121116
|
return ids.nextPrefixed(prefix);
|
|
120858
121117
|
}
|
|
120859
121118
|
|
|
120860
|
-
const
|
|
121119
|
+
const FORM_KEY_PREFIX = 'camunda-forms:bpmn:',
|
|
121120
|
+
USER_TASK_FORM_ID_PREFIX = 'UserTaskForm_';
|
|
120861
121121
|
|
|
121122
|
+
function getFormDefinition(element) {
|
|
121123
|
+
const businessObject = getBusinessObject$2(element);
|
|
120862
121124
|
|
|
120863
|
-
|
|
120864
|
-
return createElement$2(
|
|
120865
|
-
'zeebe:FormDefinition',
|
|
120866
|
-
properties,
|
|
120867
|
-
extensionElements,
|
|
120868
|
-
bpmnFactory
|
|
120869
|
-
);
|
|
120870
|
-
}
|
|
121125
|
+
const formDefinitions = getExtensionElementsList$1(businessObject, 'zeebe:FormDefinition');
|
|
120871
121126
|
|
|
120872
|
-
|
|
120873
|
-
return getPrefixedId(USER_TASK_FORM_PREFIX);
|
|
121127
|
+
return formDefinitions[ 0 ];
|
|
120874
121128
|
}
|
|
120875
121129
|
|
|
120876
|
-
function
|
|
120877
|
-
|
|
120878
|
-
|
|
121130
|
+
function getUserTaskForm(element, options = {}) {
|
|
121131
|
+
let {
|
|
121132
|
+
formKey,
|
|
121133
|
+
rootElement
|
|
121134
|
+
} = options;
|
|
120879
121135
|
|
|
120880
|
-
|
|
120881
|
-
return createElement$2(
|
|
120882
|
-
'zeebe:UserTaskForm',
|
|
120883
|
-
properties,
|
|
120884
|
-
extensionElements,
|
|
120885
|
-
bpmnFactory
|
|
120886
|
-
);
|
|
120887
|
-
}
|
|
121136
|
+
rootElement = rootElement || getRootElement$1(element);
|
|
120888
121137
|
|
|
120889
|
-
|
|
120890
|
-
|
|
121138
|
+
if (!formKey) {
|
|
121139
|
+
const formDefinition = getFormDefinition(element);
|
|
120891
121140
|
|
|
120892
|
-
|
|
120893
|
-
|
|
121141
|
+
if (!formDefinition) {
|
|
121142
|
+
return;
|
|
121143
|
+
}
|
|
120894
121144
|
|
|
120895
|
-
|
|
121145
|
+
formKey = formDefinition.get('formKey');
|
|
121146
|
+
}
|
|
121147
|
+
|
|
121148
|
+
const userTaskForms = getExtensionElementsList$1(rootElement, 'zeebe:UserTaskForm');
|
|
121149
|
+
|
|
121150
|
+
return userTaskForms.find(userTaskForm => {
|
|
121151
|
+
return userTaskFormIdToFormKey(userTaskForm.get('id')) === formKey;
|
|
120896
121152
|
});
|
|
120897
121153
|
}
|
|
120898
121154
|
|
|
120899
|
-
function
|
|
120900
|
-
|
|
121155
|
+
function userTaskFormIdToFormKey(userTaskFormId) {
|
|
121156
|
+
return `${ FORM_KEY_PREFIX }${ userTaskFormId }`;
|
|
121157
|
+
}
|
|
120901
121158
|
|
|
120902
|
-
|
|
121159
|
+
function isUserTaskFormKey(formKey) {
|
|
121160
|
+
return formKey && formKey.startsWith(FORM_KEY_PREFIX);
|
|
121161
|
+
}
|
|
120903
121162
|
|
|
120904
|
-
|
|
121163
|
+
function createUserTaskFormId() {
|
|
121164
|
+
return getPrefixedId(USER_TASK_FORM_ID_PREFIX);
|
|
120905
121165
|
}
|
|
120906
121166
|
|
|
120907
|
-
function getRootElement$
|
|
120908
|
-
|
|
120909
|
-
|
|
121167
|
+
function getRootElement$1(element) {
|
|
121168
|
+
const businessObject = getBusinessObject$2(element);
|
|
121169
|
+
|
|
121170
|
+
let parent = businessObject;
|
|
120910
121171
|
|
|
120911
121172
|
while (parent.$parent && !is$6(parent, 'bpmn:Process')) {
|
|
120912
121173
|
parent = parent.$parent;
|
|
@@ -120915,27 +121176,29 @@
|
|
|
120915
121176
|
return parent;
|
|
120916
121177
|
}
|
|
120917
121178
|
|
|
120918
|
-
function getUserTaskForm(element, parent) {
|
|
120919
|
-
const rootElement = parent || getRootElement$2(element);
|
|
120920
|
-
|
|
120921
|
-
const formDefinition = getFormDefinition(element);
|
|
120922
|
-
|
|
120923
|
-
if (!formDefinition) {
|
|
120924
|
-
return;
|
|
120925
|
-
}
|
|
120926
|
-
|
|
120927
|
-
const formKey = formDefinition.get('zeebe:formKey');
|
|
120928
|
-
|
|
120929
|
-
return findUserTaskForm(formKey, rootElement);
|
|
120930
|
-
}
|
|
120931
|
-
|
|
120932
121179
|
/**
|
|
120933
|
-
* Zeebe BPMN specific
|
|
121180
|
+
* Zeebe BPMN specific forms behavior.
|
|
120934
121181
|
*/
|
|
120935
|
-
class
|
|
121182
|
+
class FormsBehavior extends CommandInterceptor$1 {
|
|
120936
121183
|
constructor(bpmnFactory, eventBus, modeling) {
|
|
120937
121184
|
super(eventBus);
|
|
120938
121185
|
|
|
121186
|
+
function removeUserTaskForm(element, moddleElement, userTaskForm) {
|
|
121187
|
+
const extensionElements = moddleElement.get('extensionElements');
|
|
121188
|
+
|
|
121189
|
+
const values = without(extensionElements.get('values'), userTaskForm);
|
|
121190
|
+
|
|
121191
|
+
modeling.updateModdleProperties(element, extensionElements, {
|
|
121192
|
+
values
|
|
121193
|
+
});
|
|
121194
|
+
|
|
121195
|
+
if (!values.length) {
|
|
121196
|
+
modeling.updateModdleProperties(element, moddleElement, {
|
|
121197
|
+
extensionElements: undefined
|
|
121198
|
+
});
|
|
121199
|
+
}
|
|
121200
|
+
}
|
|
121201
|
+
|
|
120939
121202
|
/**
|
|
120940
121203
|
* Remove zeebe:UserTaskForm on user task removed.
|
|
120941
121204
|
*/
|
|
@@ -120947,19 +121210,13 @@
|
|
|
120947
121210
|
|
|
120948
121211
|
const rootElement = getRootElement$1(oldParent);
|
|
120949
121212
|
|
|
120950
|
-
const userTaskForm = getUserTaskForm(shape, rootElement);
|
|
121213
|
+
const userTaskForm = getUserTaskForm(shape, { rootElement });
|
|
120951
121214
|
|
|
120952
121215
|
if (!is$6(shape, 'bpmn:UserTask') || !userTaskForm) {
|
|
120953
121216
|
return;
|
|
120954
121217
|
}
|
|
120955
121218
|
|
|
120956
|
-
|
|
120957
|
-
|
|
120958
|
-
const values = rootExtensionElements.get('values').filter((element) => {
|
|
120959
|
-
return element !== userTaskForm;
|
|
120960
|
-
});
|
|
120961
|
-
|
|
120962
|
-
modeling.updateModdleProperties(shape, rootExtensionElements, { values });
|
|
121219
|
+
removeUserTaskForm(shape, rootElement, userTaskForm);
|
|
120963
121220
|
}, true);
|
|
120964
121221
|
|
|
120965
121222
|
|
|
@@ -120998,9 +121255,11 @@
|
|
|
120998
121255
|
});
|
|
120999
121256
|
|
|
121000
121257
|
// (3) create new form definition
|
|
121001
|
-
const
|
|
121258
|
+
const userTaskFormId = createUserTaskFormId();
|
|
121002
121259
|
|
|
121003
|
-
const newFormDefinition =
|
|
121260
|
+
const newFormDefinition = createElement$2('zeebe:FormDefinition', {
|
|
121261
|
+
formKey: userTaskFormIdToFormKey(userTaskFormId)
|
|
121262
|
+
}, extensionElements, bpmnFactory);
|
|
121004
121263
|
|
|
121005
121264
|
values = [
|
|
121006
121265
|
...values,
|
|
@@ -121012,8 +121271,8 @@
|
|
|
121012
121271
|
});
|
|
121013
121272
|
|
|
121014
121273
|
// (4) create new user task form
|
|
121015
|
-
const userTaskForm =
|
|
121016
|
-
id:
|
|
121274
|
+
const userTaskForm = createElement$2('zeebe:UserTaskForm', {
|
|
121275
|
+
id: userTaskFormId,
|
|
121017
121276
|
body: oldUserTaskForm ? oldUserTaskForm.get('body') : ''
|
|
121018
121277
|
}, rootExtensionElements, bpmnFactory);
|
|
121019
121278
|
|
|
@@ -121025,27 +121284,88 @@
|
|
|
121025
121284
|
});
|
|
121026
121285
|
}, true);
|
|
121027
121286
|
|
|
121287
|
+
|
|
121288
|
+
/**
|
|
121289
|
+
* Ensure that a user task only has one of the following:
|
|
121290
|
+
*
|
|
121291
|
+
* 1. zeebe:FormDefinition with zeebe:formId (linked Camunda form)
|
|
121292
|
+
* 2. zeebe:FormDefinition with zeebe:formKey in the format of camunda-forms:bpmn:UserTaskForm_1 (embedded Camunda form)
|
|
121293
|
+
* 3. zeebe:FormDefinition with zeebe:formKey (custom form)
|
|
121294
|
+
*/
|
|
121295
|
+
this.preExecute('element.updateModdleProperties', function(context) {
|
|
121296
|
+
const {
|
|
121297
|
+
moddleElement,
|
|
121298
|
+
properties
|
|
121299
|
+
} = context;
|
|
121300
|
+
|
|
121301
|
+
if (is$6(moddleElement, 'zeebe:FormDefinition')) {
|
|
121302
|
+
if ('formId' in properties) {
|
|
121303
|
+
properties.formKey = undefined;
|
|
121304
|
+
} else if ('formKey' in properties) {
|
|
121305
|
+
properties.formId = undefined;
|
|
121306
|
+
}
|
|
121307
|
+
}
|
|
121308
|
+
}, true);
|
|
121309
|
+
|
|
121310
|
+
/**
|
|
121311
|
+
* Clean up user task form after form key or definition is removed. Clean up
|
|
121312
|
+
* empty extension elements after form definition is removed.
|
|
121313
|
+
*/
|
|
121314
|
+
this.postExecute('element.updateModdleProperties', function(context) {
|
|
121315
|
+
const {
|
|
121316
|
+
element,
|
|
121317
|
+
moddleElement,
|
|
121318
|
+
oldProperties
|
|
121319
|
+
} = context;
|
|
121320
|
+
|
|
121321
|
+
if (is$6(moddleElement, 'zeebe:FormDefinition')) {
|
|
121322
|
+
const formKey = moddleElement.get('formKey');
|
|
121323
|
+
|
|
121324
|
+
if (!formKey || !isUserTaskFormKey(formKey)) {
|
|
121325
|
+
const userTaskForm = getUserTaskForm(element, { formKey: oldProperties.formKey });
|
|
121326
|
+
|
|
121327
|
+
if (userTaskForm) {
|
|
121328
|
+
removeUserTaskForm(element, getRootElement$1(element), userTaskForm);
|
|
121329
|
+
}
|
|
121330
|
+
}
|
|
121331
|
+
} else if (isExtensionElementRemoved(context, 'zeebe:FormDefinition')) {
|
|
121332
|
+
const formDefinition = oldProperties.values.find(value => is$6(value, 'zeebe:FormDefinition'));
|
|
121333
|
+
|
|
121334
|
+
const userTaskForm = getUserTaskForm(element, { formKey: formDefinition.get('formKey') });
|
|
121335
|
+
|
|
121336
|
+
if (userTaskForm) {
|
|
121337
|
+
removeUserTaskForm(element, getRootElement$1(element), userTaskForm);
|
|
121338
|
+
}
|
|
121339
|
+
|
|
121340
|
+
if (!moddleElement.get('values').length) {
|
|
121341
|
+
modeling.updateProperties(element, {
|
|
121342
|
+
extensionElements: undefined
|
|
121343
|
+
});
|
|
121344
|
+
}
|
|
121345
|
+
}
|
|
121346
|
+
}, true);
|
|
121347
|
+
|
|
121028
121348
|
}
|
|
121029
121349
|
}
|
|
121030
121350
|
|
|
121031
|
-
|
|
121351
|
+
FormsBehavior.$inject = [
|
|
121032
121352
|
'bpmnFactory',
|
|
121033
121353
|
'eventBus',
|
|
121034
121354
|
'modeling'
|
|
121035
121355
|
];
|
|
121036
121356
|
|
|
121357
|
+
function isExtensionElementRemoved(context, type) {
|
|
121358
|
+
const {
|
|
121359
|
+
moddleElement,
|
|
121360
|
+
oldProperties,
|
|
121361
|
+
properties
|
|
121362
|
+
} = context;
|
|
121037
121363
|
|
|
121038
|
-
|
|
121039
|
-
|
|
121040
|
-
|
|
121041
|
-
|
|
121042
|
-
|
|
121043
|
-
|
|
121044
|
-
while (parent.$parent && !is$6(parent, 'bpmn:Process')) {
|
|
121045
|
-
parent = parent.$parent;
|
|
121046
|
-
}
|
|
121047
|
-
|
|
121048
|
-
return parent;
|
|
121364
|
+
return is$6(moddleElement, 'bpmn:ExtensionElements')
|
|
121365
|
+
&& 'values' in oldProperties
|
|
121366
|
+
&& 'values' in properties
|
|
121367
|
+
&& oldProperties.values.find(value => is$6(value, type))
|
|
121368
|
+
&& !properties.values.find(value => is$6(value, type));
|
|
121049
121369
|
}
|
|
121050
121370
|
|
|
121051
121371
|
const HIGH_PRIORITY$5 = 5000;
|
|
@@ -121252,22 +121572,24 @@
|
|
|
121252
121572
|
__init__: [
|
|
121253
121573
|
'cleanUpBusinessRuleTaskBehavior',
|
|
121254
121574
|
'cleanUpEndEventBehavior',
|
|
121575
|
+
'cleanUpSubscriptionBehavior',
|
|
121255
121576
|
'cleanUpTimerExpressionBehavior',
|
|
121256
121577
|
'copyPasteBehavior',
|
|
121257
121578
|
'createZeebeCallActivityBehavior',
|
|
121258
121579
|
'deleteParticipantBehaviour',
|
|
121259
|
-
'
|
|
121580
|
+
'formsBehavior',
|
|
121260
121581
|
'removeAssignmentDefinitionBehavior',
|
|
121261
121582
|
'removeTaskScheduleBehavior',
|
|
121262
121583
|
'updatePropagateAllChildVariablesBehavior'
|
|
121263
121584
|
],
|
|
121264
121585
|
cleanUpBusinessRuleTaskBehavior: [ 'type', CleanUpBusinessRuleTaskBehavior ],
|
|
121265
121586
|
cleanUpEndEventBehavior: [ 'type', CleanUpEndEventBehavior ],
|
|
121587
|
+
cleanUpSubscriptionBehavior: [ 'type', CleanUpSubscriptionBehavior ],
|
|
121266
121588
|
cleanUpTimerExpressionBehavior: [ 'type', CleanUpTimerExpressionBehavior ],
|
|
121267
121589
|
copyPasteBehavior: [ 'type', ZeebeModdleExtension ],
|
|
121268
121590
|
createZeebeCallActivityBehavior: [ 'type', CreateZeebeCallActivityBehavior ],
|
|
121269
121591
|
deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
|
|
121270
|
-
|
|
121592
|
+
formsBehavior: [ 'type', FormsBehavior ],
|
|
121271
121593
|
removeAssignmentDefinitionBehavior: [ 'type', RemoveAssignmentDefinitionBehavior ],
|
|
121272
121594
|
removeTaskScheduleBehavior: [ 'type', RemoveTaskScheduleBehavior ],
|
|
121273
121595
|
updatePropagateAllChildVariablesBehavior: [ 'type', UpdatePropagateAllChildVariablesBehavior ]
|
|
@@ -127416,7 +127738,7 @@
|
|
|
127416
127738
|
*
|
|
127417
127739
|
* @return {Object} the parsed name
|
|
127418
127740
|
*/
|
|
127419
|
-
function parseName
|
|
127741
|
+
function parseName(name, defaultPrefix) {
|
|
127420
127742
|
var parts = name.split(/:/),
|
|
127421
127743
|
localName,
|
|
127422
127744
|
prefix;
|
|
@@ -127518,8 +127840,8 @@
|
|
|
127518
127840
|
DescriptorBuilder.prototype.redefineProperty = function (p, targetPropertyName, replace) {
|
|
127519
127841
|
var nsPrefix = p.ns.prefix;
|
|
127520
127842
|
var parts = targetPropertyName.split('#');
|
|
127521
|
-
var name = parseName
|
|
127522
|
-
var attrName = parseName
|
|
127843
|
+
var name = parseName(parts[0], nsPrefix);
|
|
127844
|
+
var attrName = parseName(parts[1], name.prefix).name;
|
|
127523
127845
|
var redefinedProperty = this.propertiesByName[attrName];
|
|
127524
127846
|
if (!redefinedProperty) {
|
|
127525
127847
|
throw new Error('refined property <' + attrName + '> not found');
|
|
@@ -127654,19 +127976,19 @@
|
|
|
127654
127976
|
properties: (type.properties || []).slice(),
|
|
127655
127977
|
meta: assign$2(type.meta || {})
|
|
127656
127978
|
});
|
|
127657
|
-
var ns = parseName
|
|
127979
|
+
var ns = parseName(type.name, pkg.prefix),
|
|
127658
127980
|
name = ns.name,
|
|
127659
127981
|
propertiesByName = {};
|
|
127660
127982
|
|
|
127661
127983
|
// parse properties
|
|
127662
127984
|
forEach$2(type.properties, bind$2(function (p) {
|
|
127663
127985
|
// namespace property names
|
|
127664
|
-
var propertyNs = parseName
|
|
127986
|
+
var propertyNs = parseName(p.name, ns.prefix),
|
|
127665
127987
|
propertyName = propertyNs.name;
|
|
127666
127988
|
|
|
127667
127989
|
// namespace property types
|
|
127668
127990
|
if (!isBuiltIn(p.type)) {
|
|
127669
|
-
p.type = parseName
|
|
127991
|
+
p.type = parseName(p.type, propertyNs.prefix).name;
|
|
127670
127992
|
}
|
|
127671
127993
|
assign$2(p, {
|
|
127672
127994
|
ns: propertyNs,
|
|
@@ -127682,7 +128004,7 @@
|
|
|
127682
128004
|
propertiesByName: propertiesByName
|
|
127683
128005
|
});
|
|
127684
128006
|
forEach$2(type.extends, bind$2(function (extendsName) {
|
|
127685
|
-
var extendsNameNs = parseName
|
|
128007
|
+
var extendsNameNs = parseName(extendsName, ns.prefix);
|
|
127686
128008
|
var extended = this.typeMap[extendsNameNs.name];
|
|
127687
128009
|
extended.traits = extended.traits || [];
|
|
127688
128010
|
extended.traits.push(name);
|
|
@@ -127717,7 +128039,7 @@
|
|
|
127717
128039
|
* @param {Boolean} [trait=false]
|
|
127718
128040
|
*/
|
|
127719
128041
|
function traverse(cls, trait) {
|
|
127720
|
-
var parentNs = parseName
|
|
128042
|
+
var parentNs = parseName(cls, isBuiltIn(cls) ? '' : nsName.prefix);
|
|
127721
128043
|
self.mapTypes(parentNs, iterator, trait);
|
|
127722
128044
|
}
|
|
127723
128045
|
|
|
@@ -127756,7 +128078,7 @@
|
|
|
127756
128078
|
* @return {Descriptor} the resulting effective descriptor
|
|
127757
128079
|
*/
|
|
127758
128080
|
Registry.prototype.getEffectiveDescriptor = function (name) {
|
|
127759
|
-
var nsName = parseName
|
|
128081
|
+
var nsName = parseName(name);
|
|
127760
128082
|
var builder = new DescriptorBuilder(nsName);
|
|
127761
128083
|
this.mapTypes(nsName, function (type, inherited) {
|
|
127762
128084
|
builder.addTrait(type, inherited);
|
|
@@ -128042,7 +128364,7 @@
|
|
|
128042
128364
|
* @return {Object} the any type instance
|
|
128043
128365
|
*/
|
|
128044
128366
|
Moddle.prototype.createAny = function (name, nsUri, properties) {
|
|
128045
|
-
var nameNs = parseName
|
|
128367
|
+
var nameNs = parseName(name);
|
|
128046
128368
|
var element = {
|
|
128047
128369
|
$type: name,
|
|
128048
128370
|
$instanceOf: function (type) {
|
|
@@ -129147,7 +129469,7 @@
|
|
|
129147
129469
|
}
|
|
129148
129470
|
}
|
|
129149
129471
|
function normalizeXsiTypeName(name, model) {
|
|
129150
|
-
var nameNs = parseName
|
|
129472
|
+
var nameNs = parseName(name);
|
|
129151
129473
|
var pkg = model.getPackage(nameNs.prefix);
|
|
129152
129474
|
return prefixedToName(nameNs, pkg);
|
|
129153
129475
|
}
|
|
@@ -129175,7 +129497,7 @@
|
|
|
129175
129497
|
* @param {ElementHandler} options.rootHandler the root handler for parsing a document
|
|
129176
129498
|
* @param {boolean} [options.lax=false] whether or not to ignore invalid elements
|
|
129177
129499
|
*/
|
|
129178
|
-
function Context
|
|
129500
|
+
function Context(options) {
|
|
129179
129501
|
/**
|
|
129180
129502
|
* @property {ElementHandler} rootHandler
|
|
129181
129503
|
*/
|
|
@@ -129382,7 +129704,7 @@
|
|
|
129382
129704
|
if (prop) {
|
|
129383
129705
|
value = coerceType(prop.type, value);
|
|
129384
129706
|
} else if (name !== 'xmlns') {
|
|
129385
|
-
propNameNs = parseName
|
|
129707
|
+
propNameNs = parseName(name, descriptor.ns.prefix);
|
|
129386
129708
|
|
|
129387
129709
|
// check whether attribute is defined in a well-known namespace
|
|
129388
129710
|
// if that is the case we emit a warning to indicate potential misuse
|
|
@@ -129402,7 +129724,7 @@
|
|
|
129402
129724
|
};
|
|
129403
129725
|
ElementHandler.prototype.getPropertyForNode = function (node) {
|
|
129404
129726
|
var name = node.name;
|
|
129405
|
-
var nameNs = parseName
|
|
129727
|
+
var nameNs = parseName(name);
|
|
129406
129728
|
var type = this.type,
|
|
129407
129729
|
model = this.model,
|
|
129408
129730
|
descriptor = getModdleDescriptor(type);
|
|
@@ -129531,7 +129853,7 @@
|
|
|
129531
129853
|
RootElementHandler.prototype = Object.create(ElementHandler.prototype);
|
|
129532
129854
|
RootElementHandler.prototype.createElement = function (node) {
|
|
129533
129855
|
var name = node.name,
|
|
129534
|
-
nameNs = parseName
|
|
129856
|
+
nameNs = parseName(name),
|
|
129535
129857
|
model = this.model,
|
|
129536
129858
|
type = this.type,
|
|
129537
129859
|
pkg = model.getPackage(nameNs.prefix),
|
|
@@ -129553,7 +129875,7 @@
|
|
|
129553
129875
|
GenericElementHandler.prototype = Object.create(BaseElementHandler.prototype);
|
|
129554
129876
|
GenericElementHandler.prototype.createElement = function (node) {
|
|
129555
129877
|
var name = node.name,
|
|
129556
|
-
ns = parseName
|
|
129878
|
+
ns = parseName(name),
|
|
129557
129879
|
prefix = ns.prefix,
|
|
129558
129880
|
uri = node.ns[prefix + '$uri'],
|
|
129559
129881
|
attributes = node.attributes;
|
|
@@ -129642,7 +129964,7 @@
|
|
|
129642
129964
|
}
|
|
129643
129965
|
var model = this.model,
|
|
129644
129966
|
lax = this.lax;
|
|
129645
|
-
var context = new Context
|
|
129967
|
+
var context = new Context(assign$2({}, options, {
|
|
129646
129968
|
rootHandler: rootHandler
|
|
129647
129969
|
})),
|
|
129648
129970
|
parser = new Parser({
|
|
@@ -130113,7 +130435,7 @@
|
|
|
130113
130435
|
ElementSerializer.prototype.nsAttributeName = function (element) {
|
|
130114
130436
|
var ns;
|
|
130115
130437
|
if (isString$2(element)) {
|
|
130116
|
-
ns = parseName
|
|
130438
|
+
ns = parseName(element);
|
|
130117
130439
|
} else {
|
|
130118
130440
|
ns = element.ns;
|
|
130119
130441
|
}
|
|
@@ -130170,7 +130492,7 @@
|
|
|
130170
130492
|
};
|
|
130171
130493
|
ElementSerializer.prototype.parseNsAttribute = function (element, name, value) {
|
|
130172
130494
|
var model = element.$model;
|
|
130173
|
-
var nameNs = parseName
|
|
130495
|
+
var nameNs = parseName(name);
|
|
130174
130496
|
var ns;
|
|
130175
130497
|
|
|
130176
130498
|
// parse xmlns:foo="http://foo.bar"
|
|
@@ -131098,1187 +131420,6 @@
|
|
|
131098
131420
|
return newVariable;
|
|
131099
131421
|
}
|
|
131100
131422
|
|
|
131101
|
-
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
131102
|
-
const propertyIdentifier = 119,
|
|
131103
|
-
identifier = 120,
|
|
131104
|
-
nameIdentifier = 121,
|
|
131105
|
-
insertSemi = 122,
|
|
131106
|
-
expression0 = 126,
|
|
131107
|
-
ForExpression = 4,
|
|
131108
|
-
forExpressionStart = 129,
|
|
131109
|
-
ForInExpression = 7,
|
|
131110
|
-
Name = 8,
|
|
131111
|
-
Identifier = 9,
|
|
131112
|
-
AdditionalIdentifier = 10,
|
|
131113
|
-
forExpressionBodyStart = 137,
|
|
131114
|
-
IfExpression = 18,
|
|
131115
|
-
ifExpressionStart = 138,
|
|
131116
|
-
QuantifiedExpression = 22,
|
|
131117
|
-
quantifiedExpressionStart = 139,
|
|
131118
|
-
QuantifiedInExpression = 26,
|
|
131119
|
-
PositiveUnaryTest = 36,
|
|
131120
|
-
ArithmeticExpression = 40,
|
|
131121
|
-
arithmeticPlusStart = 143,
|
|
131122
|
-
arithmeticTimesStart = 144,
|
|
131123
|
-
arithmeticExpStart = 145,
|
|
131124
|
-
arithmeticUnaryStart = 146,
|
|
131125
|
-
VariableName = 47,
|
|
131126
|
-
PathExpression = 67,
|
|
131127
|
-
pathExpressionStart = 151,
|
|
131128
|
-
FilterExpression = 69,
|
|
131129
|
-
filterExpressionStart = 152,
|
|
131130
|
-
FunctionInvocation = 71,
|
|
131131
|
-
functionInvocationStart = 153,
|
|
131132
|
-
ParameterName = 75,
|
|
131133
|
-
nil = 158,
|
|
131134
|
-
NumericLiteral = 78,
|
|
131135
|
-
StringLiteral = 79,
|
|
131136
|
-
BooleanLiteral = 80,
|
|
131137
|
-
List = 88,
|
|
131138
|
-
listStart = 169,
|
|
131139
|
-
FunctionDefinition = 89,
|
|
131140
|
-
functionDefinitionStart = 171,
|
|
131141
|
-
Context = 96,
|
|
131142
|
-
contextStart = 173,
|
|
131143
|
-
ContextEntry = 97,
|
|
131144
|
-
PropertyName = 99,
|
|
131145
|
-
PropertyIdentifier = 100;
|
|
131146
|
-
|
|
131147
|
-
/* global console,process */
|
|
131148
|
-
|
|
131149
|
-
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
131150
|
-
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
131151
|
-
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
131152
|
-
|
|
131153
|
-
const spaceChars = [
|
|
131154
|
-
9, 11, 12, 32, 133, 160,
|
|
131155
|
-
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
131156
|
-
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
131157
|
-
];
|
|
131158
|
-
|
|
131159
|
-
const newlineChars = chars('\n\r');
|
|
131160
|
-
|
|
131161
|
-
const additionalNameChars = chars("'./-+*");
|
|
131162
|
-
|
|
131163
|
-
/**
|
|
131164
|
-
* @typedef { VariableContext | any } ContextValue
|
|
131165
|
-
*/
|
|
131166
|
-
|
|
131167
|
-
/**
|
|
131168
|
-
* @param { string } str
|
|
131169
|
-
* @return { number[] }
|
|
131170
|
-
*/
|
|
131171
|
-
function chars(str) {
|
|
131172
|
-
return Array.from(str).map(s => s.charCodeAt(0));
|
|
131173
|
-
}
|
|
131174
|
-
|
|
131175
|
-
/**
|
|
131176
|
-
* @param { number } ch
|
|
131177
|
-
* @return { boolean }
|
|
131178
|
-
*/
|
|
131179
|
-
function isStartChar(ch) {
|
|
131180
|
-
return (
|
|
131181
|
-
ch === 63 // ?
|
|
131182
|
-
) || (
|
|
131183
|
-
ch === 95 // _
|
|
131184
|
-
) || (
|
|
131185
|
-
ch >= 65 && ch <= 90 // A-Z
|
|
131186
|
-
) || (
|
|
131187
|
-
ch >= 97 && ch <= 122 // a-z
|
|
131188
|
-
) || (
|
|
131189
|
-
ch >= 161 && !isPartChar(ch) && !isSpace(ch)
|
|
131190
|
-
);
|
|
131191
|
-
}
|
|
131192
|
-
|
|
131193
|
-
/**
|
|
131194
|
-
* @param { number } ch
|
|
131195
|
-
* @return { boolean }
|
|
131196
|
-
*/
|
|
131197
|
-
function isAdditional(ch) {
|
|
131198
|
-
return additionalNameChars.includes(ch);
|
|
131199
|
-
}
|
|
131200
|
-
|
|
131201
|
-
/**
|
|
131202
|
-
* @param { number } ch
|
|
131203
|
-
* @return { boolean }
|
|
131204
|
-
*/
|
|
131205
|
-
function isPartChar(ch) {
|
|
131206
|
-
return (
|
|
131207
|
-
ch >= 48 && ch <= 57 // 0-9
|
|
131208
|
-
) || (
|
|
131209
|
-
ch === 0xB7
|
|
131210
|
-
) || (
|
|
131211
|
-
ch >= 0x0300 && ch <= 0x036F
|
|
131212
|
-
) || (
|
|
131213
|
-
ch >= 0x203F && ch <= 0x2040
|
|
131214
|
-
);
|
|
131215
|
-
}
|
|
131216
|
-
|
|
131217
|
-
/**
|
|
131218
|
-
* @param { number } ch
|
|
131219
|
-
* @return { boolean }
|
|
131220
|
-
*/
|
|
131221
|
-
function isSpace(ch) {
|
|
131222
|
-
return spaceChars.includes(ch);
|
|
131223
|
-
}
|
|
131224
|
-
|
|
131225
|
-
// eslint-disable-next-line
|
|
131226
|
-
function indent(str, spaces) {
|
|
131227
|
-
return spaces.concat(
|
|
131228
|
-
str.split(/\n/g).join('\n' + spaces)
|
|
131229
|
-
);
|
|
131230
|
-
}
|
|
131231
|
-
|
|
131232
|
-
/**
|
|
131233
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131234
|
-
* @param { number } [offset]
|
|
131235
|
-
* @param { boolean } [includeOperators]
|
|
131236
|
-
*
|
|
131237
|
-
* @return { { token: string, offset: number } | null }
|
|
131238
|
-
*/
|
|
131239
|
-
function parseAdditionalSymbol(input, offset = 0) {
|
|
131240
|
-
|
|
131241
|
-
const next = input.peek(offset);
|
|
131242
|
-
|
|
131243
|
-
if (isAdditional(next)) {
|
|
131244
|
-
return {
|
|
131245
|
-
offset: 1,
|
|
131246
|
-
token: String.fromCharCode(next)
|
|
131247
|
-
};
|
|
131248
|
-
}
|
|
131249
|
-
|
|
131250
|
-
return null;
|
|
131251
|
-
}
|
|
131252
|
-
|
|
131253
|
-
/**
|
|
131254
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131255
|
-
* @param { number } [offset]
|
|
131256
|
-
* @param { boolean } [namePart]
|
|
131257
|
-
*
|
|
131258
|
-
* @return { { token: string, offset: number } | null }
|
|
131259
|
-
*/
|
|
131260
|
-
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
131261
|
-
for (let inside = false, chars = [], i = 0;; i++) {
|
|
131262
|
-
const next = input.peek(offset + i);
|
|
131263
|
-
|
|
131264
|
-
if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
|
|
131265
|
-
if (!inside) {
|
|
131266
|
-
inside = true;
|
|
131267
|
-
}
|
|
131268
|
-
|
|
131269
|
-
chars.push(next);
|
|
131270
|
-
} else {
|
|
131271
|
-
|
|
131272
|
-
if (chars.length) {
|
|
131273
|
-
return {
|
|
131274
|
-
token: String.fromCharCode(...chars),
|
|
131275
|
-
offset: i
|
|
131276
|
-
};
|
|
131277
|
-
}
|
|
131278
|
-
|
|
131279
|
-
return null;
|
|
131280
|
-
}
|
|
131281
|
-
}
|
|
131282
|
-
}
|
|
131283
|
-
|
|
131284
|
-
/**
|
|
131285
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131286
|
-
* @param { number } offset
|
|
131287
|
-
*
|
|
131288
|
-
* @return { { token: string, offset: number } | null }
|
|
131289
|
-
*/
|
|
131290
|
-
function parseSpaces(input, offset) {
|
|
131291
|
-
|
|
131292
|
-
for (let inside = false, i = 0;; i++) {
|
|
131293
|
-
let next = input.peek(offset + i);
|
|
131294
|
-
|
|
131295
|
-
if (isSpace(next)) {
|
|
131296
|
-
if (!inside) {
|
|
131297
|
-
inside = true;
|
|
131298
|
-
}
|
|
131299
|
-
} else {
|
|
131300
|
-
if (inside) {
|
|
131301
|
-
return {
|
|
131302
|
-
token: ' ',
|
|
131303
|
-
offset: i
|
|
131304
|
-
};
|
|
131305
|
-
}
|
|
131306
|
-
|
|
131307
|
-
return null;
|
|
131308
|
-
}
|
|
131309
|
-
}
|
|
131310
|
-
}
|
|
131311
|
-
|
|
131312
|
-
/**
|
|
131313
|
-
* Parse a name from the input and return the first match, if any.
|
|
131314
|
-
*
|
|
131315
|
-
* @param { import('@lezer/lr').InputStream } input
|
|
131316
|
-
* @param { Variables } variables
|
|
131317
|
-
*
|
|
131318
|
-
* @return { { token: string, offset: number, term: number } | null }
|
|
131319
|
-
*/
|
|
131320
|
-
function parseName(input, variables) {
|
|
131321
|
-
const contextKeys = variables.contextKeys();
|
|
131322
|
-
|
|
131323
|
-
const start = variables.tokens;
|
|
131324
|
-
|
|
131325
|
-
for (let i = 0, tokens = [], nextMatch = null;;) {
|
|
131326
|
-
|
|
131327
|
-
const namePart = (start.length + tokens.length) > 0;
|
|
131328
|
-
const maybeSpace = tokens.length > 0;
|
|
131329
|
-
|
|
131330
|
-
const match = (
|
|
131331
|
-
parseIdentifier(input, i, namePart) ||
|
|
131332
|
-
namePart && parseAdditionalSymbol(input, i) ||
|
|
131333
|
-
maybeSpace && parseSpaces(input, i)
|
|
131334
|
-
);
|
|
131335
|
-
|
|
131336
|
-
// match is required
|
|
131337
|
-
if (!match) {
|
|
131338
|
-
return nextMatch;
|
|
131339
|
-
}
|
|
131340
|
-
|
|
131341
|
-
const {
|
|
131342
|
-
token,
|
|
131343
|
-
offset
|
|
131344
|
-
} = match;
|
|
131345
|
-
|
|
131346
|
-
i += offset;
|
|
131347
|
-
|
|
131348
|
-
if (token === ' ') {
|
|
131349
|
-
continue;
|
|
131350
|
-
}
|
|
131351
|
-
|
|
131352
|
-
tokens = [ ...tokens, token ];
|
|
131353
|
-
|
|
131354
|
-
const name = [ ...start, ...tokens ].join(' ');
|
|
131355
|
-
|
|
131356
|
-
if (contextKeys.some(el => el === name)) {
|
|
131357
|
-
const token = tokens[0];
|
|
131358
|
-
|
|
131359
|
-
nextMatch = {
|
|
131360
|
-
token,
|
|
131361
|
-
offset: token.length,
|
|
131362
|
-
term: nameIdentifier
|
|
131363
|
-
};
|
|
131364
|
-
}
|
|
131365
|
-
|
|
131366
|
-
if (dateTimeIdentifiers.some(el => el === name)) {
|
|
131367
|
-
const token = tokens[0];
|
|
131368
|
-
|
|
131369
|
-
// parse date time identifiers as normal
|
|
131370
|
-
// identifiers to allow specialization to kick in
|
|
131371
|
-
//
|
|
131372
|
-
// cf. https://github.com/nikku/lezer-feel/issues/8
|
|
131373
|
-
nextMatch = {
|
|
131374
|
-
token,
|
|
131375
|
-
offset: token.length,
|
|
131376
|
-
term: identifier
|
|
131377
|
-
};
|
|
131378
|
-
}
|
|
131379
|
-
|
|
131380
|
-
if (
|
|
131381
|
-
!contextKeys.some(el => el.startsWith(name)) &&
|
|
131382
|
-
!dateTimeIdentifiers.some(el => el.startsWith(name))
|
|
131383
|
-
) {
|
|
131384
|
-
return nextMatch;
|
|
131385
|
-
}
|
|
131386
|
-
}
|
|
131387
|
-
|
|
131388
|
-
}
|
|
131389
|
-
|
|
131390
|
-
const identifiersMap = {
|
|
131391
|
-
[ identifier ]: 'identifier',
|
|
131392
|
-
[ nameIdentifier ]: 'nameIdentifier'
|
|
131393
|
-
};
|
|
131394
|
-
|
|
131395
|
-
const identifiers = new ExternalTokenizer((input, stack) => {
|
|
131396
|
-
|
|
131397
|
-
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
131398
|
-
|
|
131399
|
-
const nameMatch = parseName(input, stack.context);
|
|
131400
|
-
|
|
131401
|
-
const start = stack.context.tokens;
|
|
131402
|
-
|
|
131403
|
-
const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
|
|
131404
|
-
|
|
131405
|
-
if (match) {
|
|
131406
|
-
input.advance(match.offset);
|
|
131407
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier);
|
|
131408
|
-
|
|
131409
|
-
LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
|
|
131410
|
-
}
|
|
131411
|
-
}, { contextual: true });
|
|
131412
|
-
|
|
131413
|
-
|
|
131414
|
-
const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
|
|
131415
|
-
|
|
131416
|
-
LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
131417
|
-
|
|
131418
|
-
const start = stack.context.tokens;
|
|
131419
|
-
|
|
131420
|
-
const match = parseIdentifier(input, 0, start.length > 0);
|
|
131421
|
-
|
|
131422
|
-
if (match) {
|
|
131423
|
-
input.advance(match.offset);
|
|
131424
|
-
input.acceptToken(propertyIdentifier);
|
|
131425
|
-
|
|
131426
|
-
LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
131427
|
-
}
|
|
131428
|
-
});
|
|
131429
|
-
|
|
131430
|
-
|
|
131431
|
-
const insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
131432
|
-
|
|
131433
|
-
LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
|
|
131434
|
-
|
|
131435
|
-
let offset;
|
|
131436
|
-
let insert = false;
|
|
131437
|
-
|
|
131438
|
-
for (offset = 0;; offset++) {
|
|
131439
|
-
const char = input.peek(offset);
|
|
131440
|
-
|
|
131441
|
-
if (spaceChars.includes(char)) {
|
|
131442
|
-
continue;
|
|
131443
|
-
}
|
|
131444
|
-
|
|
131445
|
-
if (newlineChars.includes(char)) {
|
|
131446
|
-
insert = true;
|
|
131447
|
-
}
|
|
131448
|
-
|
|
131449
|
-
break;
|
|
131450
|
-
}
|
|
131451
|
-
|
|
131452
|
-
if (insert) {
|
|
131453
|
-
|
|
131454
|
-
const identifier = parseIdentifier(input, offset + 1);
|
|
131455
|
-
const spaces = parseSpaces(input, offset + 1);
|
|
131456
|
-
|
|
131457
|
-
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
131458
|
-
return;
|
|
131459
|
-
}
|
|
131460
|
-
|
|
131461
|
-
LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
131462
|
-
input.acceptToken(insertSemi);
|
|
131463
|
-
}
|
|
131464
|
-
});
|
|
131465
|
-
|
|
131466
|
-
const prefixedContextStarts = {
|
|
131467
|
-
[ functionInvocationStart ]: 'FunctionInvocation',
|
|
131468
|
-
[ filterExpressionStart ]: 'FilterExpression',
|
|
131469
|
-
[ pathExpressionStart ]: 'PathExpression'
|
|
131470
|
-
};
|
|
131471
|
-
|
|
131472
|
-
const contextStarts = {
|
|
131473
|
-
[ contextStart ]: 'Context',
|
|
131474
|
-
[ functionDefinitionStart ]: 'FunctionDefinition',
|
|
131475
|
-
[ forExpressionStart ]: 'ForExpression',
|
|
131476
|
-
[ listStart ]: 'List',
|
|
131477
|
-
[ ifExpressionStart ]: 'IfExpression',
|
|
131478
|
-
[ quantifiedExpressionStart ]: 'QuantifiedExpression'
|
|
131479
|
-
};
|
|
131480
|
-
|
|
131481
|
-
const contextEnds = {
|
|
131482
|
-
[ Context ]: 'Context',
|
|
131483
|
-
[ FunctionDefinition ]: 'FunctionDefinition',
|
|
131484
|
-
[ ForExpression ]: 'ForExpression',
|
|
131485
|
-
[ List ]: 'List',
|
|
131486
|
-
[ IfExpression ]: 'IfExpression',
|
|
131487
|
-
[ QuantifiedExpression ]: 'QuantifiedExpression',
|
|
131488
|
-
[ PathExpression ]: 'PathExpression',
|
|
131489
|
-
[ FunctionInvocation ]: 'FunctionInvocation',
|
|
131490
|
-
[ FilterExpression ]: 'FilterExpression',
|
|
131491
|
-
[ ArithmeticExpression ]: 'ArithmeticExpression'
|
|
131492
|
-
};
|
|
131493
|
-
|
|
131494
|
-
class ValueProducer {
|
|
131495
|
-
|
|
131496
|
-
/**
|
|
131497
|
-
* @param { Function } fn
|
|
131498
|
-
*/
|
|
131499
|
-
constructor(fn) {
|
|
131500
|
-
this.fn = fn;
|
|
131501
|
-
}
|
|
131502
|
-
|
|
131503
|
-
get(variables) {
|
|
131504
|
-
return this.fn(variables);
|
|
131505
|
-
}
|
|
131506
|
-
|
|
131507
|
-
/**
|
|
131508
|
-
* @param { Function }
|
|
131509
|
-
*
|
|
131510
|
-
* @return { ValueProducer }
|
|
131511
|
-
*/
|
|
131512
|
-
static of(fn) {
|
|
131513
|
-
return new ValueProducer(fn);
|
|
131514
|
-
}
|
|
131515
|
-
|
|
131516
|
-
}
|
|
131517
|
-
|
|
131518
|
-
const dateTimeLiterals = {
|
|
131519
|
-
'date and time': 1,
|
|
131520
|
-
'date': 1,
|
|
131521
|
-
'time': 1,
|
|
131522
|
-
'duration': 1
|
|
131523
|
-
};
|
|
131524
|
-
|
|
131525
|
-
const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
131526
|
-
|
|
131527
|
-
|
|
131528
|
-
/**
|
|
131529
|
-
* A basic key-value store to hold context values.
|
|
131530
|
-
*/
|
|
131531
|
-
class VariableContext {
|
|
131532
|
-
|
|
131533
|
-
/**
|
|
131534
|
-
* Creates a new context from a JavaScript object.
|
|
131535
|
-
*
|
|
131536
|
-
* @param {any} value
|
|
131537
|
-
*/
|
|
131538
|
-
constructor(value = {}) {
|
|
131539
|
-
|
|
131540
|
-
/**
|
|
131541
|
-
* @protected
|
|
131542
|
-
*/
|
|
131543
|
-
this.value = value;
|
|
131544
|
-
}
|
|
131545
|
-
|
|
131546
|
-
/**
|
|
131547
|
-
* Return all defined keys of the context.
|
|
131548
|
-
*
|
|
131549
|
-
* @returns {Array<string>} the keys of the context
|
|
131550
|
-
*/
|
|
131551
|
-
getKeys() {
|
|
131552
|
-
return Object.keys(this.value);
|
|
131553
|
-
}
|
|
131554
|
-
|
|
131555
|
-
/**
|
|
131556
|
-
* Returns the value of the given key.
|
|
131557
|
-
*
|
|
131558
|
-
* If the value represents a context itself, it should be wrapped in a
|
|
131559
|
-
* context class.
|
|
131560
|
-
*
|
|
131561
|
-
* @param {String} key
|
|
131562
|
-
* @returns {VariableContext|ValueProducer|null}
|
|
131563
|
-
*/
|
|
131564
|
-
get(key) {
|
|
131565
|
-
const result = this.value[key];
|
|
131566
|
-
|
|
131567
|
-
if (this.constructor.isAtomic(result)) {
|
|
131568
|
-
return result;
|
|
131569
|
-
}
|
|
131570
|
-
|
|
131571
|
-
return this.constructor.of(result);
|
|
131572
|
-
}
|
|
131573
|
-
|
|
131574
|
-
/**
|
|
131575
|
-
* Creates a new context with the given key added.
|
|
131576
|
-
*
|
|
131577
|
-
* @param {String} key
|
|
131578
|
-
* @param {any} value
|
|
131579
|
-
* @returns {VariableContext} new context with the given key added
|
|
131580
|
-
*/
|
|
131581
|
-
set(key, value) {
|
|
131582
|
-
return this.constructor.of({
|
|
131583
|
-
...this.value,
|
|
131584
|
-
[key]: value
|
|
131585
|
-
});
|
|
131586
|
-
}
|
|
131587
|
-
|
|
131588
|
-
/**
|
|
131589
|
-
* Wether the given value is atomic. Non-atomic values need to be wrapped in a
|
|
131590
|
-
* context Class.
|
|
131591
|
-
*
|
|
131592
|
-
* @param {any} value
|
|
131593
|
-
* @returns {Boolean}
|
|
131594
|
-
*/
|
|
131595
|
-
static isAtomic(value) {
|
|
131596
|
-
return !value ||
|
|
131597
|
-
value instanceof this ||
|
|
131598
|
-
value instanceof ValueProducer ||
|
|
131599
|
-
typeof value !== 'object';
|
|
131600
|
-
}
|
|
131601
|
-
|
|
131602
|
-
/**
|
|
131603
|
-
* Takes any number of Contexts and merges them into a single Context.
|
|
131604
|
-
*
|
|
131605
|
-
* @param {...Context} contexts
|
|
131606
|
-
* @returns {VariableContext}
|
|
131607
|
-
*/
|
|
131608
|
-
static of(...contexts) {
|
|
131609
|
-
const unwrap = (context) => {
|
|
131610
|
-
if (!context || typeof context !== 'object') {
|
|
131611
|
-
return {};
|
|
131612
|
-
}
|
|
131613
|
-
|
|
131614
|
-
if (context instanceof this) {
|
|
131615
|
-
return context.value;
|
|
131616
|
-
}
|
|
131617
|
-
|
|
131618
|
-
return { ...context };
|
|
131619
|
-
};
|
|
131620
|
-
|
|
131621
|
-
const merged = contexts.reduce((merged, context) => {
|
|
131622
|
-
return {
|
|
131623
|
-
...merged,
|
|
131624
|
-
...unwrap(context)
|
|
131625
|
-
};
|
|
131626
|
-
}, {});
|
|
131627
|
-
|
|
131628
|
-
return new this(merged);
|
|
131629
|
-
}
|
|
131630
|
-
|
|
131631
|
-
}
|
|
131632
|
-
|
|
131633
|
-
class Variables {
|
|
131634
|
-
|
|
131635
|
-
constructor({
|
|
131636
|
-
name = 'Expressions',
|
|
131637
|
-
tokens = [],
|
|
131638
|
-
children = [],
|
|
131639
|
-
parent = null,
|
|
131640
|
-
context,
|
|
131641
|
-
value,
|
|
131642
|
-
raw
|
|
131643
|
-
} = {}) {
|
|
131644
|
-
this.name = name;
|
|
131645
|
-
this.tokens = tokens;
|
|
131646
|
-
this.children = children;
|
|
131647
|
-
this.parent = parent;
|
|
131648
|
-
this.context = context;
|
|
131649
|
-
this.value = value;
|
|
131650
|
-
this.raw = raw;
|
|
131651
|
-
}
|
|
131652
|
-
|
|
131653
|
-
enterScope(name) {
|
|
131654
|
-
|
|
131655
|
-
const childScope = this.of({
|
|
131656
|
-
name,
|
|
131657
|
-
parent: this
|
|
131658
|
-
});
|
|
131659
|
-
|
|
131660
|
-
LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
|
|
131661
|
-
|
|
131662
|
-
return childScope;
|
|
131663
|
-
}
|
|
131664
|
-
|
|
131665
|
-
exitScope(str) {
|
|
131666
|
-
|
|
131667
|
-
if (!this.parent) {
|
|
131668
|
-
LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
131669
|
-
|
|
131670
|
-
return this;
|
|
131671
|
-
}
|
|
131672
|
-
|
|
131673
|
-
LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
131674
|
-
|
|
131675
|
-
return this.parent.pushChild(this);
|
|
131676
|
-
}
|
|
131677
|
-
|
|
131678
|
-
token(part) {
|
|
131679
|
-
|
|
131680
|
-
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
131681
|
-
|
|
131682
|
-
return this.assign({
|
|
131683
|
-
tokens: [ ...this.tokens, part ]
|
|
131684
|
-
});
|
|
131685
|
-
}
|
|
131686
|
-
|
|
131687
|
-
literal(value) {
|
|
131688
|
-
|
|
131689
|
-
LOG_VARS && console.log('[%s] literal %o', this.path, value);
|
|
131690
|
-
|
|
131691
|
-
return this.pushChild(this.of({
|
|
131692
|
-
name: 'Literal',
|
|
131693
|
-
value
|
|
131694
|
-
}));
|
|
131695
|
-
}
|
|
131696
|
-
|
|
131697
|
-
/**
|
|
131698
|
-
* Return computed scope value
|
|
131699
|
-
*
|
|
131700
|
-
* @return {any}
|
|
131701
|
-
*/
|
|
131702
|
-
computedValue() {
|
|
131703
|
-
for (let scope = this;;scope = last(scope.children)) {
|
|
131704
|
-
|
|
131705
|
-
if (!scope) {
|
|
131706
|
-
return null;
|
|
131707
|
-
}
|
|
131708
|
-
|
|
131709
|
-
if (scope.value) {
|
|
131710
|
-
return scope.value;
|
|
131711
|
-
}
|
|
131712
|
-
}
|
|
131713
|
-
}
|
|
131714
|
-
|
|
131715
|
-
contextKeys() {
|
|
131716
|
-
return this.context.getKeys().map(normalizeContextKey);
|
|
131717
|
-
}
|
|
131718
|
-
|
|
131719
|
-
get path() {
|
|
131720
|
-
return this.parent?.path?.concat(' > ', this.name) || this.name;
|
|
131721
|
-
}
|
|
131722
|
-
|
|
131723
|
-
/**
|
|
131724
|
-
* Return value of variable.
|
|
131725
|
-
*
|
|
131726
|
-
* @param { string } variable
|
|
131727
|
-
* @return { any } value
|
|
131728
|
-
*/
|
|
131729
|
-
get(variable) {
|
|
131730
|
-
|
|
131731
|
-
const names = [ variable, variable && normalizeContextKey(variable) ];
|
|
131732
|
-
|
|
131733
|
-
const contextKey = this.context.getKeys().find(
|
|
131734
|
-
key => names.includes(normalizeContextKey(key))
|
|
131735
|
-
);
|
|
131736
|
-
|
|
131737
|
-
if (typeof contextKey === 'undefined') {
|
|
131738
|
-
return undefined;
|
|
131739
|
-
}
|
|
131740
|
-
|
|
131741
|
-
const val = this.context.get(contextKey);
|
|
131742
|
-
|
|
131743
|
-
if (val instanceof ValueProducer) {
|
|
131744
|
-
return val.get(this);
|
|
131745
|
-
} else {
|
|
131746
|
-
return val;
|
|
131747
|
-
}
|
|
131748
|
-
}
|
|
131749
|
-
|
|
131750
|
-
resolveName() {
|
|
131751
|
-
|
|
131752
|
-
const variable = this.tokens.join(' ');
|
|
131753
|
-
const tokens = [];
|
|
131754
|
-
|
|
131755
|
-
const parentScope = this.assign({
|
|
131756
|
-
tokens
|
|
131757
|
-
});
|
|
131758
|
-
|
|
131759
|
-
const variableScope = this.of({
|
|
131760
|
-
name: 'VariableName',
|
|
131761
|
-
parent: parentScope,
|
|
131762
|
-
value: this.get(variable),
|
|
131763
|
-
raw: variable
|
|
131764
|
-
});
|
|
131765
|
-
|
|
131766
|
-
LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
131767
|
-
|
|
131768
|
-
return parentScope.pushChild(variableScope);
|
|
131769
|
-
}
|
|
131770
|
-
|
|
131771
|
-
pushChild(child) {
|
|
131772
|
-
|
|
131773
|
-
if (!child) {
|
|
131774
|
-
return this;
|
|
131775
|
-
}
|
|
131776
|
-
|
|
131777
|
-
const parent = this.assign({
|
|
131778
|
-
children: [ ...this.children, child ]
|
|
131779
|
-
});
|
|
131780
|
-
|
|
131781
|
-
child.parent = parent;
|
|
131782
|
-
|
|
131783
|
-
return parent;
|
|
131784
|
-
}
|
|
131785
|
-
|
|
131786
|
-
pushChildren(children) {
|
|
131787
|
-
|
|
131788
|
-
let parent = this;
|
|
131789
|
-
|
|
131790
|
-
for (const child of children) {
|
|
131791
|
-
parent = parent.pushChild(child);
|
|
131792
|
-
}
|
|
131793
|
-
|
|
131794
|
-
return parent;
|
|
131795
|
-
}
|
|
131796
|
-
|
|
131797
|
-
declareName() {
|
|
131798
|
-
|
|
131799
|
-
if (this.tokens.length === 0) {
|
|
131800
|
-
throw Error('no tokens to declare name');
|
|
131801
|
-
}
|
|
131802
|
-
|
|
131803
|
-
const variableName = this.tokens.join(' ');
|
|
131804
|
-
|
|
131805
|
-
LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
131806
|
-
|
|
131807
|
-
return this.assign({
|
|
131808
|
-
tokens: []
|
|
131809
|
-
}).pushChild(
|
|
131810
|
-
this.of({
|
|
131811
|
-
name: 'Name',
|
|
131812
|
-
value: variableName
|
|
131813
|
-
})
|
|
131814
|
-
);
|
|
131815
|
-
}
|
|
131816
|
-
|
|
131817
|
-
define(name, value) {
|
|
131818
|
-
|
|
131819
|
-
if (typeof name !== 'string') {
|
|
131820
|
-
LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
131821
|
-
|
|
131822
|
-
return this;
|
|
131823
|
-
}
|
|
131824
|
-
|
|
131825
|
-
LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
131826
|
-
|
|
131827
|
-
const context = this.context.set(name, value);
|
|
131828
|
-
|
|
131829
|
-
return this.assign({
|
|
131830
|
-
context
|
|
131831
|
-
});
|
|
131832
|
-
}
|
|
131833
|
-
|
|
131834
|
-
/**
|
|
131835
|
-
* @param { Record<string, any> } [options]
|
|
131836
|
-
*
|
|
131837
|
-
* @return { Variables }
|
|
131838
|
-
*/
|
|
131839
|
-
assign(options = {}) {
|
|
131840
|
-
|
|
131841
|
-
return Variables.of({
|
|
131842
|
-
...this,
|
|
131843
|
-
...options
|
|
131844
|
-
});
|
|
131845
|
-
}
|
|
131846
|
-
|
|
131847
|
-
/**
|
|
131848
|
-
* @param { Record<string, any> } [options]
|
|
131849
|
-
*
|
|
131850
|
-
* @return { Variables }
|
|
131851
|
-
*/
|
|
131852
|
-
of(options = {}) {
|
|
131853
|
-
|
|
131854
|
-
const defaultOptions = {
|
|
131855
|
-
context: this.context,
|
|
131856
|
-
parent: this.parent
|
|
131857
|
-
};
|
|
131858
|
-
|
|
131859
|
-
return Variables.of({
|
|
131860
|
-
...defaultOptions,
|
|
131861
|
-
...options
|
|
131862
|
-
});
|
|
131863
|
-
}
|
|
131864
|
-
|
|
131865
|
-
static of(options) {
|
|
131866
|
-
|
|
131867
|
-
const {
|
|
131868
|
-
name,
|
|
131869
|
-
tokens = [],
|
|
131870
|
-
children = [],
|
|
131871
|
-
parent = null,
|
|
131872
|
-
context,
|
|
131873
|
-
value,
|
|
131874
|
-
raw
|
|
131875
|
-
} = options;
|
|
131876
|
-
|
|
131877
|
-
if (!context) {
|
|
131878
|
-
throw new Error('must provide <context>');
|
|
131879
|
-
}
|
|
131880
|
-
|
|
131881
|
-
return new Variables({
|
|
131882
|
-
name,
|
|
131883
|
-
tokens: [ ...tokens ],
|
|
131884
|
-
children: [ ...children ],
|
|
131885
|
-
context,
|
|
131886
|
-
parent,
|
|
131887
|
-
value,
|
|
131888
|
-
raw
|
|
131889
|
-
});
|
|
131890
|
-
}
|
|
131891
|
-
|
|
131892
|
-
}
|
|
131893
|
-
|
|
131894
|
-
/**
|
|
131895
|
-
* @param { string } name
|
|
131896
|
-
*
|
|
131897
|
-
* @return { string } normalizedName
|
|
131898
|
-
*/
|
|
131899
|
-
function normalizeContextKey(name) {
|
|
131900
|
-
return name.replace(/\s*([./\-'+*])\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
131901
|
-
}
|
|
131902
|
-
|
|
131903
|
-
/**
|
|
131904
|
-
* Wrap children of variables under the given named child.
|
|
131905
|
-
*
|
|
131906
|
-
* @param { Variables } variables
|
|
131907
|
-
* @param { string } name
|
|
131908
|
-
* @param { string } code
|
|
131909
|
-
* @return { Variables }
|
|
131910
|
-
*/
|
|
131911
|
-
function wrap(variables, scopeName, code) {
|
|
131912
|
-
|
|
131913
|
-
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
131914
|
-
const children = variables.children.filter(c => c.name === scopeName);
|
|
131915
|
-
|
|
131916
|
-
const namePart = parts[0];
|
|
131917
|
-
const valuePart = parts[Math.max(1, parts.length - 1)];
|
|
131918
|
-
|
|
131919
|
-
const name = namePart.computedValue();
|
|
131920
|
-
const value = valuePart?.computedValue() || null;
|
|
131921
|
-
|
|
131922
|
-
return variables
|
|
131923
|
-
.assign({
|
|
131924
|
-
children
|
|
131925
|
-
})
|
|
131926
|
-
.enterScope(scopeName)
|
|
131927
|
-
.pushChildren(parts)
|
|
131928
|
-
.exitScope(code)
|
|
131929
|
-
.define(name, value);
|
|
131930
|
-
}
|
|
131931
|
-
|
|
131932
|
-
/**
|
|
131933
|
-
* @param { ContextValue } [context]
|
|
131934
|
-
* @param { typeof VariableContext } [Context]
|
|
131935
|
-
*
|
|
131936
|
-
* @return { ContextTracker<Variables> }
|
|
131937
|
-
*/
|
|
131938
|
-
function trackVariables(context = {}, Context = VariableContext) {
|
|
131939
|
-
|
|
131940
|
-
const start = Variables.of({
|
|
131941
|
-
context: Context.of(context)
|
|
131942
|
-
});
|
|
131943
|
-
|
|
131944
|
-
return new ContextTracker({
|
|
131945
|
-
start,
|
|
131946
|
-
reduce(variables, term, stack, input) {
|
|
131947
|
-
|
|
131948
|
-
if (term === IfExpression) {
|
|
131949
|
-
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
131950
|
-
|
|
131951
|
-
variables = variables.assign({
|
|
131952
|
-
value: Context.of(
|
|
131953
|
-
thenPart?.computedValue(),
|
|
131954
|
-
elsePart?.computedValue()
|
|
131955
|
-
)
|
|
131956
|
-
});
|
|
131957
|
-
}
|
|
131958
|
-
|
|
131959
|
-
if (term === List) {
|
|
131960
|
-
variables = variables.assign({
|
|
131961
|
-
value: Context.of(
|
|
131962
|
-
...variables.children.map(
|
|
131963
|
-
c => c?.computedValue()
|
|
131964
|
-
)
|
|
131965
|
-
)
|
|
131966
|
-
});
|
|
131967
|
-
}
|
|
131968
|
-
|
|
131969
|
-
if (term === FilterExpression) {
|
|
131970
|
-
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
131971
|
-
|
|
131972
|
-
variables = variables.assign({
|
|
131973
|
-
value: sourcePart?.computedValue()
|
|
131974
|
-
});
|
|
131975
|
-
}
|
|
131976
|
-
|
|
131977
|
-
if (term === FunctionInvocation) {
|
|
131978
|
-
|
|
131979
|
-
const [
|
|
131980
|
-
name,
|
|
131981
|
-
...args
|
|
131982
|
-
] = variables.children;
|
|
131983
|
-
|
|
131984
|
-
// preserve type information through `get value(context, key)` utility
|
|
131985
|
-
if (name?.raw === 'get value') {
|
|
131986
|
-
variables = getContextValue(variables, args);
|
|
131987
|
-
}
|
|
131988
|
-
}
|
|
131989
|
-
|
|
131990
|
-
const start = contextStarts[term];
|
|
131991
|
-
|
|
131992
|
-
if (start) {
|
|
131993
|
-
return variables.enterScope(start);
|
|
131994
|
-
}
|
|
131995
|
-
|
|
131996
|
-
const prefixedStart = prefixedContextStarts[term];
|
|
131997
|
-
|
|
131998
|
-
// pull <expression> into new <prefixedStart> context
|
|
131999
|
-
if (prefixedStart) {
|
|
132000
|
-
|
|
132001
|
-
const {
|
|
132002
|
-
children: currentChildren,
|
|
132003
|
-
context: currentContext,
|
|
132004
|
-
} = variables;
|
|
132005
|
-
|
|
132006
|
-
const children = currentChildren.slice(0, -1);
|
|
132007
|
-
const lastChild = last(currentChildren);
|
|
132008
|
-
|
|
132009
|
-
let newContext = null;
|
|
132010
|
-
|
|
132011
|
-
if (term === pathExpressionStart) {
|
|
132012
|
-
newContext = Context.of(lastChild?.computedValue());
|
|
132013
|
-
}
|
|
132014
|
-
|
|
132015
|
-
if (term === filterExpressionStart) {
|
|
132016
|
-
newContext = Context.of(
|
|
132017
|
-
currentContext,
|
|
132018
|
-
lastChild?.computedValue()
|
|
132019
|
-
).set('item', lastChild?.computedValue());
|
|
132020
|
-
}
|
|
132021
|
-
|
|
132022
|
-
return variables
|
|
132023
|
-
.assign({ children })
|
|
132024
|
-
.enterScope(prefixedStart)
|
|
132025
|
-
.pushChild(lastChild)
|
|
132026
|
-
.assign({ context: newContext || currentContext });
|
|
132027
|
-
}
|
|
132028
|
-
|
|
132029
|
-
const code = input.read(input.pos, stack.pos);
|
|
132030
|
-
|
|
132031
|
-
const end = contextEnds[term];
|
|
132032
|
-
|
|
132033
|
-
if (end) {
|
|
132034
|
-
return variables.exitScope(code);
|
|
132035
|
-
}
|
|
132036
|
-
|
|
132037
|
-
if (term === ContextEntry) {
|
|
132038
|
-
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
132039
|
-
|
|
132040
|
-
const name = parts[0];
|
|
132041
|
-
const value = last(parts);
|
|
132042
|
-
|
|
132043
|
-
return wrap(variables, 'ContextEntry', code).assign(
|
|
132044
|
-
{
|
|
132045
|
-
value: Context
|
|
132046
|
-
.of(variables.value)
|
|
132047
|
-
.set([ name.computedValue() ], value?.computedValue())
|
|
132048
|
-
}
|
|
132049
|
-
);
|
|
132050
|
-
}
|
|
132051
|
-
|
|
132052
|
-
if (
|
|
132053
|
-
term === ForInExpression ||
|
|
132054
|
-
term === QuantifiedInExpression
|
|
132055
|
-
) {
|
|
132056
|
-
return wrap(variables, 'InExpression', code);
|
|
132057
|
-
}
|
|
132058
|
-
|
|
132059
|
-
// define <partial> within ForExpression body
|
|
132060
|
-
if (term === forExpressionBodyStart) {
|
|
132061
|
-
|
|
132062
|
-
return variables.define(
|
|
132063
|
-
'partial',
|
|
132064
|
-
ValueProducer.of(variables => {
|
|
132065
|
-
return last(variables.children)?.computedValue();
|
|
132066
|
-
})
|
|
132067
|
-
);
|
|
132068
|
-
}
|
|
132069
|
-
|
|
132070
|
-
if (
|
|
132071
|
-
term === ParameterName
|
|
132072
|
-
) {
|
|
132073
|
-
const name = last(variables.children).computedValue();
|
|
132074
|
-
|
|
132075
|
-
// TODO: attach type information
|
|
132076
|
-
return variables.define(name, 1);
|
|
132077
|
-
}
|
|
132078
|
-
|
|
132079
|
-
// pull <expression> into ArithmeticExpression child
|
|
132080
|
-
if (
|
|
132081
|
-
term === arithmeticPlusStart ||
|
|
132082
|
-
term === arithmeticTimesStart ||
|
|
132083
|
-
term === arithmeticExpStart
|
|
132084
|
-
) {
|
|
132085
|
-
const children = variables.children.slice(0, -1);
|
|
132086
|
-
const lastChild = last(variables.children);
|
|
132087
|
-
|
|
132088
|
-
return variables.assign({
|
|
132089
|
-
children
|
|
132090
|
-
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
132091
|
-
}
|
|
132092
|
-
|
|
132093
|
-
if (term === arithmeticUnaryStart) {
|
|
132094
|
-
return variables.enterScope('ArithmeticExpression');
|
|
132095
|
-
}
|
|
132096
|
-
|
|
132097
|
-
if (
|
|
132098
|
-
term === Identifier ||
|
|
132099
|
-
term === AdditionalIdentifier ||
|
|
132100
|
-
term === PropertyIdentifier
|
|
132101
|
-
) {
|
|
132102
|
-
return variables.token(code);
|
|
132103
|
-
}
|
|
132104
|
-
|
|
132105
|
-
if (
|
|
132106
|
-
term === StringLiteral
|
|
132107
|
-
) {
|
|
132108
|
-
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
132109
|
-
}
|
|
132110
|
-
|
|
132111
|
-
if (term === BooleanLiteral) {
|
|
132112
|
-
return variables.literal(code === 'true' ? true : false);
|
|
132113
|
-
}
|
|
132114
|
-
|
|
132115
|
-
if (term === NumericLiteral) {
|
|
132116
|
-
return variables.literal(parseFloat(code));
|
|
132117
|
-
}
|
|
132118
|
-
|
|
132119
|
-
if (term === nil) {
|
|
132120
|
-
return variables.literal(null);
|
|
132121
|
-
}
|
|
132122
|
-
|
|
132123
|
-
if (
|
|
132124
|
-
term === VariableName
|
|
132125
|
-
) {
|
|
132126
|
-
return variables.resolveName();
|
|
132127
|
-
}
|
|
132128
|
-
|
|
132129
|
-
if (
|
|
132130
|
-
term === Name ||
|
|
132131
|
-
term === PropertyName
|
|
132132
|
-
) {
|
|
132133
|
-
return variables.declareName();
|
|
132134
|
-
}
|
|
132135
|
-
|
|
132136
|
-
if (
|
|
132137
|
-
term === expression0 ||
|
|
132138
|
-
term === PositiveUnaryTest
|
|
132139
|
-
) {
|
|
132140
|
-
if (variables.tokens.length > 0) {
|
|
132141
|
-
throw new Error('uncleared name');
|
|
132142
|
-
}
|
|
132143
|
-
}
|
|
132144
|
-
|
|
132145
|
-
if (term === expression0) {
|
|
132146
|
-
|
|
132147
|
-
let parent = variables;
|
|
132148
|
-
|
|
132149
|
-
while (parent.parent) {
|
|
132150
|
-
parent = parent.exitScope(code);
|
|
132151
|
-
}
|
|
132152
|
-
|
|
132153
|
-
return parent;
|
|
132154
|
-
}
|
|
132155
|
-
|
|
132156
|
-
return variables;
|
|
132157
|
-
}
|
|
132158
|
-
});
|
|
132159
|
-
}
|
|
132160
|
-
|
|
132161
|
-
const variableTracker = trackVariables({});
|
|
132162
|
-
|
|
132163
|
-
|
|
132164
|
-
// helpers //////////////
|
|
132165
|
-
|
|
132166
|
-
function getContextValue(variables, args) {
|
|
132167
|
-
|
|
132168
|
-
if (!args.length) {
|
|
132169
|
-
return variables.assign({
|
|
132170
|
-
value: null
|
|
132171
|
-
});
|
|
132172
|
-
}
|
|
132173
|
-
|
|
132174
|
-
if (args[0].name === 'Name') {
|
|
132175
|
-
args = extractNamedArgs(args, [ 'm', 'key' ]);
|
|
132176
|
-
}
|
|
132177
|
-
|
|
132178
|
-
if (args.length !== 2) {
|
|
132179
|
-
return variables.assign({
|
|
132180
|
-
value: null
|
|
132181
|
-
});
|
|
132182
|
-
}
|
|
132183
|
-
|
|
132184
|
-
const [
|
|
132185
|
-
context,
|
|
132186
|
-
key
|
|
132187
|
-
] = args;
|
|
132188
|
-
|
|
132189
|
-
const keyValue = key?.computedValue();
|
|
132190
|
-
const contextValue = context?.computedValue();
|
|
132191
|
-
|
|
132192
|
-
if (
|
|
132193
|
-
(!contextValue || typeof contextValue !== 'object') || typeof keyValue !== 'string'
|
|
132194
|
-
) {
|
|
132195
|
-
return variables.assign({
|
|
132196
|
-
value: null
|
|
132197
|
-
});
|
|
132198
|
-
}
|
|
132199
|
-
|
|
132200
|
-
return variables.assign({
|
|
132201
|
-
value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
132202
|
-
return contextValue.get(keyValue) || value;
|
|
132203
|
-
}, null)
|
|
132204
|
-
});
|
|
132205
|
-
}
|
|
132206
|
-
|
|
132207
|
-
function extractNamedArgs(args, argNames) {
|
|
132208
|
-
|
|
132209
|
-
const context = {};
|
|
132210
|
-
|
|
132211
|
-
for (let i = 0; i < args.length; i += 2) {
|
|
132212
|
-
const [ name, value ] = args.slice(i, i + 2);
|
|
132213
|
-
|
|
132214
|
-
context[name.value] = value;
|
|
132215
|
-
}
|
|
132216
|
-
|
|
132217
|
-
return argNames.map(name => context[name]);
|
|
132218
|
-
}
|
|
132219
|
-
|
|
132220
|
-
function last(arr) {
|
|
132221
|
-
return arr[arr.length - 1];
|
|
132222
|
-
}
|
|
132223
|
-
|
|
132224
|
-
const feelHighlighting = styleTags({
|
|
132225
|
-
StringLiteral: tags$1.string,
|
|
132226
|
-
NumericLiteral: tags$1.number,
|
|
132227
|
-
BooleanLiteral: tags$1.bool,
|
|
132228
|
-
'AtLiteral!': tags$1.special(tags$1.string),
|
|
132229
|
-
CompareOp: tags$1.compareOperator,
|
|
132230
|
-
ArithOp: tags$1.arithmeticOperator,
|
|
132231
|
-
'for if then else some every satisfies between return': tags$1.controlKeyword,
|
|
132232
|
-
'in instance of and or': tags$1.operatorKeyword,
|
|
132233
|
-
function: tags$1.definitionKeyword,
|
|
132234
|
-
as: tags$1.keyword,
|
|
132235
|
-
'Type/...': tags$1.typeName,
|
|
132236
|
-
Wildcard: tags$1.special,
|
|
132237
|
-
null: tags$1.null,
|
|
132238
|
-
LineComment: tags$1.lineComment,
|
|
132239
|
-
BlockComment: tags$1.blockComment,
|
|
132240
|
-
'VariableName! "?"': tags$1.variableName,
|
|
132241
|
-
'DateTimeConstructor! SpecialFunctionName!': tags$1.function(tags$1.special(tags$1.variableName)),
|
|
132242
|
-
'List Interval': tags$1.list,
|
|
132243
|
-
Context: tags$1.definition(tags$1.literal),
|
|
132244
|
-
'Name!': tags$1.definition(tags$1.variableName),
|
|
132245
|
-
'Key/Name! ContextEntryType/Name!': tags$1.definition(tags$1.propertyName),
|
|
132246
|
-
'PathExpression/VariableName!': tags$1.function(tags$1.propertyName),
|
|
132247
|
-
'FormalParameter/ParameterName!': tags$1.function(tags$1.definition(tags$1.variableName)),
|
|
132248
|
-
'( )': tags$1.paren,
|
|
132249
|
-
'[ ]': tags$1.squareBracket,
|
|
132250
|
-
'{ }': tags$1.brace,
|
|
132251
|
-
'.': tags$1.derefOperator,
|
|
132252
|
-
', ;': tags$1.separator,
|
|
132253
|
-
'..': tags$1.punctuation
|
|
132254
|
-
});
|
|
132255
|
-
|
|
132256
|
-
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
132257
|
-
const spec_identifier = {__proto__:null,for:10, in:30, return:34, if:38, then:40, else:42, some:46, every:48, satisfies:55, or:58, and:62, between:70, instance:86, of:89, days:99, time:101, duration:103, years:105, months:107, date:109, list:115, context:121, function:128, null:154, true:324, false:324, "?":168, external:184, not:207};
|
|
132258
|
-
const parser = LRParser.deserialize({
|
|
132259
|
-
version: 14,
|
|
132260
|
-
states: "IWO`QYOOO$gQYOOOOQU'#Ce'#CeO$qQYO'#C`O%zQ^O'#FOOOQQ'#Fd'#FdO'dQYO'#FdO`QYO'#DUOOQU'#Em'#EmO)QQ^O'#D]OOQO'#Fk'#FkO,PQWO'#DuOOQU'#D|'#D|OOQU'#D}'#D}OOQU'#EO'#EOO,UOWO'#ERO,PQWO'#EPOOQU'#EP'#EPOOQU'#Fq'#FqOOQU'#Fo'#FoOOQQ'#Fv'#FvO.yQYO'#FvO0wQYO'#FvOOQU'#ET'#ETO2sQYO'#EVOOQU'#FQ'#FQO4UQ^O'#FQO5hQYO'#EWO5rQWO'#EXOOQP'#GP'#GPO5wQXO'#E`OOQU'#Fz'#FzOOQU'#FP'#FPOOQQ'#Eh'#EhQ`QYOOOOQQ'#FR'#FROOQQ'#F['#F[O2sQYO'#CnOOQQ'#F]'#F]O$qQYO'#CrO6SQYO'#DvOOQU'#Fp'#FpO6XQYO'#EQOOQO'#EQ'#EQO2sQYO'#EUO`QYO'#ETOOQO'#F}'#F}O7bQYO'#DQO8UQWO'#F`OOQO'#DS'#DSO8aQYO'#FdQOQWOOO8hQWOOO9[QYO'#CdO9iQYO'#FTOOQQ'#Cc'#CcO9nQYO'#FSOOQQ'#Cb'#CbO9vQYO,58zO`QYO,59hOOQQ'#Fa'#FaOOQQ'#Fb'#FbOOQQ'#Fc'#FcO`QYO,59pO`QYO,59pO`QYO,59pOOQQ'#Fi'#FiO$qQYO,5:]OOQQ'#Fj'#FjO2sQYO,5:_OO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&s&t&u&v&w&y'P'R'S'X'Y']'g'i'n#a|OPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR%y%a#ahOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR#}!u#akOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR$R!xrlOVr}!]!a!b!c!i!j!l#g$b$p%U%u%v!m'kPhku|!g!k!q#]#_#c#r$O$Y$^$_$e${%b&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nT$U!y'h#anOPVhkru|}!]!a!b!c!g!i!j!k!l!q#]#_#c#g#r$O$Y$^$_$b$e$p${%U%b%u%v&p&q&r&s&t&u&v&w&y'P'R'S'X'Y']'g'i'nR#Pn",
|
|
132263
|
-
nodeNames: "⚠ LineComment BlockComment Expressions ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression ArithOp InstanceOfExpression instance of Type QualifiedName VariableName SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier UnaryTests Wildcard not",
|
|
132264
|
-
maxTerm: 175,
|
|
132265
|
-
context: variableTracker,
|
|
132266
|
-
nodeProps: [
|
|
132267
|
-
["group", -17,4,18,22,28,30,32,40,42,67,69,71,84,85,87,88,89,96,"Expression",47,"Expression Expression",-5,77,78,79,80,81,"Expression Literal"],
|
|
132268
|
-
["closedBy", 37,")",70,"]",95,"}"],
|
|
132269
|
-
["openedBy", 39,"(",68,"[",94,"{"]
|
|
132270
|
-
],
|
|
132271
|
-
propSources: [feelHighlighting],
|
|
132272
|
-
skippedNodes: [0,1,2],
|
|
132273
|
-
repeatNodeCount: 14,
|
|
132274
|
-
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#p~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#q~~$cP!_!`$f~$kOq~~$pW$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$g~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$g~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#y~~&mOu~~&rOw~~&wP^~z{&z~'POy~~'UO[~~'ZO#|~R'`PZP!`!a'cQ'hO$[Q~'mQ#x~!O!P's!Q!['x~'xO#{~~'}P$f~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$f~!O!P*W!Q![){~*ZP!Q!['x~*cO$Y~~*hO$u~R*oP![QrP!_!`*rP*wOrPR+OP!XQrP!_!`*r~+WO$i~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
132275
|
-
tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
|
|
132276
|
-
topRules: {"Expressions":[0,3],"UnaryTests":[1,101]},
|
|
132277
|
-
dynamicPrecedences: {"30":-1,"71":-1,"73":-1,"126":-1},
|
|
132278
|
-
specialized: [{term: 120, get: value => spec_identifier[value] || -1}],
|
|
132279
|
-
tokenPrec: 4424
|
|
132280
|
-
});
|
|
132281
|
-
|
|
132282
131423
|
class EntriesContext extends VariableContext {
|
|
132283
131424
|
constructor(value = { entries: {} }) {
|
|
132284
131425
|
super(value);
|
|
@@ -132484,7 +131625,7 @@
|
|
|
132484
131625
|
* @returns {EntriesContext}
|
|
132485
131626
|
*/
|
|
132486
131627
|
function getResultContext(expression, variables = {}) {
|
|
132487
|
-
const contextTracker = trackVariables(variables, EntriesContext);
|
|
131628
|
+
const contextTracker = trackVariables$1(variables, EntriesContext);
|
|
132488
131629
|
|
|
132489
131630
|
// This is a hack to get the latest variables from the context tracker
|
|
132490
131631
|
// lezer does not automatically annotate the parse tree with the context
|
|
@@ -132499,7 +131640,7 @@
|
|
|
132499
131640
|
}
|
|
132500
131641
|
});
|
|
132501
131642
|
|
|
132502
|
-
const contextualParser = parser.configure({
|
|
131643
|
+
const contextualParser = parser$3.configure({
|
|
132503
131644
|
contextTracker: customContextTracker
|
|
132504
131645
|
});
|
|
132505
131646
|
|
|
@@ -142150,7 +141291,7 @@
|
|
|
142150
141291
|
*/
|
|
142151
141292
|
_extractExpressionsWithDepth(template) {
|
|
142152
141293
|
// build simplified feelers syntax tree
|
|
142153
|
-
const parseTree = parser
|
|
141294
|
+
const parseTree = parser.parse(template);
|
|
142154
141295
|
const tree = buildSimpleTree(parseTree, template);
|
|
142155
141296
|
return function _traverse(n, depth = 0) {
|
|
142156
141297
|
if (['Feel', 'FeelBlock'].includes(n.name)) {
|