camunda-bpmn-js 5.12.0 → 5.13.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.
Files changed (79) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +88 -88
  3. package/dist/assets/base-modeler.css +5 -5
  4. package/dist/assets/base-navigated-viewer.css +1 -1
  5. package/dist/assets/base-viewer.css +1 -1
  6. package/dist/assets/camunda-cloud-modeler.css +2 -2
  7. package/dist/assets/camunda-platform-modeler.css +1 -1
  8. package/dist/base-modeler.development.js +2072 -540
  9. package/dist/base-modeler.production.min.js +32 -32
  10. package/dist/camunda-cloud-modeler.development.js +2424 -892
  11. package/dist/camunda-cloud-modeler.production.min.js +29 -29
  12. package/dist/camunda-cloud-navigated-viewer.development.js +40 -40
  13. package/dist/camunda-cloud-viewer.development.js +40 -40
  14. package/dist/camunda-platform-modeler.development.js +2517 -985
  15. package/dist/camunda-platform-modeler.production.min.js +29 -29
  16. package/dist/camunda-platform-navigated-viewer.development.js +27 -27
  17. package/dist/camunda-platform-viewer.development.js +27 -27
  18. package/lib/base/Modeler.d.ts +20 -20
  19. package/lib/base/Modeler.js +65 -65
  20. package/lib/base/NavigatedViewer.d.ts +2 -2
  21. package/lib/base/NavigatedViewer.js +2 -2
  22. package/lib/base/Viewer.d.ts +2 -2
  23. package/lib/base/Viewer.js +2 -2
  24. package/lib/camunda-cloud/ElementTemplatesValidator.d.ts +1 -1
  25. package/lib/camunda-cloud/Modeler.d.ts +3 -3
  26. package/lib/camunda-cloud/NavigatedViewer.d.ts +9 -9
  27. package/lib/camunda-cloud/NavigatedViewer.js +36 -36
  28. package/lib/camunda-cloud/Viewer.d.ts +9 -9
  29. package/lib/camunda-cloud/Viewer.js +36 -36
  30. package/lib/camunda-cloud/features/external-resources/ResourceLoader.d.ts +6 -6
  31. package/lib/camunda-cloud/features/external-resources/Resources.d.ts +7 -7
  32. package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.d.ts +12 -12
  33. package/lib/camunda-cloud/features/external-resources/cmd/index.d.ts +4 -4
  34. package/lib/camunda-cloud/features/external-resources/handlers/decision/AppendMenuProvider.d.ts +5 -5
  35. package/lib/camunda-cloud/features/external-resources/handlers/decision/CreateMenuProvider.d.ts +5 -5
  36. package/lib/camunda-cloud/features/external-resources/handlers/decision/ReplaceMenuProvider.d.ts +5 -5
  37. package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.d.ts +13 -13
  38. package/lib/camunda-cloud/features/external-resources/handlers/decision/index.d.ts +8 -8
  39. package/lib/camunda-cloud/features/external-resources/handlers/decision/replaceElement.d.ts +15 -15
  40. package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.d.ts +1 -1
  41. package/lib/camunda-cloud/features/external-resources/handlers/form/AppendMenuProvider.d.ts +5 -5
  42. package/lib/camunda-cloud/features/external-resources/handlers/form/CreateMenuProvider.d.ts +5 -5
  43. package/lib/camunda-cloud/features/external-resources/handlers/form/ReplaceMenuProvider.d.ts +5 -5
  44. package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.d.ts +9 -9
  45. package/lib/camunda-cloud/features/external-resources/handlers/form/index.d.ts +8 -8
  46. package/lib/camunda-cloud/features/external-resources/handlers/form/replaceElement.d.ts +15 -15
  47. package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.d.ts +1 -1
  48. package/lib/camunda-cloud/features/external-resources/handlers/process/AppendMenuProvider.d.ts +5 -5
  49. package/lib/camunda-cloud/features/external-resources/handlers/process/CreateMenuProvider.d.ts +5 -5
  50. package/lib/camunda-cloud/features/external-resources/handlers/process/ReplaceMenuProvider.d.ts +5 -5
  51. package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.d.ts +14 -14
  52. package/lib/camunda-cloud/features/external-resources/handlers/process/index.d.ts +8 -8
  53. package/lib/camunda-cloud/features/external-resources/handlers/process/replaceElement.d.ts +16 -16
  54. package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.d.ts +1 -1
  55. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.d.ts +18 -18
  56. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.d.ts +17 -17
  57. package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.d.ts +22 -22
  58. package/lib/camunda-cloud/features/external-resources/index.d.ts +23 -23
  59. package/lib/camunda-cloud/features/popup-menu/CamundaDetailsPopupMenuProvider.d.ts +26 -26
  60. package/lib/camunda-cloud/features/popup-menu/CamundaDetailsPopupMenuProvider.js +153 -153
  61. package/lib/camunda-cloud/features/popup-menu/index.d.ts +6 -6
  62. package/lib/camunda-cloud/util/commonModules.d.ts +9 -9
  63. package/lib/camunda-cloud/util/commonModules.js +15 -15
  64. package/lib/camunda-platform/Modeler.d.ts +3 -3
  65. package/lib/camunda-platform/Modeler.js +68 -68
  66. package/lib/camunda-platform/NavigatedViewer.d.ts +9 -9
  67. package/lib/camunda-platform/NavigatedViewer.js +27 -27
  68. package/lib/camunda-platform/Viewer.d.ts +9 -9
  69. package/lib/camunda-platform/Viewer.js +27 -27
  70. package/lib/camunda-platform/util/commonModules.d.ts +9 -9
  71. package/lib/camunda-platform/util/commonModules.js +11 -11
  72. package/lib/util/ExtensionElementsUtil.d.ts +24 -24
  73. package/lib/util/ExtensionElementsUtil.js +68 -68
  74. package/package.json +141 -141
  75. package/styles/base-modeler.css +5 -5
  76. package/styles/base-navigated-viewer.css +1 -1
  77. package/styles/base-viewer.css +1 -1
  78. package/styles/camunda-cloud-modeler.css +2 -2
  79. package/styles/camunda-platform-modeler.css +1 -1
@@ -9277,7 +9277,7 @@
9277
9277
  *
9278
9278
  * @return {Object} the parsed name
9279
9279
  */
9280
- function parseName$1(name, defaultPrefix) {
9280
+ function parseName$2(name, defaultPrefix) {
9281
9281
  var parts = name.split(/:/),
9282
9282
  localName, prefix;
9283
9283
 
@@ -9413,8 +9413,8 @@
9413
9413
  var nsPrefix = p.ns.prefix;
9414
9414
  var parts = targetPropertyName.split('#');
9415
9415
 
9416
- var name = parseName$1(parts[0], nsPrefix);
9417
- var attrName = parseName$1(parts[1], name.prefix).name;
9416
+ var name = parseName$2(parts[0], nsPrefix);
9417
+ var attrName = parseName$2(parts[1], name.prefix).name;
9418
9418
 
9419
9419
  var redefinedProperty = this.propertiesByName[attrName];
9420
9420
  if (!redefinedProperty) {
@@ -9602,7 +9602,7 @@
9602
9602
  meta: assign$2((type.meta || {}))
9603
9603
  });
9604
9604
 
9605
- var ns = parseName$1(type.name, pkg.prefix),
9605
+ var ns = parseName$2(type.name, pkg.prefix),
9606
9606
  name = ns.name,
9607
9607
  propertiesByName = {};
9608
9608
 
@@ -9610,12 +9610,12 @@
9610
9610
  forEach$2(type.properties, bind$3(function(p) {
9611
9611
 
9612
9612
  // namespace property names
9613
- var propertyNs = parseName$1(p.name, ns.prefix),
9613
+ var propertyNs = parseName$2(p.name, ns.prefix),
9614
9614
  propertyName = propertyNs.name;
9615
9615
 
9616
9616
  // namespace property types
9617
9617
  if (!isBuiltIn(p.type)) {
9618
- p.type = parseName$1(p.type, propertyNs.prefix).name;
9618
+ p.type = parseName$2(p.type, propertyNs.prefix).name;
9619
9619
  }
9620
9620
 
9621
9621
  assign$2(p, {
@@ -9634,7 +9634,7 @@
9634
9634
  });
9635
9635
 
9636
9636
  forEach$2(type.extends, bind$3(function(extendsName) {
9637
- var extendsNameNs = parseName$1(extendsName, ns.prefix);
9637
+ var extendsNameNs = parseName$2(extendsName, ns.prefix);
9638
9638
 
9639
9639
  var extended = this.typeMap[extendsNameNs.name];
9640
9640
 
@@ -9672,7 +9672,7 @@
9672
9672
  * @param {Boolean} [trait=false]
9673
9673
  */
9674
9674
  function traverse(cls, trait) {
9675
- var parentNs = parseName$1(cls, isBuiltIn(cls) ? '' : nsName.prefix);
9675
+ var parentNs = parseName$2(cls, isBuiltIn(cls) ? '' : nsName.prefix);
9676
9676
  self.mapTypes(parentNs, iterator, trait);
9677
9677
  }
9678
9678
 
@@ -9716,7 +9716,7 @@
9716
9716
  */
9717
9717
  Registry.prototype.getEffectiveDescriptor = function(name) {
9718
9718
 
9719
- var nsName = parseName$1(name);
9719
+ var nsName = parseName$2(name);
9720
9720
 
9721
9721
  var builder = new DescriptorBuilder(nsName);
9722
9722
 
@@ -10048,7 +10048,7 @@
10048
10048
  */
10049
10049
  Moddle.prototype.createAny = function(name, nsUri, properties) {
10050
10050
 
10051
- var nameNs = parseName$1(name);
10051
+ var nameNs = parseName$2(name);
10052
10052
 
10053
10053
  var element = {
10054
10054
  $type: name,
@@ -11246,11 +11246,11 @@
11246
11246
  function normalizeTypeName(name, nsMap, model) {
11247
11247
 
11248
11248
  // normalize against actual NS
11249
- const nameNs = parseName$1(name, nsMap.xmlns);
11249
+ const nameNs = parseName$2(name, nsMap.xmlns);
11250
11250
 
11251
11251
  const normalizedName = `${ nsMap[nameNs.prefix] || nameNs.prefix }:${ nameNs.localName }`;
11252
11252
 
11253
- const normalizedNameNs = parseName$1(normalizedName);
11253
+ const normalizedNameNs = parseName$2(normalizedName);
11254
11254
 
11255
11255
  // determine actual type name, based on package-defined prefix
11256
11256
  var pkg = model.getPackage(normalizedNameNs.prefix);
@@ -11283,7 +11283,7 @@
11283
11283
  * @param {ElementHandler} options.rootHandler the root handler for parsing a document
11284
11284
  * @param {boolean} [options.lax=false] whether or not to ignore invalid elements
11285
11285
  */
11286
- function Context$1(options) {
11286
+ function Context$2(options) {
11287
11287
 
11288
11288
  /**
11289
11289
  * @property {ElementHandler} rootHandler
@@ -11547,7 +11547,7 @@
11547
11547
  } else if (name === 'xmlns') {
11548
11548
  name = ':' + name;
11549
11549
  } else {
11550
- propNameNs = parseName$1(name, descriptor.ns.prefix);
11550
+ propNameNs = parseName$2(name, descriptor.ns.prefix);
11551
11551
 
11552
11552
  // check whether attribute is defined in a well-known namespace
11553
11553
  // if that is the case we emit a warning to indicate potential misuse
@@ -11572,7 +11572,7 @@
11572
11572
  ElementHandler.prototype.getPropertyForNode = function(node) {
11573
11573
 
11574
11574
  var name = node.name;
11575
- var nameNs = parseName$1(name);
11575
+ var nameNs = parseName$2(name);
11576
11576
 
11577
11577
  var type = this.type,
11578
11578
  model = this.model,
@@ -11731,7 +11731,7 @@
11731
11731
  RootElementHandler.prototype.createElement = function(node) {
11732
11732
 
11733
11733
  var name = node.name,
11734
- nameNs = parseName$1(name),
11734
+ nameNs = parseName$2(name),
11735
11735
  model = this.model,
11736
11736
  type = this.type,
11737
11737
  pkg = model.getPackage(nameNs.prefix),
@@ -11759,7 +11759,7 @@
11759
11759
  GenericElementHandler.prototype.createElement = function(node) {
11760
11760
 
11761
11761
  var name = node.name,
11762
- ns = parseName$1(name),
11762
+ ns = parseName$2(name),
11763
11763
  prefix = ns.prefix,
11764
11764
  uri = node.ns[prefix + '$uri'],
11765
11765
  attributes = node.attributes;
@@ -11862,7 +11862,7 @@
11862
11862
  var model = this.model,
11863
11863
  lax = this.lax;
11864
11864
 
11865
- var context = new Context$1(assign$2({}, options, { rootHandler: rootHandler })),
11865
+ var context = new Context$2(assign$2({}, options, { rootHandler: rootHandler })),
11866
11866
  parser = new Parser$1({ proxy: true }),
11867
11867
  stack = createStack();
11868
11868
 
@@ -12488,7 +12488,7 @@
12488
12488
  var ns;
12489
12489
 
12490
12490
  if (isString(element)) {
12491
- ns = parseName$1(element);
12491
+ ns = parseName$2(element);
12492
12492
  } else {
12493
12493
  ns = element.ns;
12494
12494
  }
@@ -12540,7 +12540,7 @@
12540
12540
  ElementSerializer.prototype.parseNsAttribute = function(element, name, value) {
12541
12541
  var model = element.$model;
12542
12542
 
12543
- var nameNs = parseName$1(name);
12543
+ var nameNs = parseName$2(name);
12544
12544
 
12545
12545
  var ns;
12546
12546
 
@@ -26972,7 +26972,7 @@
26972
26972
  * @typedef { 'top' | 'right' | 'bottom' | 'left' | 'center' | 'middle' } Alignment
26973
26973
  */
26974
26974
 
26975
- function last$1(arr) {
26975
+ function last$2(arr) {
26976
26976
  return arr && arr[arr.length - 1];
26977
26977
  }
26978
26978
 
@@ -27071,7 +27071,7 @@
27071
27071
  alignment[type] = sortedElements[0][axis];
27072
27072
 
27073
27073
  } else if (this._isType(type, [ 'right', 'bottom' ])) {
27074
- lastElement = last$1(sortedElements);
27074
+ lastElement = last$2(sortedElements);
27075
27075
 
27076
27076
  alignment[type] = lastElement[axis] + lastElement[dimension];
27077
27077
 
@@ -27101,7 +27101,7 @@
27101
27101
  });
27102
27102
 
27103
27103
  if (hasSharedCenters) {
27104
- alignment[type] = last$1(centeredElements).center;
27104
+ alignment[type] = last$2(centeredElements).center;
27105
27105
 
27106
27106
  return alignment;
27107
27107
  }
@@ -27112,7 +27112,7 @@
27112
27112
  return element[axis] + element[dimension];
27113
27113
  });
27114
27114
 
27115
- lastElement = last$1(sortedElements);
27115
+ lastElement = last$2(sortedElements);
27116
27116
 
27117
27117
  alignment[type] = getMiddleOrTop(firstElement, lastElement);
27118
27118
  }
@@ -64172,7 +64172,7 @@
64172
64172
  });
64173
64173
 
64174
64174
  keyboard && keyboard.addListener(HIGH_PRIORITY$1, function(e) {
64175
- if (!isSpace$1(e.keyEvent) || self.isActive()) {
64175
+ if (!isSpace$2(e.keyEvent) || self.isActive()) {
64176
64176
  return;
64177
64177
  }
64178
64178
 
@@ -64182,7 +64182,7 @@
64182
64182
  }, 'keyboard.keydown');
64183
64183
 
64184
64184
  keyboard && keyboard.addListener(HIGH_PRIORITY$1, function(e) {
64185
- if (!isSpace$1(e.keyEvent) || !self.isActive()) {
64185
+ if (!isSpace$2(e.keyEvent) || !self.isActive()) {
64186
64186
  return;
64187
64187
  }
64188
64188
 
@@ -64302,7 +64302,7 @@
64302
64302
 
64303
64303
  // helpers //////////
64304
64304
 
64305
- function isSpace$1(keyEvent) {
64305
+ function isSpace$2(keyEvent) {
64306
64306
  return isKey('Space', keyEvent);
64307
64307
  }
64308
64308
 
@@ -74053,74 +74053,74 @@
74053
74053
  ]);
74054
74054
 
74055
74055
  // This file was generated by lezer-generator. You probably shouldn't edit it.
74056
- const propertyIdentifier = 121,
74057
- identifier = 122,
74058
- nameIdentifier = 123,
74059
- insertSemi = 124,
74060
- expression0 = 128,
74061
- ForExpression = 4,
74062
- forExpressionStart = 131,
74063
- ForInExpression = 7,
74064
- Name = 8,
74065
- Identifier = 9,
74066
- AdditionalIdentifier = 10,
74067
- forExpressionBodyStart = 139,
74068
- IfExpression = 19,
74069
- ifExpressionStart = 140,
74070
- QuantifiedExpression = 23,
74071
- quantifiedExpressionStart = 141,
74072
- QuantifiedInExpression = 27,
74073
- PositiveUnaryTest = 37,
74074
- ArithmeticExpression = 41,
74075
- arithmeticPlusStart = 145,
74076
- arithmeticTimesStart = 146,
74077
- arithmeticExpStart = 147,
74078
- arithmeticUnaryStart = 148,
74079
- VariableName = 47,
74080
- PathExpression = 68,
74081
- pathExpressionStart = 154,
74082
- FilterExpression = 70,
74083
- filterExpressionStart = 155,
74084
- FunctionInvocation = 72,
74085
- functionInvocationStart = 156,
74086
- ParameterName = 76,
74087
- nil = 161,
74088
- NumericLiteral = 79,
74089
- StringLiteral = 80,
74090
- BooleanLiteral = 81,
74091
- listStart = 167,
74092
- List = 89,
74093
- FunctionDefinition = 90,
74094
- functionDefinitionStart = 169,
74095
- Context = 97,
74096
- contextStart = 171,
74097
- ContextEntry = 98,
74098
- PropertyName = 100,
74099
- PropertyIdentifier = 101;
74056
+ const propertyIdentifier$1 = 121,
74057
+ identifier$1 = 122,
74058
+ nameIdentifier$1 = 123,
74059
+ insertSemi$1 = 124,
74060
+ expression0$1 = 128,
74061
+ ForExpression$1 = 4,
74062
+ forExpressionStart$1 = 131,
74063
+ ForInExpression$1 = 7,
74064
+ Name$1 = 8,
74065
+ Identifier$1 = 9,
74066
+ AdditionalIdentifier$1 = 10,
74067
+ forExpressionBodyStart$1 = 139,
74068
+ IfExpression$1 = 19,
74069
+ ifExpressionStart$1 = 140,
74070
+ QuantifiedExpression$1 = 23,
74071
+ quantifiedExpressionStart$1 = 141,
74072
+ QuantifiedInExpression$1 = 27,
74073
+ PositiveUnaryTest$1 = 37,
74074
+ ArithmeticExpression$1 = 41,
74075
+ arithmeticPlusStart$1 = 145,
74076
+ arithmeticTimesStart$1 = 146,
74077
+ arithmeticExpStart$1 = 147,
74078
+ arithmeticUnaryStart$1 = 148,
74079
+ VariableName$1 = 47,
74080
+ PathExpression$1 = 68,
74081
+ pathExpressionStart$1 = 154,
74082
+ FilterExpression$1 = 70,
74083
+ filterExpressionStart$1 = 155,
74084
+ FunctionInvocation$1 = 72,
74085
+ functionInvocationStart$1 = 156,
74086
+ ParameterName$1 = 76,
74087
+ nil$1 = 161,
74088
+ NumericLiteral$1 = 79,
74089
+ StringLiteral$1 = 80,
74090
+ BooleanLiteral$1 = 81,
74091
+ listStart$1 = 167,
74092
+ List$1 = 89,
74093
+ FunctionDefinition$1 = 90,
74094
+ functionDefinitionStart$1 = 169,
74095
+ Context$1 = 97,
74096
+ contextStart$1 = 171,
74097
+ ContextEntry$1 = 98,
74098
+ PropertyName$1 = 100,
74099
+ PropertyIdentifier$1 = 101;
74100
74100
 
74101
74101
  /* global console,process */
74102
74102
 
74103
74103
 
74104
74104
  // @ts-expect-error env access
74105
- const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
74105
+ const LOG_PARSE$1 = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
74106
74106
 
74107
74107
  // @ts-expect-error env access
74108
- const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
74108
+ const LOG_PARSE_DEBUG$1 = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
74109
74109
 
74110
74110
  // @ts-expect-error env access
74111
- const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
74111
+ const LOG_VARS$1 = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
74112
74112
 
74113
- const spaceChars = [
74113
+ const spaceChars$1 = [
74114
74114
  9, 11, 12, 32, 133, 160,
74115
74115
  5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
74116
74116
  8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
74117
74117
  ];
74118
74118
 
74119
- const newlineChars = chars('\n\r');
74119
+ const newlineChars$1 = chars$1('\n\r');
74120
74120
 
74121
- const asterix = '*'.charCodeAt(0);
74121
+ const asterix$1 = '*'.charCodeAt(0);
74122
74122
 
74123
- const additionalNameChars = chars("'./-+*^");
74123
+ const additionalNameChars$1 = chars$1("'./-+*^");
74124
74124
 
74125
74125
  /**
74126
74126
  * @typedef { VariableContext | any } ContextValue
@@ -74130,7 +74130,7 @@
74130
74130
  * @param { string } str
74131
74131
  * @return { number[] }
74132
74132
  */
74133
- function chars(str) {
74133
+ function chars$1(str) {
74134
74134
  return Array.from(str).map(s => s.charCodeAt(0));
74135
74135
  }
74136
74136
 
@@ -74138,7 +74138,7 @@
74138
74138
  * @param { number } ch
74139
74139
  * @return { boolean }
74140
74140
  */
74141
- function isStartChar(ch) {
74141
+ function isStartChar$1(ch) {
74142
74142
  return (
74143
74143
  ch === 63 // ?
74144
74144
  ) || (
@@ -74180,15 +74180,15 @@
74180
74180
  * @param { number } ch
74181
74181
  * @return { boolean }
74182
74182
  */
74183
- function isAdditional(ch) {
74184
- return additionalNameChars.includes(ch);
74183
+ function isAdditional$1(ch) {
74184
+ return additionalNameChars$1.includes(ch);
74185
74185
  }
74186
74186
 
74187
74187
  /**
74188
74188
  * @param { number } ch
74189
74189
  * @return { boolean }
74190
74190
  */
74191
- function isPartChar(ch) {
74191
+ function isPartChar$1(ch) {
74192
74192
  return (
74193
74193
  ch >= 48 && ch <= 57 // 0-9
74194
74194
  ) || (
@@ -74204,11 +74204,11 @@
74204
74204
  * @param { number } ch
74205
74205
  * @return { boolean }
74206
74206
  */
74207
- function isSpace(ch) {
74208
- return spaceChars.includes(ch);
74207
+ function isSpace$1(ch) {
74208
+ return spaceChars$1.includes(ch);
74209
74209
  }
74210
74210
 
74211
- function indent(str, spaces) {
74211
+ function indent$1(str, spaces) {
74212
74212
  return spaces.concat(
74213
74213
  str.split(/\n/g).join('\n' + spaces)
74214
74214
  );
@@ -74220,11 +74220,11 @@
74220
74220
  *
74221
74221
  * @return { { token: string, offset: number } | null }
74222
74222
  */
74223
- function parseAdditionalSymbol(input, offset = 0) {
74223
+ function parseAdditionalSymbol$1(input, offset = 0) {
74224
74224
 
74225
74225
  const next = input.peek(offset);
74226
74226
 
74227
- if (next === asterix && input.peek(offset + 1) === asterix) {
74227
+ if (next === asterix$1 && input.peek(offset + 1) === asterix$1) {
74228
74228
 
74229
74229
  return {
74230
74230
  offset: 2,
@@ -74232,7 +74232,7 @@
74232
74232
  };
74233
74233
  }
74234
74234
 
74235
- if (isAdditional(next)) {
74235
+ if (isAdditional$1(next)) {
74236
74236
  return {
74237
74237
  offset: 1,
74238
74238
  token: String.fromCharCode(next)
@@ -74249,11 +74249,11 @@
74249
74249
  *
74250
74250
  * @return { { token: string, offset: number } | null }
74251
74251
  */
74252
- function parseIdentifier(input, offset = 0, namePart = false) {
74252
+ function parseIdentifier$1(input, offset = 0, namePart = false) {
74253
74253
  for (let inside = false, chars = [], i = 0;; i++) {
74254
74254
  const next = input.peek(offset + i);
74255
74255
 
74256
- if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
74256
+ if (isStartChar$1(next) || ((inside || namePart) && isPartChar$1(next))) {
74257
74257
  if (!inside) {
74258
74258
  inside = true;
74259
74259
  }
@@ -74279,12 +74279,12 @@
74279
74279
  *
74280
74280
  * @return { { token: string, offset: number } | null }
74281
74281
  */
74282
- function parseSpaces(input, offset) {
74282
+ function parseSpaces$1(input, offset) {
74283
74283
 
74284
74284
  for (let inside = false, i = 0;; i++) {
74285
74285
  let next = input.peek(offset + i);
74286
74286
 
74287
- if (isSpace(next)) {
74287
+ if (isSpace$1(next)) {
74288
74288
  if (!inside) {
74289
74289
  inside = true;
74290
74290
  }
@@ -74309,7 +74309,7 @@
74309
74309
  *
74310
74310
  * @return { { token: string, offset: number, term: number } | null }
74311
74311
  */
74312
- function parseName(input, variables) {
74312
+ function parseName$1(input, variables) {
74313
74313
  const contextKeys = variables.contextKeys();
74314
74314
 
74315
74315
  const start = variables.tokens;
@@ -74320,9 +74320,9 @@
74320
74320
  const maybeSpace = tokens.length > 0;
74321
74321
 
74322
74322
  const match = (
74323
- parseIdentifier(input, i, namePart) ||
74324
- namePart && parseAdditionalSymbol(input, i) ||
74325
- maybeSpace && parseSpaces(input, i)
74323
+ parseIdentifier$1(input, i, namePart) ||
74324
+ namePart && parseAdditionalSymbol$1(input, i) ||
74325
+ maybeSpace && parseSpaces$1(input, i)
74326
74326
  );
74327
74327
 
74328
74328
  // match is required
@@ -74351,7 +74351,7 @@
74351
74351
  nextMatch = {
74352
74352
  token,
74353
74353
  offset: token.length,
74354
- term: nameIdentifier
74354
+ term: nameIdentifier$1
74355
74355
  };
74356
74356
  }
74357
74357
 
@@ -74359,7 +74359,7 @@
74359
74359
  continue;
74360
74360
  }
74361
74361
 
74362
- if (dateTimeIdentifiers.some(el => el === name)) {
74362
+ if (dateTimeIdentifiers$1.some(el => el === name)) {
74363
74363
  const token = tokens[0];
74364
74364
 
74365
74365
  // parse date time identifiers as normal
@@ -74369,11 +74369,11 @@
74369
74369
  nextMatch = {
74370
74370
  token,
74371
74371
  offset: token.length,
74372
- term: identifier
74372
+ term: identifier$1
74373
74373
  };
74374
74374
  }
74375
74375
 
74376
- if (dateTimeIdentifiers.some(el => el.startsWith(name))) {
74376
+ if (dateTimeIdentifiers$1.some(el => el.startsWith(name))) {
74377
74377
  continue;
74378
74378
  }
74379
74379
 
@@ -74382,50 +74382,50 @@
74382
74382
 
74383
74383
  }
74384
74384
 
74385
- const identifiersMap = {
74386
- [ identifier ]: 'identifier',
74387
- [ nameIdentifier ]: 'nameIdentifier'
74385
+ const identifiersMap$1 = {
74386
+ [ identifier$1 ]: 'identifier',
74387
+ [ nameIdentifier$1 ]: 'nameIdentifier'
74388
74388
  };
74389
74389
 
74390
- const identifiers = new ExternalTokenizer((input, stack) => {
74390
+ const identifiers$1 = new ExternalTokenizer((input, stack) => {
74391
74391
 
74392
- LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
74392
+ LOG_PARSE_DEBUG$1 && console.log('%s: T <identifier | nameIdentifier>', input.pos);
74393
74393
 
74394
- const nameMatch = parseName(input, stack.context);
74394
+ const nameMatch = parseName$1(input, stack.context);
74395
74395
 
74396
74396
  const start = stack.context.tokens;
74397
74397
 
74398
- const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
74398
+ const match = nameMatch || parseIdentifier$1(input, 0, start.length > 0);
74399
74399
 
74400
74400
  if (match) {
74401
74401
  input.advance(match.offset);
74402
- input.acceptToken(nameMatch ? nameMatch.term : identifier);
74402
+ input.acceptToken(nameMatch ? nameMatch.term : identifier$1);
74403
74403
 
74404
- LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
74404
+ LOG_PARSE$1 && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap$1[nameMatch.term] : 'identifier', match.token);
74405
74405
  }
74406
74406
  }, { contextual: true });
74407
74407
 
74408
74408
 
74409
- const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
74409
+ const propertyIdentifiers$1 = new ExternalTokenizer((input, stack) => {
74410
74410
 
74411
- LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
74411
+ LOG_PARSE_DEBUG$1 && console.log('%s: T <propertyIdentifier>', input.pos);
74412
74412
 
74413
74413
  const start = stack.context.tokens;
74414
74414
 
74415
- const match = parseIdentifier(input, 0, start.length > 0);
74415
+ const match = parseIdentifier$1(input, 0, start.length > 0);
74416
74416
 
74417
74417
  if (match) {
74418
74418
  input.advance(match.offset);
74419
- input.acceptToken(propertyIdentifier);
74419
+ input.acceptToken(propertyIdentifier$1);
74420
74420
 
74421
- LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
74421
+ LOG_PARSE$1 && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
74422
74422
  }
74423
74423
  });
74424
74424
 
74425
74425
 
74426
- const insertSemicolon = new ExternalTokenizer((input, stack) => {
74426
+ const insertSemicolon$1 = new ExternalTokenizer((input, stack) => {
74427
74427
 
74428
- LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
74428
+ LOG_PARSE_DEBUG$1 && console.log('%s: T <insertSemi>', input.pos);
74429
74429
 
74430
74430
  let offset;
74431
74431
  let insert = false;
@@ -74433,11 +74433,11 @@
74433
74433
  for (offset = 0;; offset++) {
74434
74434
  const char = input.peek(offset);
74435
74435
 
74436
- if (spaceChars.includes(char)) {
74436
+ if (spaceChars$1.includes(char)) {
74437
74437
  continue;
74438
74438
  }
74439
74439
 
74440
- if (newlineChars.includes(char)) {
74440
+ if (newlineChars$1.includes(char)) {
74441
74441
  insert = true;
74442
74442
  }
74443
74443
 
@@ -74446,51 +74446,51 @@
74446
74446
 
74447
74447
  if (insert) {
74448
74448
 
74449
- const identifier = parseIdentifier(input, offset + 1);
74450
- const spaces = parseSpaces(input, offset + 1);
74449
+ const identifier = parseIdentifier$1(input, offset + 1);
74450
+ const spaces = parseSpaces$1(input, offset + 1);
74451
74451
 
74452
74452
  if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
74453
74453
  return;
74454
74454
  }
74455
74455
 
74456
- LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
74457
- input.acceptToken(insertSemi);
74456
+ LOG_PARSE$1 && console.log('%s: MATCH <insertSemi>', input.pos);
74457
+ input.acceptToken(insertSemi$1);
74458
74458
  }
74459
74459
  });
74460
74460
 
74461
- const prefixedContextStarts = {
74462
- [ functionInvocationStart ]: 'FunctionInvocation',
74463
- [ filterExpressionStart ]: 'FilterExpression',
74464
- [ pathExpressionStart ]: 'PathExpression'
74461
+ const prefixedContextStarts$1 = {
74462
+ [ functionInvocationStart$1 ]: 'FunctionInvocation',
74463
+ [ filterExpressionStart$1 ]: 'FilterExpression',
74464
+ [ pathExpressionStart$1 ]: 'PathExpression'
74465
74465
  };
74466
74466
 
74467
- const contextStarts = {
74468
- [ contextStart ]: 'Context',
74469
- [ functionDefinitionStart ]: 'FunctionDefinition',
74470
- [ forExpressionStart ]: 'ForExpression',
74471
- [ listStart ]: 'List',
74472
- [ ifExpressionStart ]: 'IfExpression',
74473
- [ quantifiedExpressionStart ]: 'QuantifiedExpression'
74467
+ const contextStarts$1 = {
74468
+ [ contextStart$1 ]: 'Context',
74469
+ [ functionDefinitionStart$1 ]: 'FunctionDefinition',
74470
+ [ forExpressionStart$1 ]: 'ForExpression',
74471
+ [ listStart$1 ]: 'List',
74472
+ [ ifExpressionStart$1 ]: 'IfExpression',
74473
+ [ quantifiedExpressionStart$1 ]: 'QuantifiedExpression'
74474
74474
  };
74475
74475
 
74476
- const contextEnds = {
74477
- [ Context ]: 'Context',
74478
- [ FunctionDefinition ]: 'FunctionDefinition',
74479
- [ ForExpression ]: 'ForExpression',
74480
- [ List ]: 'List',
74481
- [ IfExpression ]: 'IfExpression',
74482
- [ QuantifiedExpression ]: 'QuantifiedExpression',
74483
- [ PathExpression ]: 'PathExpression',
74484
- [ FunctionInvocation ]: 'FunctionInvocation',
74485
- [ FilterExpression ]: 'FilterExpression',
74486
- [ ArithmeticExpression ]: 'ArithmeticExpression'
74476
+ const contextEnds$1 = {
74477
+ [ Context$1 ]: 'Context',
74478
+ [ FunctionDefinition$1 ]: 'FunctionDefinition',
74479
+ [ ForExpression$1 ]: 'ForExpression',
74480
+ [ List$1 ]: 'List',
74481
+ [ IfExpression$1 ]: 'IfExpression',
74482
+ [ QuantifiedExpression$1 ]: 'QuantifiedExpression',
74483
+ [ PathExpression$1 ]: 'PathExpression',
74484
+ [ FunctionInvocation$1 ]: 'FunctionInvocation',
74485
+ [ FilterExpression$1 ]: 'FilterExpression',
74486
+ [ ArithmeticExpression$1 ]: 'ArithmeticExpression'
74487
74487
  };
74488
74488
 
74489
74489
  /**
74490
74490
  * A simple producer that retrievs a value from
74491
74491
  * a given context. Used to lazily take things.
74492
74492
  */
74493
- class ValueProducer {
74493
+ let ValueProducer$1 = class ValueProducer {
74494
74494
 
74495
74495
  /**
74496
74496
  * @param { Function } fn
@@ -74512,22 +74512,22 @@
74512
74512
  return new ValueProducer(fn);
74513
74513
  }
74514
74514
 
74515
- }
74515
+ };
74516
74516
 
74517
- const dateTimeLiterals = {
74517
+ const dateTimeLiterals$1 = {
74518
74518
  'date and time': 1,
74519
74519
  'date': 1,
74520
74520
  'time': 1,
74521
74521
  'duration': 1
74522
74522
  };
74523
74523
 
74524
- const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
74524
+ const dateTimeIdentifiers$1 = Object.keys(dateTimeLiterals$1);
74525
74525
 
74526
74526
 
74527
74527
  /**
74528
74528
  * A basic key-value store to hold context values.
74529
74529
  */
74530
- class VariableContext {
74530
+ let VariableContext$1 = class VariableContext {
74531
74531
 
74532
74532
  /**
74533
74533
  * Creates a new context from a JavaScript object.
@@ -74616,7 +74616,7 @@
74616
74616
  static isAtomic(value) {
74617
74617
  return !value ||
74618
74618
  value instanceof this ||
74619
- value instanceof ValueProducer ||
74619
+ value instanceof ValueProducer$1 ||
74620
74620
  typeof value !== 'object';
74621
74621
  }
74622
74622
 
@@ -74667,7 +74667,7 @@
74667
74667
  static __merge(context, other) {
74668
74668
 
74669
74669
  return reduce(this.__unwrap(other), (merged, value, key) => {
74670
- if (value instanceof ValueProducer) {
74670
+ if (value instanceof ValueProducer$1) {
74671
74671
 
74672
74672
  // keep value producers in tact
74673
74673
  return {
@@ -74689,9 +74689,9 @@
74689
74689
  }, this.__unwrap(context));
74690
74690
  }
74691
74691
 
74692
- }
74692
+ };
74693
74693
 
74694
- class Variables {
74694
+ let Variables$1 = class Variables {
74695
74695
 
74696
74696
  /**
74697
74697
  * @param { {
@@ -74729,7 +74729,7 @@
74729
74729
  parent: this
74730
74730
  });
74731
74731
 
74732
- LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
74732
+ LOG_VARS$1 && console.log('[%s] enter', childScope.path, childScope.context);
74733
74733
 
74734
74734
  return childScope;
74735
74735
  }
@@ -74737,19 +74737,19 @@
74737
74737
  exitScope(str) {
74738
74738
 
74739
74739
  if (!this.parent) {
74740
- LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
74740
+ LOG_VARS$1 && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent$1(str, ' '));
74741
74741
 
74742
74742
  return this;
74743
74743
  }
74744
74744
 
74745
- LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
74745
+ LOG_VARS$1 && console.log('[%s] exit %o\n%s', this.path, this.context, indent$1(str, ' '));
74746
74746
 
74747
74747
  return this.parent.pushChild(this);
74748
74748
  }
74749
74749
 
74750
74750
  token(part) {
74751
74751
 
74752
- LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
74752
+ LOG_VARS$1 && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
74753
74753
 
74754
74754
  return this.assign({
74755
74755
  tokens: [ ...this.tokens, part ]
@@ -74758,7 +74758,7 @@
74758
74758
 
74759
74759
  literal(value) {
74760
74760
 
74761
- LOG_VARS && console.log('[%s] literal %o', this.path, value);
74761
+ LOG_VARS$1 && console.log('[%s] literal %o', this.path, value);
74762
74762
 
74763
74763
  return this.pushChild(this.of({
74764
74764
  name: 'Literal',
@@ -74772,7 +74772,7 @@
74772
74772
  * @return {any}
74773
74773
  */
74774
74774
  computedValue() {
74775
- for (let scope = this;;scope = last(scope.children)) {
74775
+ for (let scope = this;;scope = last$1(scope.children)) {
74776
74776
 
74777
74777
  if (!scope) {
74778
74778
  return null;
@@ -74785,7 +74785,7 @@
74785
74785
  }
74786
74786
 
74787
74787
  contextKeys() {
74788
- return this.context.getKeys().map(normalizeContextKey);
74788
+ return this.context.getKeys().map(normalizeContextKey$1);
74789
74789
  }
74790
74790
 
74791
74791
  get path() {
@@ -74800,10 +74800,10 @@
74800
74800
  */
74801
74801
  get(variable) {
74802
74802
 
74803
- const names = [ variable, variable && normalizeContextKey(variable) ];
74803
+ const names = [ variable, variable && normalizeContextKey$1(variable) ];
74804
74804
 
74805
74805
  const contextKey = this.context.getKeys().find(
74806
- key => names.includes(normalizeContextKey(key))
74806
+ key => names.includes(normalizeContextKey$1(key))
74807
74807
  );
74808
74808
 
74809
74809
  if (typeof contextKey === 'undefined') {
@@ -74812,7 +74812,7 @@
74812
74812
 
74813
74813
  const val = this.context.get(contextKey);
74814
74814
 
74815
- if (val instanceof ValueProducer) {
74815
+ if (val instanceof ValueProducer$1) {
74816
74816
  return val.get(this);
74817
74817
  } else {
74818
74818
  return val;
@@ -74835,7 +74835,7 @@
74835
74835
  raw: variable
74836
74836
  });
74837
74837
 
74838
- LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
74838
+ LOG_VARS$1 && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
74839
74839
 
74840
74840
  return parentScope.pushChild(variableScope);
74841
74841
  }
@@ -74877,7 +74877,7 @@
74877
74877
 
74878
74878
  const variableName = this.tokens.join(' ');
74879
74879
 
74880
- LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
74880
+ LOG_VARS$1 && console.log('[%s] declareName <%s>', this.path, variableName);
74881
74881
 
74882
74882
  return this.assign({
74883
74883
  tokens: []
@@ -74892,12 +74892,12 @@
74892
74892
  define(name, value) {
74893
74893
 
74894
74894
  if (typeof name !== 'string') {
74895
- LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
74895
+ LOG_VARS$1 && console.log('[%s] no define <%s=%s>', this.path, name, value);
74896
74896
 
74897
74897
  return this;
74898
74898
  }
74899
74899
 
74900
- LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
74900
+ LOG_VARS$1 && console.log('[%s] define <%s=%s>', this.path, name, value);
74901
74901
 
74902
74902
  const context = this.context.set(name, value);
74903
74903
 
@@ -74977,14 +74977,14 @@
74977
74977
  });
74978
74978
  }
74979
74979
 
74980
- }
74980
+ };
74981
74981
 
74982
74982
  /**
74983
74983
  * @param { string } name
74984
74984
  *
74985
74985
  * @return { string } normalizedName
74986
74986
  */
74987
- function normalizeContextKey(name) {
74987
+ function normalizeContextKey$1(name) {
74988
74988
  return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
74989
74989
  }
74990
74990
 
@@ -74996,7 +74996,7 @@
74996
74996
  * @param { string } code
74997
74997
  * @return { Variables }
74998
74998
  */
74999
- function wrap(variables, scopeName, code) {
74999
+ function wrap$1(variables, scopeName, code) {
75000
75000
 
75001
75001
  const parts = variables.children.filter(c => c.name !== scopeName);
75002
75002
  const children = variables.children.filter(c => c.name === scopeName);
@@ -75023,9 +75023,9 @@
75023
75023
  *
75024
75024
  * @return { ContextTracker<Variables> }
75025
75025
  */
75026
- function trackVariables(context = {}, Context = VariableContext) {
75026
+ function trackVariables$1(context = {}, Context = VariableContext$1) {
75027
75027
 
75028
- const start = Variables.of({
75028
+ const start = Variables$1.of({
75029
75029
  context: Context.of(context)
75030
75030
  });
75031
75031
 
@@ -75033,7 +75033,7 @@
75033
75033
  start,
75034
75034
  reduce(variables, term, stack, input) {
75035
75035
 
75036
- if (term === IfExpression) {
75036
+ if (term === IfExpression$1) {
75037
75037
  const [ thenPart, elsePart ] = variables.children.slice(-2);
75038
75038
 
75039
75039
  variables = variables.assign({
@@ -75044,7 +75044,7 @@
75044
75044
  });
75045
75045
  }
75046
75046
 
75047
- if (term === List) {
75047
+ if (term === List$1) {
75048
75048
  variables = variables.assign({
75049
75049
  value: Context.of(
75050
75050
  ...variables.children.map(
@@ -75054,7 +75054,7 @@
75054
75054
  });
75055
75055
  }
75056
75056
 
75057
- if (term === FilterExpression) {
75057
+ if (term === FilterExpression$1) {
75058
75058
  const [ sourcePart, _ ] = variables.children.slice(-2);
75059
75059
 
75060
75060
  variables = variables.assign({
@@ -75062,7 +75062,7 @@
75062
75062
  });
75063
75063
  }
75064
75064
 
75065
- if (term === FunctionInvocation) {
75065
+ if (term === FunctionInvocation$1) {
75066
75066
 
75067
75067
  const [
75068
75068
  name,
@@ -75071,17 +75071,17 @@
75071
75071
 
75072
75072
  // preserve type information through `get value(context, key)` utility
75073
75073
  if (name?.raw === 'get value') {
75074
- variables = getContextValue(variables, args);
75074
+ variables = getContextValue$1(variables, args);
75075
75075
  }
75076
75076
  }
75077
75077
 
75078
- const start = contextStarts[term];
75078
+ const start = contextStarts$1[term];
75079
75079
 
75080
75080
  if (start) {
75081
75081
  return variables.enterScope(start);
75082
75082
  }
75083
75083
 
75084
- const prefixedStart = prefixedContextStarts[term];
75084
+ const prefixedStart = prefixedContextStarts$1[term];
75085
75085
 
75086
75086
  // pull <expression> into new <prefixedStart> context
75087
75087
  if (prefixedStart) {
@@ -75092,15 +75092,15 @@
75092
75092
  } = variables;
75093
75093
 
75094
75094
  const children = currentChildren.slice(0, -1);
75095
- const lastChild = last(currentChildren);
75095
+ const lastChild = last$1(currentChildren);
75096
75096
 
75097
75097
  let newContext = null;
75098
75098
 
75099
- if (term === pathExpressionStart) {
75099
+ if (term === pathExpressionStart$1) {
75100
75100
  newContext = Context.of(lastChild?.computedValue());
75101
75101
  }
75102
75102
 
75103
- if (term === filterExpressionStart) {
75103
+ if (term === filterExpressionStart$1) {
75104
75104
  newContext = Context.of(
75105
75105
  currentContext,
75106
75106
  lastChild?.computedValue()
@@ -75117,19 +75117,19 @@
75117
75117
  // @ts-expect-error internal method
75118
75118
  const code = input.read(input.pos, stack.pos);
75119
75119
 
75120
- const end = contextEnds[term];
75120
+ const end = contextEnds$1[term];
75121
75121
 
75122
75122
  if (end) {
75123
75123
  return variables.exitScope(code);
75124
75124
  }
75125
75125
 
75126
- if (term === ContextEntry) {
75126
+ if (term === ContextEntry$1) {
75127
75127
  const parts = variables.children.filter(c => c.name !== 'ContextEntry');
75128
75128
 
75129
75129
  const name = parts[0];
75130
- const value = last(parts);
75130
+ const value = last$1(parts);
75131
75131
 
75132
- return wrap(variables, 'ContextEntry', code).assign(
75132
+ return wrap$1(variables, 'ContextEntry', code).assign(
75133
75133
  {
75134
75134
  value: Context
75135
75135
  .of(variables.value)
@@ -75139,27 +75139,27 @@
75139
75139
  }
75140
75140
 
75141
75141
  if (
75142
- term === ForInExpression ||
75143
- term === QuantifiedInExpression
75142
+ term === ForInExpression$1 ||
75143
+ term === QuantifiedInExpression$1
75144
75144
  ) {
75145
- return wrap(variables, 'InExpression', code);
75145
+ return wrap$1(variables, 'InExpression', code);
75146
75146
  }
75147
75147
 
75148
75148
  // define <partial> within ForExpression body
75149
- if (term === forExpressionBodyStart) {
75149
+ if (term === forExpressionBodyStart$1) {
75150
75150
 
75151
75151
  return variables.define(
75152
75152
  'partial',
75153
- ValueProducer.of(variables => {
75154
- return last(variables.children)?.computedValue();
75153
+ ValueProducer$1.of(variables => {
75154
+ return last$1(variables.children)?.computedValue();
75155
75155
  })
75156
75156
  );
75157
75157
  }
75158
75158
 
75159
75159
  if (
75160
- term === ParameterName
75160
+ term === ParameterName$1
75161
75161
  ) {
75162
- const name = last(variables.children).computedValue();
75162
+ const name = last$1(variables.children).computedValue();
75163
75163
 
75164
75164
  // TODO: attach type information
75165
75165
  return variables.define(name, 1);
@@ -75167,71 +75167,71 @@
75167
75167
 
75168
75168
  // pull <expression> into ArithmeticExpression child
75169
75169
  if (
75170
- term === arithmeticPlusStart ||
75171
- term === arithmeticTimesStart ||
75172
- term === arithmeticExpStart
75170
+ term === arithmeticPlusStart$1 ||
75171
+ term === arithmeticTimesStart$1 ||
75172
+ term === arithmeticExpStart$1
75173
75173
  ) {
75174
75174
  const children = variables.children.slice(0, -1);
75175
- const lastChild = last(variables.children);
75175
+ const lastChild = last$1(variables.children);
75176
75176
 
75177
75177
  return variables.assign({
75178
75178
  children
75179
75179
  }).enterScope('ArithmeticExpression').pushChild(lastChild);
75180
75180
  }
75181
75181
 
75182
- if (term === arithmeticUnaryStart) {
75182
+ if (term === arithmeticUnaryStart$1) {
75183
75183
  return variables.enterScope('ArithmeticExpression');
75184
75184
  }
75185
75185
 
75186
75186
  if (
75187
- term === Identifier ||
75188
- term === AdditionalIdentifier ||
75189
- term === PropertyIdentifier
75187
+ term === Identifier$1 ||
75188
+ term === AdditionalIdentifier$1 ||
75189
+ term === PropertyIdentifier$1
75190
75190
  ) {
75191
75191
  return variables.token(code);
75192
75192
  }
75193
75193
 
75194
75194
  if (
75195
- term === StringLiteral
75195
+ term === StringLiteral$1
75196
75196
  ) {
75197
75197
  return variables.literal(code.replace(/^"|"$/g, ''));
75198
75198
  }
75199
75199
 
75200
- if (term === BooleanLiteral) {
75200
+ if (term === BooleanLiteral$1) {
75201
75201
  return variables.literal(code === 'true' ? true : false);
75202
75202
  }
75203
75203
 
75204
- if (term === NumericLiteral) {
75204
+ if (term === NumericLiteral$1) {
75205
75205
  return variables.literal(parseFloat(code));
75206
75206
  }
75207
75207
 
75208
- if (term === nil) {
75208
+ if (term === nil$1) {
75209
75209
  return variables.literal(null);
75210
75210
  }
75211
75211
 
75212
75212
  if (
75213
- term === VariableName
75213
+ term === VariableName$1
75214
75214
  ) {
75215
75215
  return variables.resolveName();
75216
75216
  }
75217
75217
 
75218
75218
  if (
75219
- term === Name ||
75220
- term === PropertyName
75219
+ term === Name$1 ||
75220
+ term === PropertyName$1
75221
75221
  ) {
75222
75222
  return variables.declareName();
75223
75223
  }
75224
75224
 
75225
75225
  if (
75226
- term === expression0 ||
75227
- term === PositiveUnaryTest
75226
+ term === expression0$1 ||
75227
+ term === PositiveUnaryTest$1
75228
75228
  ) {
75229
75229
  if (variables.tokens.length > 0) {
75230
75230
  throw new Error('uncleared name');
75231
75231
  }
75232
75232
  }
75233
75233
 
75234
- if (term === expression0) {
75234
+ if (term === expression0$1) {
75235
75235
 
75236
75236
  let parent = variables;
75237
75237
 
@@ -75247,12 +75247,12 @@
75247
75247
  });
75248
75248
  }
75249
75249
 
75250
- const variableTracker = trackVariables({});
75250
+ const variableTracker$1 = trackVariables$1({});
75251
75251
 
75252
75252
 
75253
75253
  // helpers //////////////
75254
75254
 
75255
- function getContextValue(variables, args) {
75255
+ function getContextValue$1(variables, args) {
75256
75256
 
75257
75257
  if (!args.length) {
75258
75258
  return variables.assign({
@@ -75261,7 +75261,7 @@
75261
75261
  }
75262
75262
 
75263
75263
  if (args[0].name === 'Name') {
75264
- args = extractNamedArgs(args, [ 'm', 'key' ]);
75264
+ args = extractNamedArgs$1(args, [ 'm', 'key' ]);
75265
75265
  }
75266
75266
 
75267
75267
  if (args.length !== 2) {
@@ -75287,13 +75287,13 @@
75287
75287
  }
75288
75288
 
75289
75289
  return variables.assign({
75290
- value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
75290
+ value: [ normalizeContextKey$1(keyValue), keyValue ].reduce((value, keyValue) => {
75291
75291
  return contextValue.get(keyValue) || value;
75292
75292
  }, null)
75293
75293
  });
75294
75294
  }
75295
75295
 
75296
- function extractNamedArgs(args, argNames) {
75296
+ function extractNamedArgs$1(args, argNames) {
75297
75297
 
75298
75298
  const context = {};
75299
75299
 
@@ -75306,11 +75306,11 @@
75306
75306
  return argNames.map(name => context[name]);
75307
75307
  }
75308
75308
 
75309
- function last(arr) {
75309
+ function last$1(arr) {
75310
75310
  return arr[arr.length - 1];
75311
75311
  }
75312
75312
 
75313
- const feelHighlighting = styleTags({
75313
+ const feelHighlighting$1 = styleTags({
75314
75314
  StringLiteral: tags.string,
75315
75315
  NumericLiteral: tags.number,
75316
75316
  BooleanLiteral: tags.bool,
@@ -75343,29 +75343,29 @@
75343
75343
  });
75344
75344
 
75345
75345
  // This file was generated by lezer-generator. You probably shouldn't edit it.
75346
- const spec_identifier = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:56, or:60, and:64, between:72, instance:86, of:89, days:101, time:103, duration:105, years:107, months:109, date:111, list:117, context:123, function:130, null:156, true:330, false:330, "?":170, external:186, not:211};
75347
- const parser$2 = LRParser.deserialize({
75346
+ const spec_identifier$1 = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:56, or:60, and:64, between:72, instance:86, of:89, days:101, time:103, duration:105, years:107, months:109, date:111, list:117, context:123, function:130, null:156, true:330, false:330, "?":170, external:186, not:211};
75347
+ const parser$3 = LRParser.deserialize({
75348
75348
  version: 14,
75349
75349
  states: "C|O`QYOOO`QYOOO$sQYOOOOQU'#Ce'#CeO$}QYO'#C`O&WQYO'#FQOOQQ'#Ff'#FfO&bQYO'#FfO`QYO'#DVOOQU'#En'#EnO(UQ^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fn'#FnO*RQWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO*WOWO'#ESO*RQWO'#EQOOQQ'#EQ'#EQOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fy'#FyOOQQ'#EU'#EUO`QYO'#EWOOQQ'#FS'#FSO*]Q^O'#FSO,SQYO'#EXO,ZQWO'#EYOOQP'#F}'#F}O,`QXO'#EaOOQQ'#Fz'#FzOOQQ'#FR'#FRQOQWOOOOQQ'#FT'#FTOOQQ'#F^'#F^O`QYO'#CoOOQQ'#F_'#F_O$}QYO'#CsO,kQYO'#DwOOQQ'#Fs'#FsO,pQYO'#EROOQO'#ER'#ERO`QYO'#EVO`QYO'#EUOOQO'#F{'#F{Q,xQWOOO,}QYO'#DRO-tQWO'#FbOOQO'#DT'#DTO.PQYO'#FfO.WQWOOO.}QYO'#CdO/[QYO'#FVOOQQ'#Cc'#CcO/aQYO'#FUOOQQ'#Cb'#CbO/iQYO,58zO`QYO,59iOOQQ'#Fc'#FcOOQQ'#Fd'#FdOOQQ'#Fe'#FeO`QYO,59q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R&V%mT&Z%n&t!a!eT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!a!gT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!m^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zQ!q^R!scR#z!pQ!wlR#{!p!mfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#Oo",
75352
75352
  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 BacktickIdentifier 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",
75353
75353
  maxTerm: 173,
75354
- context: variableTracker,
75354
+ context: variableTracker$1,
75355
75355
  nodeProps: [
75356
75356
  ["group", -17,4,19,23,29,31,33,41,42,68,70,72,85,86,88,89,90,97,"Expr",47,"Expr Expr",-5,78,79,80,81,82,"Expr Literal"],
75357
75357
  ["closedBy", 38,")",71,"]",96,"}"],
75358
75358
  ["openedBy", 40,"(",69,"[",95,"{"]
75359
75359
  ],
75360
- propSources: [feelHighlighting],
75360
+ propSources: [feelHighlighting$1],
75361
75361
  skippedNodes: [0,1,2],
75362
75362
  repeatNodeCount: 14,
75363
75363
  tokenData: ".Z~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx&fxy&kyz&pz{&u{|'S|}'X}!O'^!O!P'k!P!Q(u!Q![*p![!]+X!]!^+^!^!_+c!_!`$i!`!a+r!b!c+|!}#O,R#P#Q,W#Q#R&}#S#T,]#o#p.P#q#r.U$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#r~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#s~~$fP!_!`$i~$nOr~~$sW$j~OY$nZr$nrs%]s#O$n#O#P%b#P;'S$n;'S;=`&`<%lO$n~%bO$j~~%eRO;'S$n;'S;=`%n;=`O$n~%sX$j~OY$nZr$nrs%]s#O$n#O#P%b#P;'S$n;'S;=`&`;=`<%l$n<%lO$n~&cP;=`<%l$n~&kO#{~~&pOv~~&uOx~~&zP^~z{&}~'SO_~~'XO[~~'^O$O~R'cPZP!`!a'fQ'kO$_Q~'pQ#z~!O!P'v!Q!['{~'{O#}~~(QR$i~!Q!['{!g!h(Z#X#Y(Z~(^R{|(g}!O(g!Q![(m~(jP!Q![(m~(rP$i~!Q![(m~(zQ]~z{)Q!P!Q*X~)TTOz)Qz{)d{;'S)Q;'S;=`*R<%lO)Q~)gVOz)Qz{)d{!P)Q!P!Q)|!Q;'S)Q;'S;=`*R<%lO)Q~*ROQ~~*UP;=`<%l)Q~*^SP~OY*XZ;'S*X;'S;=`*j<%lO*X~*mP;=`<%l*X~*uS$i~!O!P+R!Q![*p!g!h(Z#X#Y(Z~+UP!Q!['{~+^O$]~~+cO$s~R+jP!]QsP!_!`+mP+rOsPR+yP!YQsP!_!`+m~,RO$l~~,WO!i~~,]O!g~~,`WOY,]Z#O,]#O#P,x#P#S,]#S#T-t#T;'S,];'S;=`-y<%lO,]~,{RO;'S,];'S;=`-U;=`O,]~-XXOY,]Z#O,]#O#P,x#P#S,]#S#T-t#T;'S,];'S;=`-y;=`<%l,]<%lO,]~-yO$Z~~-|P;=`<%l,]~.UO#S~~.ZO#R~",
75364
- tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
75364
+ tokenizers: [propertyIdentifiers$1, identifiers$1, insertSemicolon$1, 0, 1],
75365
75365
  topRules: {"Expression":[0,3],"Expressions":[1,102],"UnaryTests":[2,103]},
75366
75366
  dialects: {camunda: 2544},
75367
75367
  dynamicPrecedences: {"31":-1,"68":1,"72":-1,"74":-1},
75368
- specialized: [{term: 122, get: (value) => spec_identifier[value] || -1}],
75368
+ specialized: [{term: 122, get: (value) => spec_identifier$1[value] || -1}],
75369
75369
  tokenPrec: 2546
75370
75370
  });
75371
75371
 
@@ -96442,7 +96442,7 @@
96442
96442
  Paragraph: tags.content
96443
96443
  });
96444
96444
  /// The default CommonMark parser.
96445
- const parser$1 = 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), []);
96445
+ 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), []);
96446
96446
  /// Extension providing
96447
96447
  /// [Pandoc-style](https://pandoc.org/MANUAL.html#superscripts-and-subscripts)
96448
96448
  /// superscript using `^` markers.
@@ -96471,7 +96471,7 @@
96471
96471
  * @param {Tree} syntaxTree
96472
96472
  * @returns {LintMessage[]} array of syntax errors
96473
96473
  */
96474
- function lintSyntax(syntaxTree) {
96474
+ function lintSyntax$1(syntaxTree) {
96475
96475
 
96476
96476
  const lintMessages = [];
96477
96477
 
@@ -96484,7 +96484,7 @@
96484
96484
  }
96485
96485
 
96486
96486
  const parent = node.parent;
96487
- const next = getNextNode(node);
96487
+ const next = getNextNode$1(node);
96488
96488
 
96489
96489
  const message = {
96490
96490
  from: node.from,
@@ -96510,12 +96510,12 @@
96510
96510
  return lintMessages;
96511
96511
  }
96512
96512
 
96513
- function getNextNode(node) {
96513
+ function getNextNode$1(node) {
96514
96514
  if (!node) {
96515
96515
  return null;
96516
96516
  }
96517
96517
 
96518
- return node.nextSibling || getNextNode(node.parent);
96518
+ return node.nextSibling || getNextNode$1(node.parent);
96519
96519
  }
96520
96520
 
96521
96521
  /**
@@ -96525,9 +96525,9 @@
96525
96525
  * @property {(from: number, to: number, content: string) => void} updateContent
96526
96526
  */
96527
96527
 
96528
- const RULE_NAME = 'first-item';
96528
+ const RULE_NAME$1 = 'first-item';
96529
96529
 
96530
- var firstItem = {
96530
+ var firstItem$1 = {
96531
96531
  create(/** @type {Context} */ context) {
96532
96532
  return {
96533
96533
  enter(node) {
@@ -96537,7 +96537,7 @@
96537
96537
 
96538
96538
  const content = context.readContent(node.from, node.to);
96539
96539
 
96540
- if (zeroIndexPattern().test(content)) {
96540
+ if (zeroIndexPattern$1().test(content)) {
96541
96541
  const {
96542
96542
  from,
96543
96543
  to
@@ -96548,12 +96548,12 @@
96548
96548
  to,
96549
96549
  message: 'First item is accessed via [1]',
96550
96550
  severity: 'warning',
96551
- type: RULE_NAME,
96551
+ type: RULE_NAME$1,
96552
96552
  actions: [
96553
96553
  {
96554
96554
  name: 'fix',
96555
96555
  apply(_, start = from, end = to) {
96556
- context.updateContent(start, end, content.replace(zeroIndexPattern(), '[1]'));
96556
+ context.updateContent(start, end, content.replace(zeroIndexPattern$1(), '[1]'));
96557
96557
  }
96558
96558
  }
96559
96559
  ]
@@ -96564,7 +96564,7 @@
96564
96564
  }
96565
96565
  };
96566
96566
 
96567
- function zeroIndexPattern() {
96567
+ function zeroIndexPattern$1() {
96568
96568
  return /\[\s*0\s*\]$/;
96569
96569
  }
96570
96570
 
@@ -96574,8 +96574,8 @@
96574
96574
  * @typedef {import('./index').LintAllContext} LintAllContext
96575
96575
  */
96576
96576
 
96577
- const RULES = [
96578
- firstItem
96577
+ const RULES$1 = [
96578
+ firstItem$1
96579
96579
  ];
96580
96580
 
96581
96581
  /**
@@ -96584,7 +96584,7 @@
96584
96584
  * @param {LintAllContext} context
96585
96585
  * @returns {LintMessage[]} array of syntax errors
96586
96586
  */
96587
- function lintRules(context) {
96587
+ function lintRules$1(context) {
96588
96588
  const {
96589
96589
  readContent,
96590
96590
  syntaxTree,
@@ -96601,7 +96601,7 @@
96601
96601
  updateContent
96602
96602
  };
96603
96603
 
96604
- const rules = RULES.map(rule => rule.create(ruleContext));
96604
+ const rules = RULES$1.map(rule => rule.create(ruleContext));
96605
96605
 
96606
96606
  syntaxTree.iterate({
96607
96607
  enter: ref => {
@@ -96637,11 +96637,11 @@
96637
96637
  * @param {LintAllContext} context
96638
96638
  * @returns {LintMessage[]} array of all lint messages
96639
96639
  */
96640
- function lintAll$1(context) {
96640
+ function lintAll$2(context) {
96641
96641
 
96642
96642
  const lintMessages = [
96643
- ...lintSyntax(context.syntaxTree),
96644
- ...lintRules(context)
96643
+ ...lintSyntax$1(context.syntaxTree),
96644
+ ...lintRules$1(context)
96645
96645
  ];
96646
96646
 
96647
96647
  return lintMessages;
@@ -96652,7 +96652,7 @@
96652
96652
  *
96653
96653
  * @returns {import('@codemirror/lint').LintSource} CodeMirror linting source
96654
96654
  */
96655
- const cmFeelLinter = () => editorView => {
96655
+ const cmFeelLinter$1 = () => editorView => {
96656
96656
 
96657
96657
  // don't lint if the Editor is empty
96658
96658
  if (editorView.state.doc.length === 0) {
@@ -96661,7 +96661,7 @@
96661
96661
 
96662
96662
  const tree = syntaxTree(editorView.state);
96663
96663
 
96664
- const messages = lintAll$1({
96664
+ const messages = lintAll$2({
96665
96665
  syntaxTree: tree,
96666
96666
  readContent: (from, to) => editorView.state.sliceDoc(from, to),
96667
96667
  updateContent: (from, to, content) => editorView.dispatch({
@@ -97141,7 +97141,7 @@
97141
97141
  });
97142
97142
 
97143
97143
  // This file was generated by lezer-generator. You probably shouldn't edit it.
97144
- const parser = LRParser.deserialize({
97144
+ const parser$1 = LRParser.deserialize({
97145
97145
  version: 14,
97146
97146
  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",
97147
97147
  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",
@@ -97163,12 +97163,12 @@
97163
97163
  };
97164
97164
 
97165
97165
  function createMixedLanguage(hostLanguage = null) {
97166
- const _mixedParser = parser.configure({
97166
+ const _mixedParser = parser$1.configure({
97167
97167
 
97168
97168
  wrap: parseMixed(node => {
97169
97169
 
97170
97170
  if (node.name == 'Feel' || node.name == 'FeelBlock') {
97171
- return { parser: parser$2 };
97171
+ return { parser: parser$3 };
97172
97172
  }
97173
97173
 
97174
97174
  if (hostLanguage && node.name == 'SimpleTextBlock') {
@@ -97223,7 +97223,7 @@
97223
97223
  * @param {Tree} syntaxTree
97224
97224
  * @returns {LintMessage[]} array of all lint messages
97225
97225
  */
97226
- function lintAll(syntaxTree) {
97226
+ function lintAll$1(syntaxTree) {
97227
97227
 
97228
97228
  const lintMessages = [
97229
97229
 
@@ -97241,7 +97241,7 @@
97241
97241
  * @returns {Source} CodeMirror linting source
97242
97242
  */
97243
97243
  function cmFeelersLinter() {
97244
- const lintFeel = cmFeelLinter();
97244
+ const lintFeel = cmFeelLinter$1();
97245
97245
  return editorView => {
97246
97246
 
97247
97247
  const feelMessages = lintFeel(editorView);
@@ -97253,7 +97253,7 @@
97253
97253
 
97254
97254
  const tree = syntaxTree(editorView.state);
97255
97255
 
97256
- const feelersMessages = lintAll(tree);
97256
+ const feelersMessages = lintAll$1(tree);
97257
97257
 
97258
97258
  return [
97259
97259
  ...feelMessages,
@@ -97347,7 +97347,7 @@
97347
97347
  const _getHostLanguageParser = (hostLanguage) => {
97348
97348
  switch (hostLanguage) {
97349
97349
  case 'markdown':
97350
- return parser$1;
97350
+ return parser$2;
97351
97351
  default:
97352
97352
  return null;
97353
97353
  }
@@ -97445,6 +97445,1538 @@
97445
97445
  return this._cmEditor.state.selection;
97446
97446
  };
97447
97447
 
97448
+ // This file was generated by lezer-generator. You probably shouldn't edit it.
97449
+ const propertyIdentifier = 121,
97450
+ identifier = 122,
97451
+ nameIdentifier = 123,
97452
+ insertSemi = 124,
97453
+ expression0 = 128,
97454
+ ForExpression = 4,
97455
+ forExpressionStart = 131,
97456
+ ForInExpression = 7,
97457
+ Name = 8,
97458
+ Identifier = 9,
97459
+ AdditionalIdentifier = 10,
97460
+ forExpressionBodyStart = 139,
97461
+ IfExpression = 19,
97462
+ ifExpressionStart = 140,
97463
+ QuantifiedExpression = 23,
97464
+ quantifiedExpressionStart = 141,
97465
+ QuantifiedInExpression = 27,
97466
+ PositiveUnaryTest = 37,
97467
+ ArithmeticExpression = 41,
97468
+ arithmeticPlusStart = 145,
97469
+ arithmeticTimesStart = 146,
97470
+ arithmeticExpStart = 147,
97471
+ arithmeticUnaryStart = 148,
97472
+ VariableName = 47,
97473
+ PathExpression = 68,
97474
+ pathExpressionStart = 154,
97475
+ FilterExpression = 70,
97476
+ filterExpressionStart = 155,
97477
+ FunctionInvocation = 72,
97478
+ functionInvocationStart = 156,
97479
+ ParameterName = 76,
97480
+ nil = 161,
97481
+ NumericLiteral = 79,
97482
+ StringLiteral = 80,
97483
+ BooleanLiteral = 81,
97484
+ listStart = 168,
97485
+ List = 89,
97486
+ FunctionDefinition = 90,
97487
+ functionDefinitionStart = 170,
97488
+ Context = 97,
97489
+ contextStart = 172,
97490
+ ContextEntry = 98,
97491
+ PropertyName = 100,
97492
+ PropertyIdentifier = 101;
97493
+
97494
+ /* global console,process */
97495
+
97496
+
97497
+ // @ts-expect-error env access
97498
+ const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
97499
+
97500
+ // @ts-expect-error env access
97501
+ const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
97502
+
97503
+ // @ts-expect-error env access
97504
+ const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
97505
+
97506
+ const spaceChars = [
97507
+ 9, 11, 12, 32, 133, 160,
97508
+ 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
97509
+ 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
97510
+ ];
97511
+
97512
+ const newlineChars = chars('\n\r');
97513
+
97514
+ const asterix = '*'.charCodeAt(0);
97515
+
97516
+ const additionalNameChars = chars("'./-+*^");
97517
+
97518
+ /**
97519
+ * @typedef { VariableContext | any } ContextValue
97520
+ */
97521
+
97522
+ /**
97523
+ * @param { string } str
97524
+ * @return { number[] }
97525
+ */
97526
+ function chars(str) {
97527
+ return Array.from(str).map(s => s.charCodeAt(0));
97528
+ }
97529
+
97530
+ /**
97531
+ * @param { number } ch
97532
+ * @return { boolean }
97533
+ */
97534
+ function isStartChar(ch) {
97535
+ return (
97536
+ ch === 63 // ?
97537
+ ) || (
97538
+ ch >= 65 && ch <= 90 // A-Z
97539
+ ) || (
97540
+ ch === 95 // _
97541
+ ) || (
97542
+ ch >= 97 && ch <= 122 // a-z
97543
+ ) || (
97544
+ ch >= 0xC0 && ch <= 0xD6
97545
+ ) || (
97546
+ ch >= 0xD8 && ch <= 0xF6
97547
+ ) || (
97548
+ ch >= 0xF8 && ch <= 0x2FF
97549
+ ) || (
97550
+ ch >= 0x370 && ch <= 0x37D
97551
+ ) || (
97552
+ ch >= 0x37F && ch <= 0x1FFF
97553
+ ) || (
97554
+ ch >= 0x200C && ch <= 0x200D
97555
+ ) || (
97556
+ ch >= 0x2070 && ch <= 0x218F
97557
+ ) || (
97558
+ ch >= 0x2C00 && ch <= 0x2FEF
97559
+ ) || (
97560
+ ch >= 0x3001 && ch <= 0xD7FF
97561
+ ) || (
97562
+ ch >= 0xF900 && ch <= 0xFDCF
97563
+ ) || (
97564
+ ch >= 0xFDF0 && ch <= 0xFFFD
97565
+ ) || (
97566
+ ch >= 0xD800 && ch <= 0xDBFF // upper surrogate
97567
+ ) || (
97568
+ ch >= 0xDC00 && ch <= 0xDFFF // lower surrogate
97569
+ );
97570
+ }
97571
+
97572
+ /**
97573
+ * @param { number } ch
97574
+ * @return { boolean }
97575
+ */
97576
+ function isAdditional(ch) {
97577
+ return additionalNameChars.includes(ch);
97578
+ }
97579
+
97580
+ /**
97581
+ * @param { number } ch
97582
+ * @return { boolean }
97583
+ */
97584
+ function isPartChar(ch) {
97585
+ return (
97586
+ ch >= 48 && ch <= 57 // 0-9
97587
+ ) || (
97588
+ ch === 0xB7
97589
+ ) || (
97590
+ ch >= 0x0300 && ch <= 0x036F
97591
+ ) || (
97592
+ ch >= 0x203F && ch <= 0x2040
97593
+ );
97594
+ }
97595
+
97596
+ /**
97597
+ * @param { number } ch
97598
+ * @return { boolean }
97599
+ */
97600
+ function isSpace(ch) {
97601
+ return spaceChars.includes(ch);
97602
+ }
97603
+
97604
+ function indent(str, spaces) {
97605
+ return spaces.concat(
97606
+ str.split(/\n/g).join('\n' + spaces)
97607
+ );
97608
+ }
97609
+
97610
+ /**
97611
+ * @param { import('@lezer/lr').InputStream } input
97612
+ * @param { number } [offset]
97613
+ *
97614
+ * @return { { token: string, offset: number } | null }
97615
+ */
97616
+ function parseAdditionalSymbol(input, offset = 0) {
97617
+
97618
+ const next = input.peek(offset);
97619
+
97620
+ if (next === asterix && input.peek(offset + 1) === asterix) {
97621
+
97622
+ return {
97623
+ offset: 2,
97624
+ token: '**'
97625
+ };
97626
+ }
97627
+
97628
+ if (isAdditional(next)) {
97629
+ return {
97630
+ offset: 1,
97631
+ token: String.fromCharCode(next)
97632
+ };
97633
+ }
97634
+
97635
+ return null;
97636
+ }
97637
+
97638
+ /**
97639
+ * @param { import('@lezer/lr').InputStream } input
97640
+ * @param { number } [offset]
97641
+ * @param { boolean } [namePart]
97642
+ *
97643
+ * @return { { token: string, offset: number } | null }
97644
+ */
97645
+ function parseIdentifier(input, offset = 0, namePart = false) {
97646
+ for (let inside = false, chars = [], i = 0;; i++) {
97647
+ const next = input.peek(offset + i);
97648
+
97649
+ if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
97650
+ if (!inside) {
97651
+ inside = true;
97652
+ }
97653
+
97654
+ chars.push(next);
97655
+ } else {
97656
+
97657
+ if (chars.length) {
97658
+ return {
97659
+ token: String.fromCharCode(...chars),
97660
+ offset: i
97661
+ };
97662
+ }
97663
+
97664
+ return null;
97665
+ }
97666
+ }
97667
+ }
97668
+
97669
+ /**
97670
+ * @param { import('@lezer/lr').InputStream } input
97671
+ * @param { number } offset
97672
+ *
97673
+ * @return { { token: string, offset: number } | null }
97674
+ */
97675
+ function parseSpaces(input, offset) {
97676
+
97677
+ for (let inside = false, i = 0;; i++) {
97678
+ let next = input.peek(offset + i);
97679
+
97680
+ if (isSpace(next)) {
97681
+ if (!inside) {
97682
+ inside = true;
97683
+ }
97684
+ } else {
97685
+ if (inside) {
97686
+ return {
97687
+ token: ' ',
97688
+ offset: i
97689
+ };
97690
+ }
97691
+
97692
+ return null;
97693
+ }
97694
+ }
97695
+ }
97696
+
97697
+ /**
97698
+ * Parse a name from the input and return the first match, if any.
97699
+ *
97700
+ * @param { import('@lezer/lr').InputStream } input
97701
+ * @param { Variables } variables
97702
+ *
97703
+ * @return { { token: string, offset: number, term: number } | null }
97704
+ */
97705
+ function parseName(input, variables) {
97706
+ const contextKeys = variables.contextKeys();
97707
+
97708
+ const start = variables.tokens;
97709
+
97710
+ for (let i = 0, tokens = [], nextMatch = null;;) {
97711
+
97712
+ const namePart = (start.length + tokens.length) > 0;
97713
+ const maybeSpace = tokens.length > 0;
97714
+
97715
+ const match = (
97716
+ parseIdentifier(input, i, namePart) ||
97717
+ namePart && parseAdditionalSymbol(input, i) ||
97718
+ maybeSpace && parseSpaces(input, i)
97719
+ );
97720
+
97721
+ // match is required
97722
+ if (!match) {
97723
+ return nextMatch;
97724
+ }
97725
+
97726
+ const {
97727
+ token,
97728
+ offset
97729
+ } = match;
97730
+
97731
+ i += offset;
97732
+
97733
+ if (token === ' ') {
97734
+ continue;
97735
+ }
97736
+
97737
+ tokens = [ ...tokens, token ];
97738
+
97739
+ const name = [ ...start, ...tokens ].join(' ');
97740
+
97741
+ if (contextKeys.some(el => el === name)) {
97742
+ const token = tokens[0];
97743
+
97744
+ nextMatch = {
97745
+ token,
97746
+ offset: token.length,
97747
+ term: nameIdentifier
97748
+ };
97749
+ }
97750
+
97751
+ if (contextKeys.some(el => el.startsWith(name))) {
97752
+ continue;
97753
+ }
97754
+
97755
+ if (dateTimeIdentifiers.some(el => el === name)) {
97756
+ const token = tokens[0];
97757
+
97758
+ // parse date time identifiers as normal
97759
+ // identifiers to allow specialization to kick in
97760
+ //
97761
+ // cf. https://github.com/nikku/lezer-feel/issues/8
97762
+ nextMatch = {
97763
+ token,
97764
+ offset: token.length,
97765
+ term: identifier
97766
+ };
97767
+ }
97768
+
97769
+ if (dateTimeIdentifiers.some(el => el.startsWith(name))) {
97770
+ continue;
97771
+ }
97772
+
97773
+ return nextMatch;
97774
+ }
97775
+
97776
+ }
97777
+
97778
+ const identifiersMap = {
97779
+ [ identifier ]: 'identifier',
97780
+ [ nameIdentifier ]: 'nameIdentifier'
97781
+ };
97782
+
97783
+ const identifiers = new ExternalTokenizer((input, stack) => {
97784
+
97785
+ LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
97786
+
97787
+ const nameMatch = parseName(input, stack.context);
97788
+
97789
+ const start = stack.context.tokens;
97790
+
97791
+ const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
97792
+
97793
+ if (match) {
97794
+ input.advance(match.offset);
97795
+ input.acceptToken(nameMatch ? nameMatch.term : identifier);
97796
+
97797
+ LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
97798
+ }
97799
+ }, { contextual: true });
97800
+
97801
+
97802
+ const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
97803
+
97804
+ LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
97805
+
97806
+ const start = stack.context.tokens;
97807
+
97808
+ const match = parseIdentifier(input, 0, start.length > 0);
97809
+
97810
+ if (match) {
97811
+ input.advance(match.offset);
97812
+ input.acceptToken(propertyIdentifier);
97813
+
97814
+ LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
97815
+ }
97816
+ });
97817
+
97818
+
97819
+ const insertSemicolon = new ExternalTokenizer((input, stack) => {
97820
+
97821
+ LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
97822
+
97823
+ let offset;
97824
+ let insert = false;
97825
+
97826
+ for (offset = 0;; offset++) {
97827
+ const char = input.peek(offset);
97828
+
97829
+ if (spaceChars.includes(char)) {
97830
+ continue;
97831
+ }
97832
+
97833
+ if (newlineChars.includes(char)) {
97834
+ insert = true;
97835
+ }
97836
+
97837
+ break;
97838
+ }
97839
+
97840
+ if (insert) {
97841
+
97842
+ const identifier = parseIdentifier(input, offset + 1);
97843
+ const spaces = parseSpaces(input, offset + 1);
97844
+
97845
+ if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
97846
+ return;
97847
+ }
97848
+
97849
+ LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
97850
+ input.acceptToken(insertSemi);
97851
+ }
97852
+ });
97853
+
97854
+ const prefixedContextStarts = {
97855
+ [ functionInvocationStart ]: 'FunctionInvocation',
97856
+ [ filterExpressionStart ]: 'FilterExpression',
97857
+ [ pathExpressionStart ]: 'PathExpression'
97858
+ };
97859
+
97860
+ const contextStarts = {
97861
+ [ contextStart ]: 'Context',
97862
+ [ functionDefinitionStart ]: 'FunctionDefinition',
97863
+ [ forExpressionStart ]: 'ForExpression',
97864
+ [ listStart ]: 'List',
97865
+ [ ifExpressionStart ]: 'IfExpression',
97866
+ [ quantifiedExpressionStart ]: 'QuantifiedExpression'
97867
+ };
97868
+
97869
+ const contextEnds = {
97870
+ [ Context ]: 'Context',
97871
+ [ FunctionDefinition ]: 'FunctionDefinition',
97872
+ [ ForExpression ]: 'ForExpression',
97873
+ [ List ]: 'List',
97874
+ [ IfExpression ]: 'IfExpression',
97875
+ [ QuantifiedExpression ]: 'QuantifiedExpression',
97876
+ [ PathExpression ]: 'PathExpression',
97877
+ [ FunctionInvocation ]: 'FunctionInvocation',
97878
+ [ FilterExpression ]: 'FilterExpression',
97879
+ [ ArithmeticExpression ]: 'ArithmeticExpression'
97880
+ };
97881
+
97882
+ /**
97883
+ * A simple producer that retrievs a value from
97884
+ * a given context. Used to lazily take things.
97885
+ */
97886
+ class ValueProducer {
97887
+
97888
+ /**
97889
+ * @param { Function } fn
97890
+ */
97891
+ constructor(fn) {
97892
+ this.fn = fn;
97893
+ }
97894
+
97895
+ get(variables) {
97896
+ return this.fn(variables);
97897
+ }
97898
+
97899
+ /**
97900
+ * @param { Function } fn
97901
+ *
97902
+ * @return { ValueProducer }
97903
+ */
97904
+ static of(fn) {
97905
+ return new ValueProducer(fn);
97906
+ }
97907
+
97908
+ }
97909
+
97910
+ const dateTimeLiterals = {
97911
+ 'date and time': 1,
97912
+ 'date': 1,
97913
+ 'time': 1,
97914
+ 'duration': 1
97915
+ };
97916
+
97917
+ const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
97918
+
97919
+
97920
+ /**
97921
+ * A basic key-value store to hold context values.
97922
+ */
97923
+ class VariableContext {
97924
+
97925
+ /**
97926
+ * Creates a new context from a JavaScript object.
97927
+ *
97928
+ * @param {any} [value]
97929
+ */
97930
+ constructor(value = {}) {
97931
+
97932
+ /**
97933
+ * @protected
97934
+ */
97935
+ this.value = value;
97936
+ }
97937
+
97938
+ /**
97939
+ * Return all defined keys of the context.
97940
+ *
97941
+ * @returns {Array<string>} the keys of the context
97942
+ */
97943
+ getKeys() {
97944
+ return Object.keys(this.value);
97945
+ }
97946
+
97947
+ /**
97948
+ * Returns the value of the given key.
97949
+ *
97950
+ * If the value represents a context itself, it should be wrapped in a
97951
+ * context class.
97952
+ *
97953
+ * @param {String} key
97954
+ * @returns {VariableContext|ValueProducer|null}
97955
+ */
97956
+ get(key) {
97957
+ const result = this.value[key];
97958
+
97959
+ const constructor = /** @type { typeof VariableContext } */ (this.constructor);
97960
+
97961
+ if (constructor.isAtomic(result)) {
97962
+ return result;
97963
+ }
97964
+
97965
+ return constructor.of(result);
97966
+ }
97967
+
97968
+ /**
97969
+ * Creates a new context with the given key added.
97970
+ *
97971
+ * @param {String} key
97972
+ * @param {any} value
97973
+ *
97974
+ * @returns {VariableContext} new context with the given key added
97975
+ */
97976
+ set(key, value) {
97977
+
97978
+ const constructor = /** @type { typeof VariableContext } */ (this.constructor);
97979
+
97980
+ return constructor.of({
97981
+ ...this.value,
97982
+ [key]: value
97983
+ });
97984
+ }
97985
+
97986
+ /**
97987
+ * Non-destructively merge another context into this one,
97988
+ * and return the result.
97989
+ *
97990
+ * @param {ContextValue} other
97991
+ *
97992
+ * @return {VariableContext}
97993
+ */
97994
+ merge(other) {
97995
+ const constructor = /** @type { typeof VariableContext } */ (this.constructor);
97996
+
97997
+ return new constructor(
97998
+ constructor.__merge(this.value, other)
97999
+ );
98000
+ }
98001
+
98002
+ /**
98003
+ * Wether the given value is atomic. Non-atomic values need to be wrapped in a
98004
+ * context Class.
98005
+ *
98006
+ * @param {any} value
98007
+ * @returns {Boolean}
98008
+ */
98009
+ static isAtomic(value) {
98010
+ return !value ||
98011
+ value instanceof this ||
98012
+ value instanceof ValueProducer ||
98013
+ typeof value !== 'object';
98014
+ }
98015
+
98016
+ /**
98017
+ * Takes any number of Contexts and merges them into a single context.
98018
+ *
98019
+ * @param { ...VariableContext } contexts
98020
+ * @returns { VariableContext }
98021
+ */
98022
+ static of(...contexts) {
98023
+ return contexts.reduce((context, otherContext) => {
98024
+ return context.merge(otherContext);
98025
+ }, new this({}));
98026
+ }
98027
+
98028
+ /**
98029
+ * Returns the raw representation of the given context.
98030
+ *
98031
+ * @param {VariableContext | any} context
98032
+ *
98033
+ * @return {any}
98034
+ */
98035
+ static __unwrap(context) {
98036
+ if (!context) {
98037
+ return {};
98038
+ }
98039
+
98040
+ if (context instanceof this) {
98041
+ return context.value;
98042
+ }
98043
+
98044
+ if (typeof context !== 'object') {
98045
+ return {};
98046
+ }
98047
+
98048
+ return { ...context };
98049
+ }
98050
+
98051
+ /**
98052
+ * Non-destructively merges two contexts (or their values)
98053
+ * with each other, returning the result.
98054
+ *
98055
+ * @param {ContextValue} context
98056
+ * @param {ContextValue} other
98057
+ *
98058
+ * @return {any}
98059
+ */
98060
+ static __merge(context, other) {
98061
+
98062
+ return reduce(this.__unwrap(other), (merged, value, key) => {
98063
+ if (value instanceof ValueProducer) {
98064
+
98065
+ // keep value producers in tact
98066
+ return {
98067
+ ...merged,
98068
+ [key]: value
98069
+ };
98070
+ }
98071
+
98072
+ value = this.__unwrap(value);
98073
+
98074
+ if (has$2(merged, key)) {
98075
+ value = this.__merge(this.__unwrap(merged[key]), value);
98076
+ }
98077
+
98078
+ return {
98079
+ ...merged,
98080
+ [key]: value
98081
+ };
98082
+ }, this.__unwrap(context));
98083
+ }
98084
+
98085
+ }
98086
+
98087
+ class Variables {
98088
+
98089
+ /**
98090
+ * @param { {
98091
+ * name?: string,
98092
+ * tokens?: string[],
98093
+ * children?: Variables[],
98094
+ * parent: Variables | null
98095
+ * context: VariableContext,
98096
+ * value?: any,
98097
+ * raw?: any
98098
+ * } } options
98099
+ */
98100
+ constructor({
98101
+ name = 'Expressions',
98102
+ tokens = [],
98103
+ children = [],
98104
+ parent = null,
98105
+ context,
98106
+ value,
98107
+ raw
98108
+ }) {
98109
+ this.name = name;
98110
+ this.tokens = tokens;
98111
+ this.children = children;
98112
+ this.parent = parent;
98113
+ this.context = context;
98114
+ this.value = value;
98115
+ this.raw = raw;
98116
+ }
98117
+
98118
+ enterScope(name) {
98119
+
98120
+ const childScope = this.of({
98121
+ name,
98122
+ parent: this
98123
+ });
98124
+
98125
+ LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
98126
+
98127
+ return childScope;
98128
+ }
98129
+
98130
+ exitScope(str) {
98131
+
98132
+ if (!this.parent) {
98133
+ LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
98134
+
98135
+ return this;
98136
+ }
98137
+
98138
+ LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
98139
+
98140
+ return this.parent.pushChild(this);
98141
+ }
98142
+
98143
+ token(part) {
98144
+
98145
+ LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
98146
+
98147
+ return this.assign({
98148
+ tokens: [ ...this.tokens, part ]
98149
+ });
98150
+ }
98151
+
98152
+ literal(value) {
98153
+
98154
+ LOG_VARS && console.log('[%s] literal %o', this.path, value);
98155
+
98156
+ return this.pushChild(this.of({
98157
+ name: 'Literal',
98158
+ value
98159
+ }));
98160
+ }
98161
+
98162
+ /**
98163
+ * Return computed scope value
98164
+ *
98165
+ * @return {any}
98166
+ */
98167
+ computedValue() {
98168
+ for (let scope = this;;scope = last(scope.children)) {
98169
+
98170
+ if (!scope) {
98171
+ return null;
98172
+ }
98173
+
98174
+ if (scope.value) {
98175
+ return scope.value;
98176
+ }
98177
+ }
98178
+ }
98179
+
98180
+ contextKeys() {
98181
+ return this.context.getKeys().map(normalizeContextKey);
98182
+ }
98183
+
98184
+ get path() {
98185
+ return this.parent?.path?.concat(' > ', this.name) || this.name;
98186
+ }
98187
+
98188
+ /**
98189
+ * Return value of variable.
98190
+ *
98191
+ * @param { string } variable
98192
+ * @return { any } value
98193
+ */
98194
+ get(variable) {
98195
+
98196
+ const names = [ variable, variable && normalizeContextKey(variable) ];
98197
+
98198
+ const contextKey = this.context.getKeys().find(
98199
+ key => names.includes(normalizeContextKey(key))
98200
+ );
98201
+
98202
+ if (typeof contextKey === 'undefined') {
98203
+ return undefined;
98204
+ }
98205
+
98206
+ const val = this.context.get(contextKey);
98207
+
98208
+ if (val instanceof ValueProducer) {
98209
+ return val.get(this);
98210
+ } else {
98211
+ return val;
98212
+ }
98213
+ }
98214
+
98215
+ resolveName() {
98216
+
98217
+ const variable = this.tokens.join(' ');
98218
+ const tokens = [];
98219
+
98220
+ const parentScope = this.assign({
98221
+ tokens
98222
+ });
98223
+
98224
+ const variableScope = this.of({
98225
+ name: 'VariableName',
98226
+ parent: parentScope,
98227
+ value: this.get(variable),
98228
+ raw: variable
98229
+ });
98230
+
98231
+ LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
98232
+
98233
+ return parentScope.pushChild(variableScope);
98234
+ }
98235
+
98236
+ pushChild(child) {
98237
+
98238
+ if (!child) {
98239
+ return this;
98240
+ }
98241
+
98242
+ const parent = this.assign({
98243
+ children: [ ...this.children, child ]
98244
+ });
98245
+
98246
+ child.parent = parent;
98247
+
98248
+ return parent;
98249
+ }
98250
+
98251
+ pushChildren(children) {
98252
+
98253
+ /**
98254
+ * @type {Variables}
98255
+ */
98256
+ let parent = this;
98257
+
98258
+ for (const child of children) {
98259
+ parent = parent.pushChild(child);
98260
+ }
98261
+
98262
+ return parent;
98263
+ }
98264
+
98265
+ declareName() {
98266
+
98267
+ if (this.tokens.length === 0) {
98268
+ throw Error('no tokens to declare name');
98269
+ }
98270
+
98271
+ const variableName = this.tokens.join(' ');
98272
+
98273
+ LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
98274
+
98275
+ return this.assign({
98276
+ tokens: []
98277
+ }).pushChild(
98278
+ this.of({
98279
+ name: 'Name',
98280
+ value: variableName
98281
+ })
98282
+ );
98283
+ }
98284
+
98285
+ define(name, value) {
98286
+
98287
+ if (typeof name !== 'string') {
98288
+ LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
98289
+
98290
+ return this;
98291
+ }
98292
+
98293
+ LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
98294
+
98295
+ const context = this.context.set(name, value);
98296
+
98297
+ return this.assign({
98298
+ context
98299
+ });
98300
+ }
98301
+
98302
+ /**
98303
+ * @param { Record<string, any> } [options]
98304
+ *
98305
+ * @return { Variables }
98306
+ */
98307
+ assign(options = {}) {
98308
+
98309
+ return Variables.of({
98310
+ ...this,
98311
+ ...options
98312
+ });
98313
+ }
98314
+
98315
+ /**
98316
+ * @param { Record<string, any> } [options]
98317
+ *
98318
+ * @return { Variables }
98319
+ */
98320
+ of(options = {}) {
98321
+
98322
+ const defaultOptions = {
98323
+ context: this.context,
98324
+ parent: this.parent
98325
+ };
98326
+
98327
+ return Variables.of({
98328
+ ...defaultOptions,
98329
+ ...options
98330
+ });
98331
+ }
98332
+
98333
+ /**
98334
+ * @param { {
98335
+ * name?: string,
98336
+ * tokens?: string[],
98337
+ * children?: Variables[],
98338
+ * parent?: Variables | null
98339
+ * context: VariableContext,
98340
+ * value?: any,
98341
+ * raw?: any
98342
+ * } } options
98343
+ *
98344
+ * @return {Variables}
98345
+ */
98346
+ static of(options) {
98347
+
98348
+ const {
98349
+ name,
98350
+ tokens = [],
98351
+ children = [],
98352
+ parent = null,
98353
+ context,
98354
+ value,
98355
+ raw
98356
+ } = options;
98357
+
98358
+ if (!context) {
98359
+ throw new Error('must provide <context>');
98360
+ }
98361
+
98362
+ return new Variables({
98363
+ name,
98364
+ tokens: [ ...tokens ],
98365
+ children: [ ...children ],
98366
+ context,
98367
+ parent,
98368
+ value,
98369
+ raw
98370
+ });
98371
+ }
98372
+
98373
+ }
98374
+
98375
+ /**
98376
+ * @param { string } name
98377
+ *
98378
+ * @return { string } normalizedName
98379
+ */
98380
+ function normalizeContextKey(name) {
98381
+ return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
98382
+ }
98383
+
98384
+ /**
98385
+ * Wrap children of variables under the given named child.
98386
+ *
98387
+ * @param { Variables } variables
98388
+ * @param { string } scopeName
98389
+ * @param { string } code
98390
+ * @return { Variables }
98391
+ */
98392
+ function wrap(variables, scopeName, code) {
98393
+
98394
+ const parts = variables.children.filter(c => c.name !== scopeName);
98395
+ const children = variables.children.filter(c => c.name === scopeName);
98396
+
98397
+ const namePart = parts[0];
98398
+ const valuePart = parts[Math.max(1, parts.length - 1)];
98399
+
98400
+ const name = namePart?.computedValue();
98401
+ const value = valuePart?.computedValue() || null;
98402
+
98403
+ return variables
98404
+ .assign({
98405
+ children
98406
+ })
98407
+ .enterScope(scopeName)
98408
+ .pushChildren(parts)
98409
+ .exitScope(code)
98410
+ .define(name, value);
98411
+ }
98412
+
98413
+ /**
98414
+ * @param { ContextValue } [context]
98415
+ * @param { typeof VariableContext } [Context]
98416
+ *
98417
+ * @return { ContextTracker<Variables> }
98418
+ */
98419
+ function trackVariables(context = {}, Context = VariableContext) {
98420
+
98421
+ const start = Variables.of({
98422
+ context: Context.of(context)
98423
+ });
98424
+
98425
+ return new ContextTracker({
98426
+ start,
98427
+ reduce(variables, term, stack, input) {
98428
+
98429
+ if (term === IfExpression) {
98430
+ const [ thenPart, elsePart ] = variables.children.slice(-2);
98431
+
98432
+ variables = variables.assign({
98433
+ value: Context.of(
98434
+ thenPart?.computedValue(),
98435
+ elsePart?.computedValue()
98436
+ )
98437
+ });
98438
+ }
98439
+
98440
+ if (term === List) {
98441
+ variables = variables.assign({
98442
+ value: Context.of(
98443
+ ...variables.children.map(
98444
+ c => c?.computedValue()
98445
+ )
98446
+ )
98447
+ });
98448
+ }
98449
+
98450
+ if (term === FilterExpression) {
98451
+ const [ sourcePart, _ ] = variables.children.slice(-2);
98452
+
98453
+ variables = variables.assign({
98454
+ value: sourcePart?.computedValue()
98455
+ });
98456
+ }
98457
+
98458
+ if (term === FunctionInvocation) {
98459
+
98460
+ const [
98461
+ name,
98462
+ ...args
98463
+ ] = variables.children;
98464
+
98465
+ // preserve type information through `get value(context, key)` utility
98466
+ if (name?.raw === 'get value') {
98467
+ variables = getContextValue(variables, args);
98468
+ }
98469
+ }
98470
+
98471
+ const start = contextStarts[term];
98472
+
98473
+ if (start) {
98474
+ return variables.enterScope(start);
98475
+ }
98476
+
98477
+ const prefixedStart = prefixedContextStarts[term];
98478
+
98479
+ // pull <expression> into new <prefixedStart> context
98480
+ if (prefixedStart) {
98481
+
98482
+ const {
98483
+ children: currentChildren,
98484
+ context: currentContext,
98485
+ } = variables;
98486
+
98487
+ const children = currentChildren.slice(0, -1);
98488
+ const lastChild = last(currentChildren);
98489
+
98490
+ let newContext = null;
98491
+
98492
+ if (term === pathExpressionStart) {
98493
+ newContext = Context.of(lastChild?.computedValue());
98494
+ }
98495
+
98496
+ if (term === filterExpressionStart) {
98497
+ newContext = Context.of(
98498
+ currentContext,
98499
+ lastChild?.computedValue()
98500
+ ).set('item', lastChild?.computedValue());
98501
+ }
98502
+
98503
+ return variables
98504
+ .assign({ children })
98505
+ .enterScope(prefixedStart)
98506
+ .pushChild(lastChild)
98507
+ .assign({ context: newContext || currentContext });
98508
+ }
98509
+
98510
+ // @ts-expect-error internal method
98511
+ const code = input.read(input.pos, stack.pos);
98512
+
98513
+ const end = contextEnds[term];
98514
+
98515
+ if (end) {
98516
+ return variables.exitScope(code);
98517
+ }
98518
+
98519
+ if (term === ContextEntry) {
98520
+ const parts = variables.children.filter(c => c.name !== 'ContextEntry');
98521
+
98522
+ const name = parts[0];
98523
+ const value = last(parts);
98524
+
98525
+ return wrap(variables, 'ContextEntry', code).assign(
98526
+ {
98527
+ value: Context
98528
+ .of(variables.value)
98529
+ .set(name?.computedValue(), value?.computedValue())
98530
+ }
98531
+ );
98532
+ }
98533
+
98534
+ if (
98535
+ term === ForInExpression ||
98536
+ term === QuantifiedInExpression
98537
+ ) {
98538
+ return wrap(variables, 'InExpression', code);
98539
+ }
98540
+
98541
+ // define <partial> within ForExpression body
98542
+ if (term === forExpressionBodyStart) {
98543
+
98544
+ return variables.define(
98545
+ 'partial',
98546
+ ValueProducer.of(variables => {
98547
+ return last(variables.children)?.computedValue();
98548
+ })
98549
+ );
98550
+ }
98551
+
98552
+ if (
98553
+ term === ParameterName
98554
+ ) {
98555
+ const name = last(variables.children).computedValue();
98556
+
98557
+ // TODO: attach type information
98558
+ return variables.define(name, 1);
98559
+ }
98560
+
98561
+ // pull <expression> into ArithmeticExpression child
98562
+ if (
98563
+ term === arithmeticPlusStart ||
98564
+ term === arithmeticTimesStart ||
98565
+ term === arithmeticExpStart
98566
+ ) {
98567
+ const children = variables.children.slice(0, -1);
98568
+ const lastChild = last(variables.children);
98569
+
98570
+ return variables.assign({
98571
+ children
98572
+ }).enterScope('ArithmeticExpression').pushChild(lastChild);
98573
+ }
98574
+
98575
+ if (term === arithmeticUnaryStart) {
98576
+ return variables.enterScope('ArithmeticExpression');
98577
+ }
98578
+
98579
+ if (
98580
+ term === Identifier ||
98581
+ term === AdditionalIdentifier ||
98582
+ term === PropertyIdentifier
98583
+ ) {
98584
+ return variables.token(code);
98585
+ }
98586
+
98587
+ if (
98588
+ term === StringLiteral
98589
+ ) {
98590
+ return variables.literal(code.replace(/^"|"$/g, ''));
98591
+ }
98592
+
98593
+ if (term === BooleanLiteral) {
98594
+ return variables.literal(code === 'true' ? true : false);
98595
+ }
98596
+
98597
+ if (term === NumericLiteral) {
98598
+ return variables.literal(parseFloat(code));
98599
+ }
98600
+
98601
+ if (term === nil) {
98602
+ return variables.literal(null);
98603
+ }
98604
+
98605
+ if (
98606
+ term === VariableName
98607
+ ) {
98608
+ return variables.resolveName();
98609
+ }
98610
+
98611
+ if (
98612
+ term === Name ||
98613
+ term === PropertyName
98614
+ ) {
98615
+ return variables.declareName();
98616
+ }
98617
+
98618
+ if (
98619
+ term === expression0 ||
98620
+ term === PositiveUnaryTest
98621
+ ) {
98622
+ if (variables.tokens.length > 0) {
98623
+ throw new Error('uncleared name');
98624
+ }
98625
+ }
98626
+
98627
+ if (term === expression0) {
98628
+
98629
+ let parent = variables;
98630
+
98631
+ while (parent.parent) {
98632
+ parent = parent.exitScope(code);
98633
+ }
98634
+
98635
+ return parent;
98636
+ }
98637
+
98638
+ return variables;
98639
+ }
98640
+ });
98641
+ }
98642
+
98643
+ const variableTracker = trackVariables({});
98644
+
98645
+
98646
+ // helpers //////////////
98647
+
98648
+ function getContextValue(variables, args) {
98649
+
98650
+ if (!args.length) {
98651
+ return variables.assign({
98652
+ value: null
98653
+ });
98654
+ }
98655
+
98656
+ if (args[0].name === 'Name') {
98657
+ args = extractNamedArgs(args, [ 'm', 'key' ]);
98658
+ }
98659
+
98660
+ if (args.length !== 2) {
98661
+ return variables.assign({
98662
+ value: null
98663
+ });
98664
+ }
98665
+
98666
+ const [
98667
+ context,
98668
+ key
98669
+ ] = args;
98670
+
98671
+ const keyValue = key?.computedValue();
98672
+ const contextValue = context?.computedValue();
98673
+
98674
+ if (
98675
+ (!contextValue || typeof contextValue !== 'object') || typeof keyValue !== 'string'
98676
+ ) {
98677
+ return variables.assign({
98678
+ value: null
98679
+ });
98680
+ }
98681
+
98682
+ return variables.assign({
98683
+ value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
98684
+ return contextValue.get(keyValue) || value;
98685
+ }, null)
98686
+ });
98687
+ }
98688
+
98689
+ function extractNamedArgs(args, argNames) {
98690
+
98691
+ const context = {};
98692
+
98693
+ for (let i = 0; i < args.length; i += 2) {
98694
+ const [ name, value ] = args.slice(i, i + 2);
98695
+
98696
+ context[name.value] = value;
98697
+ }
98698
+
98699
+ return argNames.map(name => context[name]);
98700
+ }
98701
+
98702
+ function last(arr) {
98703
+ return arr[arr.length - 1];
98704
+ }
98705
+
98706
+ const feelHighlighting = styleTags({
98707
+ StringLiteral: tags.string,
98708
+ NumericLiteral: tags.number,
98709
+ BooleanLiteral: tags.bool,
98710
+ 'AtLiteral!': tags.special(tags.string),
98711
+ CompareOp: tags.compareOperator,
98712
+ ArithOp: tags.arithmeticOperator,
98713
+ 'for if then else some every satisfies between return': tags.controlKeyword,
98714
+ 'in instance of and or': tags.operatorKeyword,
98715
+ function: tags.definitionKeyword,
98716
+ as: tags.keyword,
98717
+ 'Type/...': tags.typeName,
98718
+ Wildcard: tags.special(tags.variableName),
98719
+ null: tags.null,
98720
+ LineComment: tags.lineComment,
98721
+ BlockComment: tags.blockComment,
98722
+ 'VariableName! "?"': tags.variableName,
98723
+ 'DateTimeConstructor! SpecialFunctionName!': tags.function(tags.special(tags.variableName)),
98724
+ 'List Interval': tags.list,
98725
+ Context: tags.definition(tags.literal),
98726
+ 'Name!': tags.definition(tags.variableName),
98727
+ 'Key/Name! ContextEntryType/Name!': tags.definition(tags.propertyName),
98728
+ 'PathExpression/VariableName!': tags.function(tags.propertyName),
98729
+ 'FormalParameter/ParameterName!': tags.function(tags.definition(tags.variableName)),
98730
+ '( )': tags.paren,
98731
+ '[ ]': tags.squareBracket,
98732
+ '{ }': tags.brace,
98733
+ '.': tags.derefOperator,
98734
+ ', ;': tags.separator,
98735
+ '..': tags.punctuation
98736
+ });
98737
+
98738
+ // This file was generated by lezer-generator. You probably shouldn't edit it.
98739
+ const spec_identifier = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:56, or:60, and:64, between:72, instance:86, of:89, days:101, time:103, duration:105, years:107, months:109, date:111, list:117, context:123, function:130, null:156, true:332, false:332, "?":170, external:186, not:211};
98740
+ const parser = LRParser.deserialize({
98741
+ version: 14,
98742
+ states: "C|O`QYOOO`QYOOO$yQYOOOOQU'#Ce'#CeO%TQYO'#C`O&^QYO'#FQOOQQ'#Ff'#FfO&hQYO'#FfO`QYO'#DVOOQU'#En'#EnO(_Q^O'#D]OOQU'#D^'#D^OOQU'#D]'#D]OOQO'#Fn'#FnO*[QWO'#DvOOQQ'#D}'#D}OOQQ'#EO'#EOOOQQ'#EP'#EPO*aOWO'#ESO*[QWO'#EQOOQQ'#EQ'#EQOOQQ'#Ft'#FtOOQQ'#Fr'#FrOOQQ'#Fz'#FzOOQQ'#EU'#EUO`QYO'#EWOOQQ'#FS'#FSO*iQ^O'#FSO,`QYO'#EXO,gQWO'#EYOOQP'#GO'#GOO,lQXO'#EaOOQQ'#F{'#F{OOQQ'#FR'#FRQOQWOOOOQQ'#FT'#FTOOQQ'#F^'#F^O`QYO'#CoOOQQ'#F_'#F_O%TQYO'#CsO,zQYO'#DwOOQQ'#Fs'#FsO-PQYO'#EROOQO'#ER'#ERO`QYO'#EVO`QYO'#EUOOQO'#F|'#F|Q-XQWOOO-^QYO'#DRO.TQWO'#FbOOQO'#DT'#DTO.`QYO'#FfO.gQWOOO/^QYO'#CdO/kQYO'#FVOOQQ'#Cc'#CcO/pQYO'#FUOOQQ'#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#P#X#Y#i#j#k#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!mWOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR&V%mT&Z%n&t!a!eT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!a!gT!Q!n!t!v#P#X#Y#i#j#k#l#n#o#p#q#v$k$o$r%R%S%Z%^%_%b%e%o%w%{&^!m^OPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zQ!q^R!scR#z!pQ!wlR#{!p!mfOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#Oo",
98745
+ 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 BacktickIdentifier 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",
98746
+ maxTerm: 174,
98747
+ context: variableTracker,
98748
+ nodeProps: [
98749
+ ["group", -17,4,19,23,29,31,33,41,42,68,70,72,85,86,88,89,90,97,"Expr",47,"Expr Expr",-5,78,79,80,81,82,"Expr Literal"],
98750
+ ["closedBy", 38,")",71,"]",96,"}"],
98751
+ ["openedBy", 40,"(",69,"[",95,"{"]
98752
+ ],
98753
+ propSources: [feelHighlighting],
98754
+ skippedNodes: [0,1,2],
98755
+ repeatNodeCount: 14,
98756
+ tokenData: "2t~RvXY#iYZ$^Z[#i]^$^pq#iqr$crs$nwx*[xy*ayz*fz{*k{|*x|}*}}!O+S!O!P+a!P!Q,k!Q![.f![!].}!]!^/S!^!_/X!_!`$i!`!a/h!b!c/r!}#O/w#P#Q/|#Q#R*s#S#T0R#o#p2j#q#r2o$f$g#i#BY#BZ#i$IS$I_#i$I|$I}$^$I}$JO$^$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~#nY#r~XY#iZ[#ipq#i$f$g#i#BY#BZ#i$IS$I_#i$JT$JU#i$KV$KW#i&FU&FV#i?HT?HU#i~$cO#s~~$fP!_!`$i~$nOr~~$qXOY$nYZ%^Zr$nrs'us#O$n#O#P'|#P;'S$n;'S;=`)c<%lO$n~%aVOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`'S<%lO%^~%{O$j~~&OWOr%^rs&hs#O%^#O#P%{#P;'S%^;'S;=`'Y;=`<%l%^<%lO%^~&mV$j~Or%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`'S<%lO%^~'VP;=`<%l%^~']WOr%^rs%vs#O%^#O#P%{#P;'S%^;'S;=`'S;=`<%l%^<%lO%^~'|O$j~$k~~(PYOY$nYZ$nZr$nrs(os#O$n#O#P'|#P;'S$n;'S;=`)i;=`<%l$n<%lO$n~(vX$j~$k~OY$nYZ%^Zr$nrs'us#O$n#O#P'|#P;'S$n;'S;=`)c<%lO$n~)fP;=`<%l$n~)lYOY$nYZ%^Zr$nrs'us#O$n#O#P'|#P;'S$n;'S;=`)c;=`<%l$n<%lO$n~*aO#{~~*fOv~~*kOx~~*pP^~z{*s~*xO_~~*}O[~~+SO$O~R+XPZP!`!a+[Q+aO$_Q~+fQ#z~!O!P+l!Q![+q~+qO#}~~+vR$i~!Q![+q!g!h,P#X#Y,P~,SR{|,]}!O,]!Q![,c~,`P!Q![,c~,hP$i~!Q![,c~,pQ]~z{,v!P!Q-}~,yTOz,vz{-Y{;'S,v;'S;=`-w<%lO,v~-]VOz,vz{-Y{!P,v!P!Q-r!Q;'S,v;'S;=`-w<%lO,v~-wOQ~~-zP;=`<%l,v~.SSP~OY-}Z;'S-};'S;=`.`<%lO-}~.cP;=`<%l-}~.kS$i~!O!P.w!Q![.f!g!h,P#X#Y,P~.zP!Q![+q~/SO$]~~/XO$t~R/`P!]QsP!_!`/cP/hOsPR/oP!YQsP!_!`/c~/wO$m~~/|O!i~~0RO!g~~0UVO#O0R#O#P0k#P#S0R#S#T1r#T;'S0R;'S;=`1w<%lO0R~0nWO#O0R#O#P0k#P#S0R#S#T1W#T;'S0R;'S;=`1};=`<%l0R<%lO0R~1]V$Z~O#O0R#O#P0k#P#S0R#S#T1r#T;'S0R;'S;=`1w<%lO0R~1wO$Z~~1zP;=`<%l0R~2QWO#O0R#O#P0k#P#S0R#S#T1r#T;'S0R;'S;=`1w;=`<%l0R<%lO0R~2oO#S~~2tO#R~",
98757
+ tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
98758
+ topRules: {"Expression":[0,3],"Expressions":[1,102],"UnaryTests":[2,103]},
98759
+ dialects: {camunda: 2568},
98760
+ dynamicPrecedences: {"31":-1,"68":1,"72":-1,"74":-1},
98761
+ specialized: [{term: 122, get: (value) => spec_identifier[value] || -1}],
98762
+ tokenPrec: 2571
98763
+ });
98764
+
98765
+ /**
98766
+ * @typedef {import('@lezer/common').Tree} Tree
98767
+ * @typedef {import('@codemirror/lint').Diagnostic} LintMessage
98768
+ */
98769
+
98770
+ /**
98771
+ * Create an array of syntax errors in the given tree.
98772
+ *
98773
+ * @param {Tree} syntaxTree
98774
+ * @returns {LintMessage[]} array of syntax errors
98775
+ */
98776
+ function lintSyntax(syntaxTree) {
98777
+
98778
+ const lintMessages = [];
98779
+
98780
+ syntaxTree.iterate({
98781
+ enter: ref => {
98782
+ const node = ref.node;
98783
+
98784
+ if (!node.type.isError) {
98785
+ return;
98786
+ }
98787
+
98788
+ const parent = node.parent;
98789
+ const next = getNextNode(node);
98790
+
98791
+ const message = {
98792
+ from: node.from,
98793
+ to: node.to,
98794
+ severity: 'error',
98795
+ type: 'Syntax Error'
98796
+ };
98797
+
98798
+ if (node.from !== node.to) {
98799
+ message.message = `Unrecognized token in <${parent.name}>`;
98800
+ } else if (next) {
98801
+ message.message = `Unrecognized token <${next.name}> in <${parent.name}>`;
98802
+ message.to = next.to;
98803
+ } else {
98804
+ const before = parent.enterUnfinishedNodesBefore(node.to);
98805
+ message.message = `Incomplete <${ (before || parent).name }>`;
98806
+ }
98807
+
98808
+ lintMessages.push(message);
98809
+ }
98810
+ });
98811
+
98812
+ return lintMessages;
98813
+ }
98814
+
98815
+ function getNextNode(node) {
98816
+ if (!node) {
98817
+ return null;
98818
+ }
98819
+
98820
+ return node.nextSibling || getNextNode(node.parent);
98821
+ }
98822
+
98823
+ /**
98824
+ * @typedef {object} Context
98825
+ * @property {function} report
98826
+ * @property {(from: number, to: number) => string} readContent
98827
+ * @property {(from: number, to: number, content: string) => void} updateContent
98828
+ */
98829
+
98830
+ const RULE_NAME = 'first-item';
98831
+
98832
+ var firstItem = {
98833
+ create(/** @type {Context} */ context) {
98834
+ return {
98835
+ enter(node) {
98836
+ if (node.name !== 'FilterExpression') {
98837
+ return;
98838
+ }
98839
+
98840
+ const content = context.readContent(node.from, node.to);
98841
+
98842
+ if (zeroIndexPattern().test(content)) {
98843
+ const {
98844
+ from,
98845
+ to
98846
+ } = node;
98847
+
98848
+ context.report({
98849
+ from,
98850
+ to,
98851
+ message: 'First item is accessed via [1]',
98852
+ severity: 'warning',
98853
+ type: RULE_NAME,
98854
+ actions: [
98855
+ {
98856
+ name: 'fix',
98857
+ apply(_, start = from, end = to) {
98858
+ context.updateContent(start, end, content.replace(zeroIndexPattern(), '[1]'));
98859
+ }
98860
+ }
98861
+ ]
98862
+ });
98863
+ }
98864
+ }
98865
+ };
98866
+ }
98867
+ };
98868
+
98869
+ function zeroIndexPattern() {
98870
+ return /\[\s*0\s*\]$/;
98871
+ }
98872
+
98873
+ /**
98874
+ * @typedef {import('@lezer/common').Tree} Tree
98875
+ * @typedef {import('@codemirror/lint').Diagnostic} LintMessage
98876
+ * @typedef {import('./index').LintAllContext} LintAllContext
98877
+ */
98878
+
98879
+ const RULES = [
98880
+ firstItem
98881
+ ];
98882
+
98883
+ /**
98884
+ * Create an array of messages reported from rules in the given tree.
98885
+ *
98886
+ * @param {LintAllContext} context
98887
+ * @returns {LintMessage[]} array of syntax errors
98888
+ */
98889
+ function lintRules(context) {
98890
+ const {
98891
+ readContent,
98892
+ syntaxTree,
98893
+ updateContent
98894
+ } = context;
98895
+
98896
+ const lintMessages = [];
98897
+
98898
+ const ruleContext = {
98899
+ readContent,
98900
+ report: message => {
98901
+ lintMessages.push(message);
98902
+ },
98903
+ updateContent
98904
+ };
98905
+
98906
+ const rules = RULES.map(rule => rule.create(ruleContext));
98907
+
98908
+ syntaxTree.iterate({
98909
+ enter: ref => {
98910
+ for (const rule of rules) {
98911
+ rule.enter && rule.enter(ref);
98912
+ }
98913
+ },
98914
+ leave: ref => {
98915
+ for (const rule of rules) {
98916
+ rule.leave && rule.leave(ref);
98917
+ }
98918
+ }
98919
+ });
98920
+
98921
+ return lintMessages;
98922
+ }
98923
+
98924
+ /**
98925
+ * @typedef {import('@lezer/common').Tree} Tree
98926
+ * @typedef {import('@codemirror/lint').Diagnostic} LintMessage
98927
+ */
98928
+
98929
+ /**
98930
+ * @typedef {object} LintAllContext
98931
+ * @property {Tree} syntaxTree
98932
+ * @property {(from: number, to: number) => string} readContent
98933
+ * @property {(from: number, to: number, content: string) => void} updateContent
98934
+ */
98935
+
98936
+ /**
98937
+ * Generates lint messages for the given context.
98938
+ *
98939
+ * @param {LintAllContext} context
98940
+ * @returns {LintMessage[]} array of all lint messages
98941
+ */
98942
+ function lintAll(context) {
98943
+
98944
+ const lintMessages = [
98945
+ ...lintSyntax(context.syntaxTree),
98946
+ ...lintRules(context)
98947
+ ];
98948
+
98949
+ return lintMessages;
98950
+ }
98951
+
98952
+ /**
98953
+ * CodeMirror extension that provides linting for FEEL expressions.
98954
+ *
98955
+ * @returns {import('@codemirror/lint').LintSource} CodeMirror linting source
98956
+ */
98957
+ const cmFeelLinter = () => editorView => {
98958
+
98959
+ // don't lint if the Editor is empty
98960
+ if (editorView.state.doc.length === 0) {
98961
+ return [];
98962
+ }
98963
+
98964
+ const tree = syntaxTree(editorView.state);
98965
+
98966
+ const messages = lintAll({
98967
+ syntaxTree: tree,
98968
+ readContent: (from, to) => editorView.state.sliceDoc(from, to),
98969
+ updateContent: (from, to, content) => editorView.dispatch({
98970
+ changes: { from, to, insert: content }
98971
+ })
98972
+ });
98973
+
98974
+ return messages.map(message => ({
98975
+ ...message,
98976
+ source: message.type
98977
+ }));
98978
+ };
98979
+
97448
98980
  /**
97449
98981
  * A collection of FEEL-related [snippets](#autocomplete.snippet).
97450
98982
  */
@@ -97636,7 +99168,7 @@
97636
99168
  * extended with highlighting and indentation information.
97637
99169
  */
97638
99170
  const feelLanguage = LRLanguage.define({
97639
- parser: parser$2.configure({
99171
+ parser: parser.configure({
97640
99172
  props: [indentNodeProp.add({
97641
99173
  'Context': delimitedIndent({
97642
99174
  closing: '}'
@@ -105976,16 +107508,16 @@
105976
107508
  parserDialect: 'camunda'
105977
107509
  };
105978
107510
 
105979
- /**
105980
- * @param {Object} props
105981
- * @param {djs.model.Base|Array<djs.model.Base>} [props.element]
105982
- * @param {Injector} props.injector
105983
- * @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
105984
- * @param {Object} props.layoutConfig
105985
- * @param {Object} props.descriptionConfig
105986
- * @param {Object} props.tooltipConfig
105987
- * @param {HTMLElement} props.feelPopupContainer
105988
- * @param {Function} props.getFeelPopupLinks
107511
+ /**
107512
+ * @param {Object} props
107513
+ * @param {djs.model.Base|Array<djs.model.Base>} [props.element]
107514
+ * @param {Injector} props.injector
107515
+ * @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
107516
+ * @param {Object} props.layoutConfig
107517
+ * @param {Object} props.descriptionConfig
107518
+ * @param {Object} props.tooltipConfig
107519
+ * @param {HTMLElement} props.feelPopupContainer
107520
+ * @param {Function} props.getFeelPopupLinks
105989
107521
  */
105990
107522
  function BpmnPropertiesPanel(props) {
105991
107523
  const {
@@ -106007,8 +107539,8 @@
106007
107539
  });
106008
107540
  const selectedElement = state.selectedElement;
106009
107541
 
106010
- /**
106011
- * @param {djs.model.Base | Array<djs.model.Base>} element
107542
+ /**
107543
+ * @param {djs.model.Base | Array<djs.model.Base>} element
106012
107544
  */
106013
107545
  const _update = element => {
106014
107546
  if (!element) {
@@ -106196,10 +107728,10 @@
106196
107728
 
106197
107729
  const DEFAULT_PRIORITY = 1000;
106198
107730
 
106199
- /**
106200
- * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
106201
- * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
106202
- * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
107731
+ /**
107732
+ * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
107733
+ * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
107734
+ * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
106203
107735
  */
106204
107736
 
106205
107737
  class BpmnPropertiesPanelRenderer {
@@ -106238,10 +107770,10 @@
106238
107770
  });
106239
107771
  }
106240
107772
 
106241
- /**
106242
- * Attach the properties panel to a parent node.
106243
- *
106244
- * @param {HTMLElement} container
107773
+ /**
107774
+ * Attach the properties panel to a parent node.
107775
+ *
107776
+ * @param {HTMLElement} container
106245
107777
  */
106246
107778
  attachTo(container) {
106247
107779
  if (!container) {
@@ -106266,8 +107798,8 @@
106266
107798
  this._eventBus.fire('propertiesPanel.attach');
106267
107799
  }
106268
107800
 
106269
- /**
106270
- * Detach the properties panel from its parent node.
107801
+ /**
107802
+ * Detach the properties panel from its parent node.
106271
107803
  */
106272
107804
  detach() {
106273
107805
  const parentNode = this._container.parentNode;
@@ -106277,11 +107809,11 @@
106277
107809
  }
106278
107810
  }
106279
107811
 
106280
- /**
106281
- * Register a new properties provider to the properties panel.
106282
- *
106283
- * @param {Number} [priority]
106284
- * @param {PropertiesProvider} provider
107812
+ /**
107813
+ * Register a new properties provider to the properties panel.
107814
+ *
107815
+ * @param {Number} [priority]
107816
+ * @param {PropertiesProvider} provider
106285
107817
  */
106286
107818
  registerProvider(priority, provider) {
106287
107819
  if (!provider) {
@@ -106298,9 +107830,9 @@
106298
107830
  this._eventBus.fire('propertiesPanel.providersChanged');
106299
107831
  }
106300
107832
 
106301
- /**
106302
- * Updates the layout of the properties panel.
106303
- * @param {Object} layout
107833
+ /**
107834
+ * Updates the layout of the properties panel.
107835
+ * @param {Object} layout
106304
107836
  */
106305
107837
  setLayout(layout) {
106306
107838
  this._eventBus.fire('propertiesPanel.setLayout', {
@@ -106350,12 +107882,12 @@
106350
107882
  return element && element.isImplicit;
106351
107883
  }
106352
107884
 
106353
- /**
106354
- * Setup keyboard bindings (undo, redo) on the given container.
106355
- *
106356
- * @param {Element} container
106357
- * @param {EventBus} eventBus
106358
- * @param {CommandStack} commandStack
107885
+ /**
107886
+ * Setup keyboard bindings (undo, redo) on the given container.
107887
+ *
107888
+ * @param {Element} container
107889
+ * @param {EventBus} eventBus
107890
+ * @param {CommandStack} commandStack
106359
107891
  */
106360
107892
  function setupKeyboard(container, eventBus, commandStack) {
106361
107893
  function cancel(event) {
@@ -106380,14 +107912,14 @@
106380
107912
  });
106381
107913
  }
106382
107914
 
106383
- /**
106384
- * A handler that combines and executes multiple commands.
106385
- *
106386
- * All updates are bundled on the command stack and executed in one step.
106387
- * This also makes it possible to revert the changes in one step.
106388
- *
106389
- * Example use case: remove the camunda:formKey attribute and in addition
106390
- * add all form fields needed for the camunda:formData property.
107915
+ /**
107916
+ * A handler that combines and executes multiple commands.
107917
+ *
107918
+ * All updates are bundled on the command stack and executed in one step.
107919
+ * This also makes it possible to revert the changes in one step.
107920
+ *
107921
+ * Example use case: remove the camunda:formKey attribute and in addition
107922
+ * add all form fields needed for the camunda:formData property.
106391
107923
  */
106392
107924
  class MultiCommandHandler {
106393
107925
  constructor(commandStack) {
@@ -106423,15 +107955,15 @@
106423
107955
  propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
106424
107956
  };
106425
107957
 
106426
- /**
106427
- * Create a new element and (optionally) set its parent.
106428
- *
106429
- * @param {string} type
106430
- * @param {Object} properties
106431
- * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
106432
- * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
106433
- *
106434
- * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
107958
+ /**
107959
+ * Create a new element and (optionally) set its parent.
107960
+ *
107961
+ * @param {string} type
107962
+ * @param {Object} properties
107963
+ * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
107964
+ * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
107965
+ *
107966
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
106435
107967
  */
106436
107968
  function createElement(type, properties, parent, bpmnFactory) {
106437
107969
  const element = bpmnFactory.create(type, properties);
@@ -106441,8 +107973,8 @@
106441
107973
  return element;
106442
107974
  }
106443
107975
 
106444
- /**
106445
- * generate a semantic id with given prefix
107976
+ /**
107977
+ * generate a semantic id with given prefix
106446
107978
  */
106447
107979
  function nextId(prefix) {
106448
107980
  const ids = new Ids$1([32, 32, 1]);
@@ -106468,32 +108000,32 @@
106468
108000
  return elements.find(element => element.id === id);
106469
108001
  }
106470
108002
 
106471
- /**
106472
- * createOrUpdateFormalExpression - upserts a specific formal expression
106473
- *
106474
- * If the value is falsy, the formal expression is removed.
106475
- *
106476
- * @param {djs.model.Base} element
106477
- * @param {ModdleElement} moddleElement
106478
- * @param {string} propertyName
106479
- * @param {string} newValue
106480
- * @param {BpmnFactory} bpmnFactory
106481
- * @param {CommandStack} commandStack
108003
+ /**
108004
+ * createOrUpdateFormalExpression - upserts a specific formal expression
108005
+ *
108006
+ * If the value is falsy, the formal expression is removed.
108007
+ *
108008
+ * @param {djs.model.Base} element
108009
+ * @param {ModdleElement} moddleElement
108010
+ * @param {string} propertyName
108011
+ * @param {string} newValue
108012
+ * @param {BpmnFactory} bpmnFactory
108013
+ * @param {CommandStack} commandStack
106482
108014
  */
106483
108015
  function createOrUpdateFormalExpression(element, moddleElement, propertyName, newValue, bpmnFactory, commandStack) {
106484
108016
  return commandStack.execute('element.updateModdleProperties', createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory));
106485
108017
  }
106486
108018
 
106487
- /**
106488
- * createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
106489
- *
106490
- * If the value is falsy, the formal expression is removed.
106491
- *
106492
- * @param {djs.model.Base} element
106493
- * @param {ModdleElement} moddleElement
106494
- * @param {string} propertyName
106495
- * @param {string} newValue
106496
- * @param {BpmnFactory} bpmnFactory
108019
+ /**
108020
+ * createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
108021
+ *
108022
+ * If the value is falsy, the formal expression is removed.
108023
+ *
108024
+ * @param {djs.model.Base} element
108025
+ * @param {ModdleElement} moddleElement
108026
+ * @param {string} propertyName
108027
+ * @param {string} newValue
108028
+ * @param {BpmnFactory} bpmnFactory
106497
108029
  */
106498
108030
  function createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory) {
106499
108031
  const expressionProps = {};
@@ -106529,12 +108061,12 @@
106529
108061
  };
106530
108062
  }
106531
108063
 
106532
- /**
106533
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108064
+ /**
108065
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
106534
108066
  */
106535
108067
 
106536
- /**
106537
- * @returns {Array<Entry>} entries
108068
+ /**
108069
+ * @returns {Array<Entry>} entries
106538
108070
  */
106539
108071
  function AdHocCompletionProps$1(props) {
106540
108072
  const {
@@ -106696,12 +108228,12 @@
106696
108228
  return compensateEventDefinition && compensateEventDefinition.get('activityRef');
106697
108229
  }
106698
108230
 
106699
- /**
106700
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108231
+ /**
108232
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
106701
108233
  */
106702
108234
 
106703
- /**
106704
- * @returns {Array<Entry>} entries
108235
+ /**
108236
+ * @returns {Array<Entry>} entries
106705
108237
  */
106706
108238
  function CompensationProps(props) {
106707
108239
  const {
@@ -106811,12 +108343,12 @@
106811
108343
  return getFlowElements(element, 'bpmn:BoundaryEvent');
106812
108344
  }
106813
108345
 
106814
- /**
106815
- * Checks whether an Activity is attaching a CompensateEvent of the parent container.
106816
- *
106817
- * @param {ModdleElement} activity
106818
- * @param {Array<ModdleElement>} boundaryEvents
106819
- * @returns {Boolean}
108346
+ /**
108347
+ * Checks whether an Activity is attaching a CompensateEvent of the parent container.
108348
+ *
108349
+ * @param {ModdleElement} activity
108350
+ * @param {Array<ModdleElement>} boundaryEvents
108351
+ * @returns {Boolean}
106820
108352
  */
106821
108353
  function hasCompensationEventAttached(activity, boundaryEvents) {
106822
108354
  const {
@@ -106831,15 +108363,15 @@
106831
108363
  });
106832
108364
  }
106833
108365
 
106834
- /**
106835
- * Checks whether an Activity can be compensated. That's the case when it is
106836
- * a) a CallActivity
106837
- * b) a SubProcess, when it is not event based and not a compensation
106838
- * c) any other Activity, when it is attaching a CompensateEvent of the parent container
106839
- *
106840
- * @param {ModdleElement} activity
106841
- * @param {Array<ModdleElement>} boundaryEvents
106842
- * @returns {Boolean}
108366
+ /**
108367
+ * Checks whether an Activity can be compensated. That's the case when it is
108368
+ * a) a CallActivity
108369
+ * b) a SubProcess, when it is not event based and not a compensation
108370
+ * c) any other Activity, when it is attaching a CompensateEvent of the parent container
108371
+ *
108372
+ * @param {ModdleElement} activity
108373
+ * @param {Array<ModdleElement>} boundaryEvents
108374
+ * @returns {Boolean}
106843
108375
  */
106844
108376
  function canBeCompensated(activity, boundaryEvents) {
106845
108377
  return is(activity, 'bpmn:CallActivity') || is(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
@@ -106852,11 +108384,11 @@
106852
108384
  });
106853
108385
  }
106854
108386
 
106855
- /**
106856
- * Retrieves all possible activities to reference for a Compensation.
106857
- *
106858
- * @param {djs.model.Base} element
106859
- * @returns {Array<ModdleElement>}
108387
+ /**
108388
+ * Retrieves all possible activities to reference for a Compensation.
108389
+ *
108390
+ * @param {djs.model.Base} element
108391
+ * @returns {Array<ModdleElement>}
106860
108392
  */
106861
108393
  function findActivityRefs(element) {
106862
108394
  const businessObject = getBusinessObject(element);
@@ -106876,13 +108408,13 @@
106876
108408
  return activities;
106877
108409
  }
106878
108410
 
106879
- /**
106880
- * Retrieves an option label in the form
106881
- * a) with name: "my Task (id=Task_1)"
106882
- * b) without name: "(id=Task_1)"
106883
- *
106884
- * @param {ModdleElement} activity
106885
- * @returns {String}
108411
+ /**
108412
+ * Retrieves an option label in the form
108413
+ * a) with name: "my Task (id=Task_1)"
108414
+ * b) without name: "(id=Task_1)"
108415
+ *
108416
+ * @param {ModdleElement} activity
108417
+ * @returns {String}
106886
108418
  */
106887
108419
  function createOptionLabel(activity) {
106888
108420
  const {
@@ -106897,12 +108429,12 @@
106897
108429
 
106898
108430
  const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
106899
108431
 
106900
- /**
106901
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108432
+ /**
108433
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
106902
108434
  */
106903
108435
 
106904
- /**
106905
- * @returns {Array<Entry>} entries
108436
+ /**
108437
+ * @returns {Array<Entry>} entries
106906
108438
  */
106907
108439
  function DocumentationProps(props) {
106908
108440
  const {
@@ -106973,12 +108505,12 @@
106973
108505
  });
106974
108506
  }
106975
108507
 
106976
- /**
106977
- * Retrieves a documentation element from a given moddle element.
106978
- *
106979
- * @param {ModdleElement} businessObject
106980
- *
106981
- * @returns {ModdleElement} documentation element inside the given moddle element.
108508
+ /**
108509
+ * Retrieves a documentation element from a given moddle element.
108510
+ *
108511
+ * @param {ModdleElement} businessObject
108512
+ *
108513
+ * @returns {ModdleElement} documentation element inside the given moddle element.
106982
108514
  */
106983
108515
  function getDocumentation(businessObject) {
106984
108516
  return function () {
@@ -106987,10 +108519,10 @@
106987
108519
  };
106988
108520
  }
106989
108521
 
106990
- /**
106991
- * Sets a documentation element for a given moddle element.
106992
- *
106993
- * @param {ModdleElement} businessObject
108522
+ /**
108523
+ * Sets a documentation element for a given moddle element.
108524
+ *
108525
+ * @param {ModdleElement} businessObject
106994
108526
  */
106995
108527
  function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
106996
108528
  return function (value) {
@@ -107036,12 +108568,12 @@
107036
108568
  const EMPTY_OPTION$4 = '';
107037
108569
  const CREATE_NEW_OPTION$4 = 'create-new';
107038
108570
 
107039
- /**
107040
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108571
+ /**
108572
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107041
108573
  */
107042
108574
 
107043
- /**
107044
- * @returns {Array<Entry>} entries
108575
+ /**
108576
+ * @returns {Array<Entry>} entries
107045
108577
  */
107046
108578
  function ErrorProps$2(props) {
107047
108579
  const {
@@ -107217,12 +108749,12 @@
107217
108749
 
107218
108750
  const CREATE_NEW_OPTION$3 = 'create-new';
107219
108751
 
107220
- /**
107221
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108752
+ /**
108753
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107222
108754
  */
107223
108755
 
107224
- /**
107225
- * @returns {Array<Entry>} entries
108756
+ /**
108757
+ * @returns {Array<Entry>} entries
107226
108758
  */
107227
108759
  function EscalationProps$2(props) {
107228
108760
  const {
@@ -107395,12 +108927,12 @@
107395
108927
  return sortBy(elements, e => (e.name || '').toLowerCase());
107396
108928
  }
107397
108929
 
107398
- /**
107399
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108930
+ /**
108931
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107400
108932
  */
107401
108933
 
107402
- /**
107403
- * @returns {Array<Entry>} entries
108934
+ /**
108935
+ * @returns {Array<Entry>} entries
107404
108936
  */
107405
108937
  function ExecutableProps(props) {
107406
108938
  const {
@@ -107471,14 +109003,14 @@
107471
109003
  // for ID validation as per BPMN Schema (QName - Namespace)
107472
109004
  const ID_REGEX = /^[a-z_][\w-.]*$/i;
107473
109005
 
107474
- /**
107475
- * checks whether the id value is valid
107476
- *
107477
- * @param {ModdleElement} element
107478
- * @param {String} idValue
107479
- * @param {Function} translate
107480
- *
107481
- * @return {String} error message
109006
+ /**
109007
+ * checks whether the id value is valid
109008
+ *
109009
+ * @param {ModdleElement} element
109010
+ * @param {String} idValue
109011
+ * @param {Function} translate
109012
+ *
109013
+ * @return {String} error message
107482
109014
  */
107483
109015
  function isIdValid(element, idValue, translate) {
107484
109016
  const assigned = element.$model.ids.assigned(idValue);
@@ -107506,12 +109038,12 @@
107506
109038
  return SPACE_REGEX.test(value);
107507
109039
  }
107508
109040
 
107509
- /**
107510
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109041
+ /**
109042
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107511
109043
  */
107512
109044
 
107513
- /**
107514
- * @returns {Array<Entry>} entries
109045
+ /**
109046
+ * @returns {Array<Entry>} entries
107515
109047
  */
107516
109048
  function IdProps$1() {
107517
109049
  return [{
@@ -107553,12 +109085,12 @@
107553
109085
  });
107554
109086
  }
107555
109087
 
107556
- /**
107557
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109088
+ /**
109089
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107558
109090
  */
107559
109091
 
107560
- /**
107561
- * @returns {Array<Entry>} entries
109092
+ /**
109093
+ * @returns {Array<Entry>} entries
107562
109094
  */
107563
109095
  function LinkProps(props) {
107564
109096
  const {
@@ -107606,12 +109138,12 @@
107606
109138
  const EMPTY_OPTION$3 = '';
107607
109139
  const CREATE_NEW_OPTION$2 = 'create-new';
107608
109140
 
107609
- /**
107610
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109141
+ /**
109142
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107611
109143
  */
107612
109144
 
107613
- /**
107614
- * @returns {Array<Entry>} entries
109145
+ /**
109146
+ * @returns {Array<Entry>} entries
107615
109147
  */
107616
109148
  function MessageProps$1(props) {
107617
109149
  const {
@@ -107754,12 +109286,12 @@
107754
109286
  return sortBy(elements, e => (e.name || '').toLowerCase());
107755
109287
  }
107756
109288
 
107757
- /**
107758
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109289
+ /**
109290
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107759
109291
  */
107760
109292
 
107761
- /**
107762
- * @returns {Array<Entry>} entries
109293
+ /**
109294
+ * @returns {Array<Entry>} entries
107763
109295
  */
107764
109296
  function MultiInstanceProps$2(props) {
107765
109297
  const {
@@ -107830,45 +109362,45 @@
107830
109362
 
107831
109363
  // generic ///////////////////////////
107832
109364
 
107833
- /**
107834
- * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
107835
- *
107836
- * @param {djs.model.Base} element
107837
- * @return {boolean}
109365
+ /**
109366
+ * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
109367
+ *
109368
+ * @param {djs.model.Base} element
109369
+ * @return {boolean}
107838
109370
  */
107839
109371
  function isMultiInstanceSupported$1(element) {
107840
109372
  const loopCharacteristics = getLoopCharacteristics$2(element);
107841
109373
  return !!loopCharacteristics && is(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
107842
109374
  }
107843
109375
 
107844
- /**
107845
- * getBody - get the body of a given expression.
107846
- *
107847
- * @param {ModdleElement<bpmn:FormalExpression>} expression
107848
- * @return {string} the body (value) of the expression
109376
+ /**
109377
+ * getBody - get the body of a given expression.
109378
+ *
109379
+ * @param {ModdleElement<bpmn:FormalExpression>} expression
109380
+ * @return {string} the body (value) of the expression
107849
109381
  */
107850
109382
  function getBody(expression) {
107851
109383
  return expression && expression.get('body');
107852
109384
  }
107853
109385
 
107854
- /**
107855
- * getProperty - get a property value of the loop characteristics.
107856
- *
107857
- * @param {djs.model.Base} element
107858
- * @param {string} propertyName
107859
- *
107860
- * @return {any} the property value
109386
+ /**
109387
+ * getProperty - get a property value of the loop characteristics.
109388
+ *
109389
+ * @param {djs.model.Base} element
109390
+ * @param {string} propertyName
109391
+ *
109392
+ * @return {any} the property value
107861
109393
  */
107862
109394
  function getProperty$3(element, propertyName) {
107863
109395
  const loopCharacteristics = getLoopCharacteristics$2(element);
107864
109396
  return loopCharacteristics && loopCharacteristics.get(propertyName);
107865
109397
  }
107866
109398
 
107867
- /**
107868
- * getLoopCharacteristics - get loopCharacteristics of a given element.
107869
- *
107870
- * @param {djs.model.Base} element
107871
- * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
109399
+ /**
109400
+ * getLoopCharacteristics - get loopCharacteristics of a given element.
109401
+ *
109402
+ * @param {djs.model.Base} element
109403
+ * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
107872
109404
  */
107873
109405
  function getLoopCharacteristics$2(element) {
107874
109406
  const bo = getBusinessObject(element);
@@ -107877,23 +109409,23 @@
107877
109409
 
107878
109410
  // loopCardinality
107879
109411
 
107880
- /**
107881
- * getLoopCardinality - get the loop cardinality of the loop characteristics.
107882
- *
107883
- * @param {djs.model.Base} element
107884
- *
107885
- * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
109412
+ /**
109413
+ * getLoopCardinality - get the loop cardinality of the loop characteristics.
109414
+ *
109415
+ * @param {djs.model.Base} element
109416
+ *
109417
+ * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
107886
109418
  */
107887
109419
  function getLoopCardinality(element) {
107888
109420
  return getProperty$3(element, 'loopCardinality');
107889
109421
  }
107890
109422
 
107891
- /**
107892
- * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
107893
- *
107894
- * @param {djs.model.Base} element
107895
- *
107896
- * @return {string} the loop cardinality value
109423
+ /**
109424
+ * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
109425
+ *
109426
+ * @param {djs.model.Base} element
109427
+ *
109428
+ * @return {string} the loop cardinality value
107897
109429
  */
107898
109430
  function getLoopCardinalityValue(element) {
107899
109431
  const loopCardinality = getLoopCardinality(element);
@@ -107902,35 +109434,35 @@
107902
109434
 
107903
109435
  // completionCondition /////////////////////
107904
109436
 
107905
- /**
107906
- * getCompletionCondition - get the completion condition of the loop characteristics.
107907
- *
107908
- * @param {djs.model.Base} element
107909
- *
107910
- * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
109437
+ /**
109438
+ * getCompletionCondition - get the completion condition of the loop characteristics.
109439
+ *
109440
+ * @param {djs.model.Base} element
109441
+ *
109442
+ * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
107911
109443
  */
107912
109444
  function getCompletionCondition$1(element) {
107913
109445
  return getProperty$3(element, 'completionCondition');
107914
109446
  }
107915
109447
 
107916
- /**
107917
- * getCompletionConditionValue - get the completion condition value of the loop characteristics.
107918
- *
107919
- * @param {djs.model.Base} element
107920
- *
107921
- * @return {string} the completion condition value
109448
+ /**
109449
+ * getCompletionConditionValue - get the completion condition value of the loop characteristics.
109450
+ *
109451
+ * @param {djs.model.Base} element
109452
+ *
109453
+ * @return {string} the completion condition value
107922
109454
  */
107923
109455
  function getCompletionConditionValue(element) {
107924
109456
  const completionCondition = getCompletionCondition$1(element);
107925
109457
  return getBody(completionCondition);
107926
109458
  }
107927
109459
 
107928
- /**
107929
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109460
+ /**
109461
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107930
109462
  */
107931
109463
 
107932
- /**
107933
- * @returns {Array<Entry>} entries
109464
+ /**
109465
+ * @returns {Array<Entry>} entries
107934
109466
  */
107935
109467
  function NameProps(props) {
107936
109468
  const {
@@ -108034,12 +109566,12 @@
108034
109566
  return categoryValue;
108035
109567
  }
108036
109568
 
108037
- /**
108038
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109569
+ /**
109570
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108039
109571
  */
108040
109572
 
108041
- /**
108042
- * @returns {Array<Entry>} entries
109573
+ /**
109574
+ * @returns {Array<Entry>} entries
108043
109575
  */
108044
109576
  function ProcessProps$1(props) {
108045
109577
  const {
@@ -108130,15 +109662,15 @@
108130
109662
  return is(element, 'bpmn:Participant') && element.businessObject.get('processRef');
108131
109663
  }
108132
109664
 
108133
- /**
108134
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109665
+ /**
109666
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108135
109667
  */
108136
109668
 
108137
109669
  const EMPTY_OPTION$2 = '';
108138
109670
  const CREATE_NEW_OPTION$1 = 'create-new';
108139
109671
 
108140
- /**
108141
- * @returns {Entry[]}
109672
+ /**
109673
+ * @returns {Entry[]}
108142
109674
  */
108143
109675
  function SignalProps$1(props) {
108144
109676
  const {
@@ -108284,12 +109816,12 @@
108284
109816
  return isAny(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition(element);
108285
109817
  }
108286
109818
 
108287
- /**
108288
- * Get the timer definition type for a given timer event definition.
108289
- *
108290
- * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
108291
- *
108292
- * @return {string|undefined} the timer definition type
109819
+ /**
109820
+ * Get the timer definition type for a given timer event definition.
109821
+ *
109822
+ * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
109823
+ *
109824
+ * @return {string|undefined} the timer definition type
108293
109825
  */
108294
109826
  function getTimerDefinitionType(timer) {
108295
109827
  if (!timer) {
@@ -108359,12 +109891,12 @@
108359
109891
  return entries;
108360
109892
  }
108361
109893
 
108362
- /**
108363
- * TimerEventDefinitionType - Generic select entry allowing to select a specific
108364
- * timerEventDefintionType. To be used together with timerEventDefinitionValue.
108365
- *
108366
- * @param {type} props
108367
- * @return {SelectEntry}
109894
+ /**
109895
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
109896
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
109897
+ *
109898
+ * @param {type} props
109899
+ * @return {SelectEntry}
108368
109900
  */
108369
109901
  function TimerEventDefinitionType$2(props) {
108370
109902
  const {
@@ -108432,13 +109964,13 @@
108432
109964
  });
108433
109965
  }
108434
109966
 
108435
- /**
108436
- * TimerEventDefinitionValue - Generic textField entry allowing to specify the
108437
- * timerEventDefintionValue based on the set timerEventDefintionType. To be used
108438
- * together with timerEventDefinitionType.
108439
- *
108440
- * @param {type} props
108441
- * @return {TextFieldEntry}
109967
+ /**
109968
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
109969
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
109970
+ * together with timerEventDefinitionType.
109971
+ *
109972
+ * @param {type} props
109973
+ * @return {TextFieldEntry}
108442
109974
  */
108443
109975
  function TimerEventDefinitionValue$2(props) {
108444
109976
  const {
@@ -108738,54 +110270,54 @@
108738
110270
  bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
108739
110271
  };
108740
110272
 
108741
- /**
108742
- * @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
108743
- *
108744
- * @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
108745
- */
108746
-
108747
- /**
108748
- *
108749
- * @param {BaseViewerOptions} options
108750
- */
108751
- function Modeler(options = {}) {
108752
- Modeler$1.call(this, options);
108753
- }
108754
-
108755
- e$5(Modeler, Modeler$1);
108756
-
108757
- /**
108758
- * @param { {
108759
- * disableAdjustOrigin?: boolean;
108760
- * disableGrid?: boolean;
108761
- * } } [options]
108762
- *
108763
- * @returns {ModuleDeclaration[]}
108764
- */
108765
- Modeler.prototype.getModules = function(options = {}) {
108766
- const modules = Modeler$1.prototype.getModules.call(this, options);
108767
-
108768
- return [
108769
- ...modules,
108770
- options.disableAdjustOrigin
108771
- ? diagramOriginModule
108772
- : alignToOriginModule,
108773
- options.disableGrid
108774
- ? {}
108775
- : index$4
108776
- ];
108777
- };
108778
-
108779
- Modeler.prototype._extensionModules = [
108780
- index$5,
108781
- ExecutableFixModule,
108782
- index$3,
108783
- index$2
108784
- ];
108785
-
108786
- Modeler.prototype._modules = [].concat(
108787
- Modeler$1.prototype._modules,
108788
- Modeler.prototype._extensionModules
110273
+ /**
110274
+ * @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
110275
+ *
110276
+ * @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
110277
+ */
110278
+
110279
+ /**
110280
+ *
110281
+ * @param {BaseViewerOptions} options
110282
+ */
110283
+ function Modeler(options = {}) {
110284
+ Modeler$1.call(this, options);
110285
+ }
110286
+
110287
+ e$5(Modeler, Modeler$1);
110288
+
110289
+ /**
110290
+ * @param { {
110291
+ * disableAdjustOrigin?: boolean;
110292
+ * disableGrid?: boolean;
110293
+ * } } [options]
110294
+ *
110295
+ * @returns {ModuleDeclaration[]}
110296
+ */
110297
+ Modeler.prototype.getModules = function(options = {}) {
110298
+ const modules = Modeler$1.prototype.getModules.call(this, options);
110299
+
110300
+ return [
110301
+ ...modules,
110302
+ options.disableAdjustOrigin
110303
+ ? diagramOriginModule
110304
+ : alignToOriginModule,
110305
+ options.disableGrid
110306
+ ? {}
110307
+ : index$4
110308
+ ];
110309
+ };
110310
+
110311
+ Modeler.prototype._extensionModules = [
110312
+ index$5,
110313
+ ExecutableFixModule,
110314
+ index$3,
110315
+ index$2
110316
+ ];
110317
+
110318
+ Modeler.prototype._modules = [].concat(
110319
+ Modeler$1.prototype._modules,
110320
+ Modeler.prototype._extensionModules
108789
110321
  );
108790
110322
 
108791
110323
  return Modeler;