@uipath/packager-tool-businessrules 1.205.0-preview.281 → 1.206.0-preview.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DmnFactory-L7MABUC6-2se4hby1.js → DmnFactory-L7MABUC6-9j10wv5r.js} +172 -291
- package/dist/DmnModelTypes-ATR7FVKZ-72r3k804.js +8 -0
- package/dist/{KieDmnMarshaller-LGE63WDG-j2aa6x0t.js → KieDmnMarshaller-LGE63WDG-vf62yxz0.js} +422 -448
- package/dist/entry-point-id.js +8 -9
- package/dist/hitPolicyResult-CGCR73CW-10sq8d4h.js +18 -0
- package/dist/{index-w023hd2z.js → index-729ptn3b.js} +2 -3
- package/dist/{index-te4nbykn.js → index-awyfxx3y.js} +6 -6
- package/dist/{index-n20hpx9v.js → index-pn81f352.js} +156 -75
- package/dist/index-xpx8ywrn.js +35 -0
- package/dist/index.js +11 -9
- package/package.json +3 -3
- package/dist/DmnModelTypes-ATR7FVKZ-as7dzkny.js +0 -18
- package/dist/hitPolicyResult-CGCR73CW-g7y41q6z.js +0 -66
- package/dist/index-80pa5crh.js +0 -19
- package/dist/index-a205z888.js +0 -94
- package/dist/index-rd3cw6s5.js +0 -12
- package/dist/index-tnyxsstx.js +0 -46
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
v4_default
|
|
3
|
-
} from "./index-tnyxsstx.js";
|
|
4
|
-
import {
|
|
5
|
-
e
|
|
6
|
-
} from "./index-w023hd2z.js";
|
|
7
|
-
import"./index-80pa5crh.js";
|
|
8
|
-
import"./index-rd3cw6s5.js";
|
|
9
|
-
|
|
10
1
|
// ../../../node_modules/@lezer/common/dist/index.js
|
|
11
2
|
var DefaultBufferLength = 1024;
|
|
12
3
|
var nextPropID = 0;
|
|
@@ -156,12 +147,12 @@ class NodeSet {
|
|
|
156
147
|
var CachedNode = new WeakMap;
|
|
157
148
|
var CachedInnerNode = new WeakMap;
|
|
158
149
|
var IterMode;
|
|
159
|
-
(function(
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
150
|
+
(function(IterMode) {
|
|
151
|
+
IterMode[IterMode["ExcludeBuffers"] = 1] = "ExcludeBuffers";
|
|
152
|
+
IterMode[IterMode["IncludeAnonymous"] = 2] = "IncludeAnonymous";
|
|
153
|
+
IterMode[IterMode["IgnoreMounts"] = 4] = "IgnoreMounts";
|
|
154
|
+
IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
|
|
155
|
+
IterMode[IterMode["EnterBracketed"] = 16] = "EnterBracketed";
|
|
165
156
|
})(IterMode || (IterMode = {}));
|
|
166
157
|
|
|
167
158
|
class Tree {
|
|
@@ -442,7 +433,7 @@ class TreeNode extends BaseNode {
|
|
|
442
433
|
}
|
|
443
434
|
nextChild(i, dir, pos, side, mode = 0) {
|
|
444
435
|
for (let parent = this;; ) {
|
|
445
|
-
for (let { children, positions } = parent._tree,
|
|
436
|
+
for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1;i != e; i += dir) {
|
|
446
437
|
let next = children[i], start = positions[i] + parent.from, mounted;
|
|
447
438
|
if (!(mode & IterMode.EnterBracketed && next instanceof Tree && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length))
|
|
448
439
|
continue;
|
|
@@ -453,9 +444,9 @@ class TreeNode extends BaseNode {
|
|
|
453
444
|
if (index > -1)
|
|
454
445
|
return new BufferNode(new BufferContext(parent, next, i, start), null, index);
|
|
455
446
|
} else if (mode & IterMode.IncludeAnonymous || (!next.type.isAnonymous || hasChild(next))) {
|
|
456
|
-
let
|
|
457
|
-
if (!(mode & IterMode.IgnoreMounts) && (
|
|
458
|
-
return new TreeNode(
|
|
447
|
+
let mounted;
|
|
448
|
+
if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay)
|
|
449
|
+
return new TreeNode(mounted.tree, start, i, parent);
|
|
459
450
|
let inner = new TreeNode(next, start, i, parent);
|
|
460
451
|
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
|
|
461
452
|
}
|
|
@@ -817,7 +808,7 @@ class TreeCursor {
|
|
|
817
808
|
}
|
|
818
809
|
for (;parent; { index, _parent: parent } = parent) {
|
|
819
810
|
if (index > -1)
|
|
820
|
-
for (let i = index + dir,
|
|
811
|
+
for (let i = index + dir, e = dir < 0 ? -1 : parent._tree.children.length;i != e; i += dir) {
|
|
821
812
|
let child = parent._tree.children[i];
|
|
822
813
|
if (this.mode & IterMode.IncludeAnonymous || child instanceof TreeBuffer || !child.type.isAnonymous || hasChild(child))
|
|
823
814
|
return false;
|
|
@@ -924,15 +915,15 @@ function buildTree(data) {
|
|
|
924
915
|
let cursor = Array.isArray(buffer) ? new FlatBufferCursor(buffer, buffer.length) : buffer;
|
|
925
916
|
let types = nodeSet.types;
|
|
926
917
|
let contextHash = 0, lookAhead = 0;
|
|
927
|
-
function takeNode(parentStart, minPos,
|
|
918
|
+
function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
|
|
928
919
|
let { id, start, end, size } = cursor;
|
|
929
920
|
let lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
930
921
|
if (size < 0) {
|
|
931
922
|
cursor.next();
|
|
932
923
|
if (size == -1) {
|
|
933
|
-
let
|
|
934
|
-
|
|
935
|
-
|
|
924
|
+
let node = reused[id];
|
|
925
|
+
children.push(node);
|
|
926
|
+
positions.push(start - parentStart);
|
|
936
927
|
return;
|
|
937
928
|
} else if (size == -3) {
|
|
938
929
|
contextHash = id;
|
|
@@ -944,15 +935,15 @@ function buildTree(data) {
|
|
|
944
935
|
throw new RangeError(`Unrecognized record size: ${size}`);
|
|
945
936
|
}
|
|
946
937
|
}
|
|
947
|
-
let type = types[id], node,
|
|
938
|
+
let type = types[id], node, buffer;
|
|
948
939
|
let startPos = start - parentStart;
|
|
949
|
-
if (end - start <= maxBufferLength && (
|
|
950
|
-
let
|
|
951
|
-
let endPos = cursor.pos -
|
|
940
|
+
if (end - start <= maxBufferLength && (buffer = findBufferSize(cursor.pos - minPos, inRepeat))) {
|
|
941
|
+
let data = new Uint16Array(buffer.size - buffer.skip);
|
|
942
|
+
let endPos = cursor.pos - buffer.size, index = data.length;
|
|
952
943
|
while (cursor.pos > endPos)
|
|
953
|
-
index = copyToBuffer(
|
|
954
|
-
node = new TreeBuffer(
|
|
955
|
-
startPos =
|
|
944
|
+
index = copyToBuffer(buffer.start, data, index);
|
|
945
|
+
node = new TreeBuffer(data, end - buffer.start, nodeSet);
|
|
946
|
+
startPos = buffer.start - parentStart;
|
|
956
947
|
} else {
|
|
957
948
|
let endPos = cursor.pos - size;
|
|
958
949
|
cursor.next();
|
|
@@ -984,10 +975,10 @@ function buildTree(data) {
|
|
|
984
975
|
node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
|
|
985
976
|
}
|
|
986
977
|
}
|
|
987
|
-
|
|
988
|
-
|
|
978
|
+
children.push(node);
|
|
979
|
+
positions.push(startPos);
|
|
989
980
|
}
|
|
990
|
-
function takeFlatNode(parentStart, minPos,
|
|
981
|
+
function takeFlatNode(parentStart, minPos, children, positions) {
|
|
991
982
|
let nodes = [];
|
|
992
983
|
let nodeCount = 0, stopAt = -1;
|
|
993
984
|
while (cursor.pos > minPos) {
|
|
@@ -1005,49 +996,49 @@ function buildTree(data) {
|
|
|
1005
996
|
}
|
|
1006
997
|
}
|
|
1007
998
|
if (nodeCount) {
|
|
1008
|
-
let
|
|
999
|
+
let buffer = new Uint16Array(nodeCount * 4);
|
|
1009
1000
|
let start = nodes[nodes.length - 2];
|
|
1010
1001
|
for (let i = nodes.length - 3, j = 0;i >= 0; i -= 3) {
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1002
|
+
buffer[j++] = nodes[i];
|
|
1003
|
+
buffer[j++] = nodes[i + 1] - start;
|
|
1004
|
+
buffer[j++] = nodes[i + 2] - start;
|
|
1005
|
+
buffer[j++] = j;
|
|
1015
1006
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1007
|
+
children.push(new TreeBuffer(buffer, nodes[2] - start, nodeSet));
|
|
1008
|
+
positions.push(start - parentStart);
|
|
1018
1009
|
}
|
|
1019
1010
|
}
|
|
1020
|
-
function makeBalanced(type,
|
|
1021
|
-
return (
|
|
1022
|
-
let
|
|
1023
|
-
if (lastI >= 0 && (last =
|
|
1024
|
-
if (!lastI && last.type == type && last.length ==
|
|
1011
|
+
function makeBalanced(type, contextHash) {
|
|
1012
|
+
return (children, positions, length) => {
|
|
1013
|
+
let lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;
|
|
1014
|
+
if (lastI >= 0 && (last = children[lastI]) instanceof Tree) {
|
|
1015
|
+
if (!lastI && last.type == type && last.length == length)
|
|
1025
1016
|
return last;
|
|
1026
1017
|
if (lookAheadProp = last.prop(NodeProp.lookAhead))
|
|
1027
|
-
|
|
1018
|
+
lookAhead = positions[lastI] + last.length + lookAheadProp;
|
|
1028
1019
|
}
|
|
1029
|
-
return makeTree(type,
|
|
1020
|
+
return makeTree(type, children, positions, length, lookAhead, contextHash);
|
|
1030
1021
|
};
|
|
1031
1022
|
}
|
|
1032
|
-
function makeRepeatLeaf(
|
|
1023
|
+
function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {
|
|
1033
1024
|
let localChildren = [], localPositions = [];
|
|
1034
|
-
while (
|
|
1035
|
-
localChildren.push(
|
|
1036
|
-
localPositions.push(
|
|
1025
|
+
while (children.length > i) {
|
|
1026
|
+
localChildren.push(children.pop());
|
|
1027
|
+
localPositions.push(positions.pop() + base - from);
|
|
1037
1028
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1029
|
+
children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));
|
|
1030
|
+
positions.push(from - base);
|
|
1040
1031
|
}
|
|
1041
|
-
function makeTree(type,
|
|
1042
|
-
if (
|
|
1043
|
-
let pair = [NodeProp.contextHash,
|
|
1032
|
+
function makeTree(type, children, positions, length, lookAhead, contextHash, props) {
|
|
1033
|
+
if (contextHash) {
|
|
1034
|
+
let pair = [NodeProp.contextHash, contextHash];
|
|
1044
1035
|
props = props ? [pair].concat(props) : [pair];
|
|
1045
1036
|
}
|
|
1046
|
-
if (
|
|
1047
|
-
let pair = [NodeProp.lookAhead,
|
|
1037
|
+
if (lookAhead > 25) {
|
|
1038
|
+
let pair = [NodeProp.lookAhead, lookAhead];
|
|
1048
1039
|
props = props ? [pair].concat(props) : [pair];
|
|
1049
1040
|
}
|
|
1050
|
-
return new Tree(type,
|
|
1041
|
+
return new Tree(type, children, positions, length, props);
|
|
1051
1042
|
}
|
|
1052
1043
|
function findBufferSize(maxSize, inRepeat) {
|
|
1053
1044
|
let fork = cursor.fork();
|
|
@@ -1093,7 +1084,7 @@ function buildTree(data) {
|
|
|
1093
1084
|
}
|
|
1094
1085
|
return result.size > 4 ? result : undefined;
|
|
1095
1086
|
}
|
|
1096
|
-
function copyToBuffer(bufferStart,
|
|
1087
|
+
function copyToBuffer(bufferStart, buffer, index) {
|
|
1097
1088
|
let { id, start, end, size } = cursor;
|
|
1098
1089
|
cursor.next();
|
|
1099
1090
|
if (size >= 0 && id < minRepeatType) {
|
|
@@ -1101,12 +1092,12 @@ function buildTree(data) {
|
|
|
1101
1092
|
if (size > 4) {
|
|
1102
1093
|
let endPos = cursor.pos - (size - 4);
|
|
1103
1094
|
while (cursor.pos > endPos)
|
|
1104
|
-
index = copyToBuffer(bufferStart,
|
|
1095
|
+
index = copyToBuffer(bufferStart, buffer, index);
|
|
1105
1096
|
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1097
|
+
buffer[--index] = startIndex;
|
|
1098
|
+
buffer[--index] = end - bufferStart;
|
|
1099
|
+
buffer[--index] = start - bufferStart;
|
|
1100
|
+
buffer[--index] = id;
|
|
1110
1101
|
} else if (size == -3) {
|
|
1111
1102
|
contextHash = id;
|
|
1112
1103
|
} else if (size == -4) {
|
|
@@ -1144,26 +1135,26 @@ function balanceRange(balanceType, children, positions, from, to, start, length,
|
|
|
1144
1135
|
total += nodeSize(balanceType, children[i]);
|
|
1145
1136
|
let maxChild = Math.ceil(total * 1.5 / 8);
|
|
1146
1137
|
let localChildren = [], localPositions = [];
|
|
1147
|
-
function divide(
|
|
1148
|
-
for (let i =
|
|
1149
|
-
let groupFrom = i, groupStart =
|
|
1138
|
+
function divide(children, positions, from, to, offset) {
|
|
1139
|
+
for (let i = from;i < to; ) {
|
|
1140
|
+
let groupFrom = i, groupStart = positions[i], groupSize = nodeSize(balanceType, children[i]);
|
|
1150
1141
|
i++;
|
|
1151
|
-
for (;i <
|
|
1152
|
-
let nextSize = nodeSize(balanceType,
|
|
1142
|
+
for (;i < to; i++) {
|
|
1143
|
+
let nextSize = nodeSize(balanceType, children[i]);
|
|
1153
1144
|
if (groupSize + nextSize >= maxChild)
|
|
1154
1145
|
break;
|
|
1155
1146
|
groupSize += nextSize;
|
|
1156
1147
|
}
|
|
1157
1148
|
if (i == groupFrom + 1) {
|
|
1158
1149
|
if (groupSize > maxChild) {
|
|
1159
|
-
let only =
|
|
1160
|
-
divide(only.children, only.positions, 0, only.children.length,
|
|
1150
|
+
let only = children[groupFrom];
|
|
1151
|
+
divide(only.children, only.positions, 0, only.children.length, positions[groupFrom] + offset);
|
|
1161
1152
|
continue;
|
|
1162
1153
|
}
|
|
1163
|
-
localChildren.push(
|
|
1154
|
+
localChildren.push(children[groupFrom]);
|
|
1164
1155
|
} else {
|
|
1165
|
-
let
|
|
1166
|
-
localChildren.push(balanceRange(balanceType,
|
|
1156
|
+
let length = positions[i - 1] + children[i - 1].length - groupStart;
|
|
1157
|
+
localChildren.push(balanceRange(balanceType, children, positions, groupFrom, i, groupStart, length, null, mkTree));
|
|
1167
1158
|
}
|
|
1168
1159
|
localPositions.push(groupStart + offset - start);
|
|
1169
1160
|
}
|
|
@@ -1406,7 +1397,7 @@ class Stack {
|
|
|
1406
1397
|
if (this.stack.length < 120)
|
|
1407
1398
|
for (let i = 0;best.length < 4 << 1 && i < nextStates.length; i += 2) {
|
|
1408
1399
|
let s = nextStates[i + 1];
|
|
1409
|
-
if (!best.some((v,
|
|
1400
|
+
if (!best.some((v, i) => i & 1 && v == s))
|
|
1410
1401
|
best.push(nextStates[i], s);
|
|
1411
1402
|
}
|
|
1412
1403
|
nextStates = best;
|
|
@@ -2569,7 +2560,7 @@ class LRParser extends Parser {
|
|
|
2569
2560
|
}
|
|
2570
2561
|
if ((this.data[i + 2] & 65536 >> 16) == 0) {
|
|
2571
2562
|
let value = this.data[i + 1];
|
|
2572
|
-
if (!result.some((v,
|
|
2563
|
+
if (!result.some((v, i) => i & 1 && v == value))
|
|
2573
2564
|
result.push(this.data[i], value);
|
|
2574
2565
|
}
|
|
2575
2566
|
}
|
|
@@ -2633,15 +2624,15 @@ class LRParser extends Parser {
|
|
|
2633
2624
|
let values = Object.keys(this.dialects), flags = values.map(() => false);
|
|
2634
2625
|
if (dialect)
|
|
2635
2626
|
for (let part of dialect.split(" ")) {
|
|
2636
|
-
let
|
|
2637
|
-
if (
|
|
2638
|
-
flags[
|
|
2627
|
+
let id = values.indexOf(part);
|
|
2628
|
+
if (id >= 0)
|
|
2629
|
+
flags[id] = true;
|
|
2639
2630
|
}
|
|
2640
2631
|
let disabled = null;
|
|
2641
2632
|
for (let i = 0;i < values.length; i++)
|
|
2642
2633
|
if (!flags[i]) {
|
|
2643
|
-
for (let j = this.dialects[values[i]],
|
|
2644
|
-
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[
|
|
2634
|
+
for (let j = this.dialects[values[i]], id;(id = this.data[j++]) != 65535; )
|
|
2635
|
+
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id] = 1;
|
|
2645
2636
|
}
|
|
2646
2637
|
return new Dialect(dialect, flags, disabled);
|
|
2647
2638
|
}
|
|
@@ -2749,7 +2740,7 @@ function sameArray(a, b) {
|
|
|
2749
2740
|
function powerSet(array) {
|
|
2750
2741
|
let sets = [[]];
|
|
2751
2742
|
for (let i = 0;i < array.length; i++) {
|
|
2752
|
-
for (let j = 0,
|
|
2743
|
+
for (let j = 0, e = sets.length;j < e; j++) {
|
|
2753
2744
|
sets.push(sets[j].concat(array[i]));
|
|
2754
2745
|
}
|
|
2755
2746
|
}
|
|
@@ -2855,9 +2846,9 @@ function tagHighlighter(tags, options) {
|
|
|
2855
2846
|
}
|
|
2856
2847
|
let { scope, all = null } = options || {};
|
|
2857
2848
|
return {
|
|
2858
|
-
style: (
|
|
2849
|
+
style: (tags) => {
|
|
2859
2850
|
let cls = all;
|
|
2860
|
-
for (let tag of
|
|
2851
|
+
for (let tag of tags) {
|
|
2861
2852
|
for (let sub of tag.set) {
|
|
2862
2853
|
let tagClass = map[sub.id];
|
|
2863
2854
|
if (tagClass) {
|
|
@@ -2972,10 +2963,10 @@ var tags = {
|
|
|
2972
2963
|
local: Tag.defineModifier("local"),
|
|
2973
2964
|
special: Tag.defineModifier("special")
|
|
2974
2965
|
};
|
|
2975
|
-
for (let
|
|
2976
|
-
let val = tags[
|
|
2966
|
+
for (let name in tags) {
|
|
2967
|
+
let val = tags[name];
|
|
2977
2968
|
if (val instanceof Tag)
|
|
2978
|
-
val.name =
|
|
2969
|
+
val.name = name;
|
|
2979
2970
|
}
|
|
2980
2971
|
var classHighlighter = tagHighlighter([
|
|
2981
2972
|
{ tag: tags.link, class: "tok-link" },
|
|
@@ -3124,17 +3115,17 @@ function parseAdditionalSymbol(input, offset = 0) {
|
|
|
3124
3115
|
return null;
|
|
3125
3116
|
}
|
|
3126
3117
|
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
3127
|
-
for (let inside = false,
|
|
3118
|
+
for (let inside = false, chars = [], i = 0;; i++) {
|
|
3128
3119
|
const next = input.peek(offset + i);
|
|
3129
3120
|
if (isStartChar(next) || (inside || namePart) && isPartChar(next)) {
|
|
3130
3121
|
if (!inside) {
|
|
3131
3122
|
inside = true;
|
|
3132
3123
|
}
|
|
3133
|
-
|
|
3124
|
+
chars.push(next);
|
|
3134
3125
|
} else {
|
|
3135
|
-
if (
|
|
3126
|
+
if (chars.length) {
|
|
3136
3127
|
return {
|
|
3137
|
-
token: String.fromCharCode(...
|
|
3128
|
+
token: String.fromCharCode(...chars),
|
|
3138
3129
|
offset: i
|
|
3139
3130
|
};
|
|
3140
3131
|
}
|
|
@@ -3182,27 +3173,27 @@ function parseName(input, variables) {
|
|
|
3182
3173
|
continue;
|
|
3183
3174
|
}
|
|
3184
3175
|
tokens = [...tokens, token];
|
|
3185
|
-
const
|
|
3186
|
-
if (keys.has(
|
|
3187
|
-
const
|
|
3176
|
+
const name = [...start, ...tokens].join(" ");
|
|
3177
|
+
if (keys.has(name)) {
|
|
3178
|
+
const token = tokens[0];
|
|
3188
3179
|
nextMatch = {
|
|
3189
|
-
token
|
|
3190
|
-
offset:
|
|
3180
|
+
token,
|
|
3181
|
+
offset: token.length,
|
|
3191
3182
|
term: nameIdentifier
|
|
3192
3183
|
};
|
|
3193
3184
|
}
|
|
3194
|
-
if (prefixes.has(
|
|
3185
|
+
if (prefixes.has(name)) {
|
|
3195
3186
|
continue;
|
|
3196
3187
|
}
|
|
3197
|
-
if (dateTimeIdentifiers.some((el) => el ===
|
|
3198
|
-
const
|
|
3188
|
+
if (dateTimeIdentifiers.some((el) => el === name)) {
|
|
3189
|
+
const token = tokens[0];
|
|
3199
3190
|
nextMatch = {
|
|
3200
|
-
token
|
|
3201
|
-
offset:
|
|
3191
|
+
token,
|
|
3192
|
+
offset: token.length,
|
|
3202
3193
|
term: identifier
|
|
3203
3194
|
};
|
|
3204
3195
|
}
|
|
3205
|
-
if (dateTimeIdentifiers.some((el) => el.startsWith(
|
|
3196
|
+
if (dateTimeIdentifiers.some((el) => el.startsWith(name))) {
|
|
3206
3197
|
continue;
|
|
3207
3198
|
}
|
|
3208
3199
|
return nextMatch;
|
|
@@ -3248,9 +3239,9 @@ var insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
|
3248
3239
|
break;
|
|
3249
3240
|
}
|
|
3250
3241
|
if (insert) {
|
|
3251
|
-
const
|
|
3242
|
+
const identifier = parseIdentifier(input, offset + 1);
|
|
3252
3243
|
const spaces = parseSpaces(input, offset + 1);
|
|
3253
|
-
if (spaces ||
|
|
3244
|
+
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
3254
3245
|
return;
|
|
3255
3246
|
}
|
|
3256
3247
|
LOG_PARSE && console.log("%s: MATCH <insertSemi>", input.pos);
|
|
@@ -3399,7 +3390,7 @@ class VariableContext {
|
|
|
3399
3390
|
|
|
3400
3391
|
class Variables {
|
|
3401
3392
|
constructor({
|
|
3402
|
-
name
|
|
3393
|
+
name = "Expressions",
|
|
3403
3394
|
tokens = [],
|
|
3404
3395
|
children = [],
|
|
3405
3396
|
parent = null,
|
|
@@ -3408,7 +3399,7 @@ class Variables {
|
|
|
3408
3399
|
raw,
|
|
3409
3400
|
__cache
|
|
3410
3401
|
}) {
|
|
3411
|
-
this.name =
|
|
3402
|
+
this.name = name;
|
|
3412
3403
|
this.tokens = tokens;
|
|
3413
3404
|
this.children = children;
|
|
3414
3405
|
this.parent = parent;
|
|
@@ -3431,9 +3422,9 @@ class Variables {
|
|
|
3431
3422
|
}
|
|
3432
3423
|
return root.__cache;
|
|
3433
3424
|
}
|
|
3434
|
-
enterScope(
|
|
3425
|
+
enterScope(name) {
|
|
3435
3426
|
const childScope = this.of({
|
|
3436
|
-
name
|
|
3427
|
+
name,
|
|
3437
3428
|
parent: this
|
|
3438
3429
|
});
|
|
3439
3430
|
LOG_VARS && console.log("[%s] enter", childScope.path, childScope.context);
|
|
@@ -3496,19 +3487,19 @@ class Variables {
|
|
|
3496
3487
|
return val;
|
|
3497
3488
|
}
|
|
3498
3489
|
}
|
|
3499
|
-
resolveName(
|
|
3490
|
+
resolveName(name) {
|
|
3500
3491
|
const variable = this.tokens.join(" ");
|
|
3501
3492
|
const tokens = [];
|
|
3502
3493
|
const parentScope = this.assign({
|
|
3503
3494
|
tokens
|
|
3504
3495
|
});
|
|
3505
3496
|
const variableScope = this.of({
|
|
3506
|
-
name
|
|
3497
|
+
name,
|
|
3507
3498
|
parent: parentScope,
|
|
3508
3499
|
value: this.get(variable),
|
|
3509
3500
|
raw: variable
|
|
3510
3501
|
});
|
|
3511
|
-
LOG_VARS && console.log("[%s] resolve %s <%s=%s>",
|
|
3502
|
+
LOG_VARS && console.log("[%s] resolve %s <%s=%s>", name, variableScope.path, variable, variableScope.value);
|
|
3512
3503
|
return parentScope.pushChild(variableScope);
|
|
3513
3504
|
}
|
|
3514
3505
|
pushChild(child) {
|
|
@@ -3541,16 +3532,16 @@ class Variables {
|
|
|
3541
3532
|
value: variableName
|
|
3542
3533
|
}));
|
|
3543
3534
|
}
|
|
3544
|
-
define(
|
|
3545
|
-
if (typeof
|
|
3546
|
-
LOG_VARS && console.log("[%s] no define <%s=%s>", this.path,
|
|
3535
|
+
define(name, value) {
|
|
3536
|
+
if (typeof name !== "string") {
|
|
3537
|
+
LOG_VARS && console.log("[%s] no define <%s=%s>", this.path, name, value);
|
|
3547
3538
|
return this;
|
|
3548
3539
|
}
|
|
3549
|
-
LOG_VARS && console.log("[%s] define <%s=%s>", this.path,
|
|
3540
|
+
LOG_VARS && console.log("[%s] define <%s=%s>", this.path, name, value);
|
|
3550
3541
|
const oldContext = this.context;
|
|
3551
|
-
const newContext = oldContext.set(
|
|
3542
|
+
const newContext = oldContext.set(name, value);
|
|
3552
3543
|
const oldCache = this.cache.get(oldContext) || computeContextCache(oldContext);
|
|
3553
|
-
const newCache = cacheKey(
|
|
3544
|
+
const newCache = cacheKey(name, createContextCache(oldCache));
|
|
3554
3545
|
this.cache.set(newContext, newCache);
|
|
3555
3546
|
return this.assign({
|
|
3556
3547
|
context: newContext
|
|
@@ -3574,7 +3565,7 @@ class Variables {
|
|
|
3574
3565
|
}
|
|
3575
3566
|
static of(options) {
|
|
3576
3567
|
const {
|
|
3577
|
-
name
|
|
3568
|
+
name,
|
|
3578
3569
|
tokens = [],
|
|
3579
3570
|
children = [],
|
|
3580
3571
|
parent = null,
|
|
@@ -3587,7 +3578,7 @@ class Variables {
|
|
|
3587
3578
|
throw new Error("must provide <context>");
|
|
3588
3579
|
}
|
|
3589
3580
|
return new Variables({
|
|
3590
|
-
name
|
|
3581
|
+
name,
|
|
3591
3582
|
tokens: [...tokens],
|
|
3592
3583
|
children: [...children],
|
|
3593
3584
|
context,
|
|
@@ -3598,23 +3589,23 @@ class Variables {
|
|
|
3598
3589
|
});
|
|
3599
3590
|
}
|
|
3600
3591
|
}
|
|
3601
|
-
function normalizeContextKey(
|
|
3602
|
-
return
|
|
3592
|
+
function normalizeContextKey(name) {
|
|
3593
|
+
return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, " $1 ").replace(/\s{2,}/g, " ").trim();
|
|
3603
3594
|
}
|
|
3604
3595
|
function wrap(variables, scopeName, code) {
|
|
3605
3596
|
const parts = variables.children.filter((c) => c.name !== scopeName);
|
|
3606
3597
|
const children = variables.children.filter((c) => c.name === scopeName);
|
|
3607
3598
|
const namePart = parts[0];
|
|
3608
3599
|
const valuePart = parts[Math.max(1, parts.length - 1)];
|
|
3609
|
-
const
|
|
3600
|
+
const name = namePart?.computedValue();
|
|
3610
3601
|
const value = valuePart?.computedValue() ?? null;
|
|
3611
3602
|
return variables.assign({
|
|
3612
3603
|
children
|
|
3613
|
-
}).enterScope(scopeName).pushChildren(parts).exitScope(code).define(
|
|
3604
|
+
}).enterScope(scopeName).pushChildren(parts).exitScope(code).define(name, value);
|
|
3614
3605
|
}
|
|
3615
|
-
function trackVariables(context = {},
|
|
3606
|
+
function trackVariables(context = {}, Context = VariableContext) {
|
|
3616
3607
|
const start = Variables.of({
|
|
3617
|
-
context:
|
|
3608
|
+
context: Context.of(context)
|
|
3618
3609
|
});
|
|
3619
3610
|
return new ContextTracker({
|
|
3620
3611
|
start,
|
|
@@ -3622,12 +3613,12 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3622
3613
|
if (term === IfExpression) {
|
|
3623
3614
|
const [thenPart, elsePart] = variables.children.slice(-2);
|
|
3624
3615
|
variables = variables.assign({
|
|
3625
|
-
value:
|
|
3616
|
+
value: Context.of(thenPart?.computedValue(), elsePart?.computedValue())
|
|
3626
3617
|
});
|
|
3627
3618
|
}
|
|
3628
3619
|
if (term === List) {
|
|
3629
3620
|
variables = variables.assign({
|
|
3630
|
-
value:
|
|
3621
|
+
value: Context.of(...variables.children.map((c) => c?.computedValue()))
|
|
3631
3622
|
});
|
|
3632
3623
|
}
|
|
3633
3624
|
if (term === FilterExpression) {
|
|
@@ -3638,20 +3629,20 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3638
3629
|
}
|
|
3639
3630
|
if (term === FunctionInvocation) {
|
|
3640
3631
|
const [
|
|
3641
|
-
|
|
3632
|
+
name,
|
|
3642
3633
|
...args
|
|
3643
3634
|
] = variables.children;
|
|
3644
|
-
if (
|
|
3635
|
+
if (name?.raw === "get value") {
|
|
3645
3636
|
variables = getContextValue(variables, args);
|
|
3646
3637
|
} else {
|
|
3647
3638
|
variables = variables.assign({
|
|
3648
|
-
value:
|
|
3639
|
+
value: name?.computedValue() || Context.of(undefined)
|
|
3649
3640
|
});
|
|
3650
3641
|
}
|
|
3651
3642
|
}
|
|
3652
|
-
const
|
|
3653
|
-
if (
|
|
3654
|
-
return variables.enterScope(
|
|
3643
|
+
const start = contextStarts[term];
|
|
3644
|
+
if (start) {
|
|
3645
|
+
return variables.enterScope(start);
|
|
3655
3646
|
}
|
|
3656
3647
|
const prefixedStart = prefixedContextStarts[term];
|
|
3657
3648
|
if (prefixedStart) {
|
|
@@ -3663,10 +3654,10 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3663
3654
|
const lastChild = last(currentChildren);
|
|
3664
3655
|
let newContext = null;
|
|
3665
3656
|
if (term === pathExpressionStart) {
|
|
3666
|
-
newContext =
|
|
3657
|
+
newContext = Context.of(lastChild?.computedValue());
|
|
3667
3658
|
}
|
|
3668
3659
|
if (term === filterExpressionStart) {
|
|
3669
|
-
newContext =
|
|
3660
|
+
newContext = Context.of(currentContext, lastChild?.computedValue()).set("item", lastChild?.computedValue());
|
|
3670
3661
|
}
|
|
3671
3662
|
return variables.assign({ children }).enterScope(prefixedStart).pushChild(lastChild).assign({ context: newContext || currentContext });
|
|
3672
3663
|
}
|
|
@@ -3677,23 +3668,23 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3677
3668
|
}
|
|
3678
3669
|
if (term === ContextEntry) {
|
|
3679
3670
|
const parts = variables.children.filter((c) => c.name !== "ContextEntry");
|
|
3680
|
-
const
|
|
3671
|
+
const name = parts[0];
|
|
3681
3672
|
const value = last(parts);
|
|
3682
3673
|
return wrap(variables, "ContextEntry", code).assign({
|
|
3683
|
-
value:
|
|
3674
|
+
value: Context.of(variables.value).set(name?.computedValue(), value?.computedValue())
|
|
3684
3675
|
});
|
|
3685
3676
|
}
|
|
3686
3677
|
if (term === ForInExpression || term === QuantifiedInExpression) {
|
|
3687
3678
|
return wrap(variables, "InExpression", code);
|
|
3688
3679
|
}
|
|
3689
3680
|
if (term === forExpressionBodyStart) {
|
|
3690
|
-
return variables.define("partial", ValueProducer.of((
|
|
3691
|
-
return last(
|
|
3681
|
+
return variables.define("partial", ValueProducer.of((variables) => {
|
|
3682
|
+
return last(variables.children)?.computedValue();
|
|
3692
3683
|
}));
|
|
3693
3684
|
}
|
|
3694
3685
|
if (term === ParameterName) {
|
|
3695
|
-
const
|
|
3696
|
-
return variables.define(
|
|
3686
|
+
const name = last(variables.children).computedValue();
|
|
3687
|
+
return variables.define(name, 1);
|
|
3697
3688
|
}
|
|
3698
3689
|
if (term === arithmeticPlusStart || term === arithmeticTimesStart || term === arithmeticExpStart) {
|
|
3699
3690
|
const children = variables.children.slice(0, -1);
|
|
@@ -3772,18 +3763,18 @@ function getContextValue(variables, args) {
|
|
|
3772
3763
|
});
|
|
3773
3764
|
}
|
|
3774
3765
|
return variables.assign({
|
|
3775
|
-
value: [normalizeContextKey(keyValue), keyValue].reduce((value,
|
|
3776
|
-
return contextValue.get(
|
|
3766
|
+
value: [normalizeContextKey(keyValue), keyValue].reduce((value, keyValue) => {
|
|
3767
|
+
return contextValue.get(keyValue) || value;
|
|
3777
3768
|
}, null)
|
|
3778
3769
|
});
|
|
3779
3770
|
}
|
|
3780
3771
|
function extractNamedArgs(args, argNames) {
|
|
3781
3772
|
const context = {};
|
|
3782
3773
|
for (let i = 0;i < args.length; i += 2) {
|
|
3783
|
-
const [
|
|
3784
|
-
context[
|
|
3774
|
+
const [name, value] = args.slice(i, i + 2);
|
|
3775
|
+
context[name.value] = value;
|
|
3785
3776
|
}
|
|
3786
|
-
return argNames.map((
|
|
3777
|
+
return argNames.map((name) => context[name]);
|
|
3787
3778
|
}
|
|
3788
3779
|
function last(arr) {
|
|
3789
3780
|
return arr[arr.length - 1];
|
|
@@ -3846,192 +3837,82 @@ var parser = LRParser.deserialize({
|
|
|
3846
3837
|
|
|
3847
3838
|
// ../../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-EXAD3CI5.js
|
|
3848
3839
|
var R = parser.configure({ top: "UnaryTests" });
|
|
3849
|
-
var c = (
|
|
3840
|
+
var c = (e, t) => (t === "unaryTests" ? R : parser).parse(e);
|
|
3850
3841
|
var I = new Set(["StringLiteral", "NumericLiteral", "BooleanLiteral", "DateTimeLiteral", "null"]);
|
|
3851
|
-
var g = (
|
|
3852
|
-
var P = (
|
|
3853
|
-
for (let r =
|
|
3842
|
+
var g = (e) => e.parent?.name === "FunctionInvocation" && e.parent.firstChild?.from === e.from;
|
|
3843
|
+
var P = (e, t, i) => {
|
|
3844
|
+
for (let r = e.parent;r; r = r.parent)
|
|
3854
3845
|
if (!(r.name !== "ForExpression" && r.name !== "QuantifiedExpression"))
|
|
3855
3846
|
for (let n = r.getChild("InExpressions")?.firstChild;n; n = n.nextSibling) {
|
|
3856
3847
|
let s = n.getChild("Name");
|
|
3857
|
-
if (s &&
|
|
3848
|
+
if (s && e.from >= n.to && i.slice(s.from, s.to) === t)
|
|
3858
3849
|
return true;
|
|
3859
3850
|
}
|
|
3860
3851
|
return false;
|
|
3861
3852
|
};
|
|
3862
|
-
var C = (
|
|
3863
|
-
for (let r =
|
|
3853
|
+
var C = (e, t, i) => {
|
|
3854
|
+
for (let r = e.parent;r; r = r.parent)
|
|
3864
3855
|
if (r.name === "FunctionDefinition")
|
|
3865
3856
|
for (let n = r.getChild("FormalParameters")?.firstChild;n; n = n.nextSibling) {
|
|
3866
3857
|
let s = n.getChild("ParameterName")?.getChild("Name");
|
|
3867
|
-
if (s && i.slice(s.from, s.to) ===
|
|
3858
|
+
if (s && i.slice(s.from, s.to) === t)
|
|
3868
3859
|
return true;
|
|
3869
3860
|
}
|
|
3870
3861
|
return false;
|
|
3871
3862
|
};
|
|
3872
|
-
var _ = (
|
|
3873
|
-
for (let r =
|
|
3863
|
+
var _ = (e, t, i) => {
|
|
3864
|
+
for (let r = e.parent;r; r = r.parent)
|
|
3874
3865
|
if (r.name === "Context")
|
|
3875
3866
|
for (let n = r.firstChild;n; n = n.nextSibling) {
|
|
3876
|
-
if (n.name !== "ContextEntry" || n.to >
|
|
3867
|
+
if (n.name !== "ContextEntry" || n.to > e.from)
|
|
3877
3868
|
continue;
|
|
3878
3869
|
let s = n.getChild("Key")?.getChild("Name");
|
|
3879
|
-
if (s && i.slice(s.from, s.to) ===
|
|
3870
|
+
if (s && i.slice(s.from, s.to) === t)
|
|
3880
3871
|
return true;
|
|
3881
3872
|
}
|
|
3882
3873
|
return false;
|
|
3883
3874
|
};
|
|
3884
|
-
var M = (
|
|
3885
|
-
var
|
|
3886
|
-
|
|
3887
|
-
if (t2.name === "FilterExpression" && t2.firstChild && e2.from >= t2.firstChild.to)
|
|
3888
|
-
return true;
|
|
3889
|
-
return false;
|
|
3890
|
-
};
|
|
3891
|
-
var u = (e2, t2, i) => {
|
|
3892
|
-
c(e2, t2).iterate({ enter(n) {
|
|
3875
|
+
var M = (e, t, i) => P(e, t, i) || C(e, t, i) || _(e, t, i);
|
|
3876
|
+
var u = (e, t, i) => {
|
|
3877
|
+
c(e, t).iterate({ enter(n) {
|
|
3893
3878
|
if (n.name !== "VariableName")
|
|
3894
3879
|
return;
|
|
3895
|
-
let s = n.node, o =
|
|
3896
|
-
g(s) || M(s, o,
|
|
3880
|
+
let s = n.node, o = e.slice(s.from, s.to);
|
|
3881
|
+
g(s) || M(s, o, e) || i(s, o);
|
|
3897
3882
|
} });
|
|
3898
3883
|
};
|
|
3899
|
-
var T = (
|
|
3900
|
-
if (!
|
|
3884
|
+
var T = (e, t, i) => {
|
|
3885
|
+
if (!e || !e.includes(t))
|
|
3901
3886
|
return [];
|
|
3902
3887
|
let r = [];
|
|
3903
|
-
return u(
|
|
3904
|
-
s ===
|
|
3888
|
+
return u(e, i, (n, s) => {
|
|
3889
|
+
s === t && r.push({ from: n.from, to: n.to });
|
|
3905
3890
|
}), r;
|
|
3906
3891
|
};
|
|
3907
|
-
var
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
let i = [];
|
|
3911
|
-
return u(e2, t2, (r, n) => {
|
|
3912
|
-
i.push({ name: n, path: D(r, e2, true), segments: F(r, e2, false), from: r.from, to: r.to, inFilterPredicate: A(r) });
|
|
3913
|
-
}), i;
|
|
3914
|
-
};
|
|
3915
|
-
var F = (e2, t2, i) => {
|
|
3916
|
-
let r = [{ name: t2.slice(e2.from, e2.to), from: e2.from, to: e2.to }], n = e2, s = n.parent;
|
|
3917
|
-
for (;s && (s.name === "PathExpression" || i && s.name === "FilterExpression") && s.from === n.from; ) {
|
|
3918
|
-
let o = s.name === "PathExpression" ? s.getChild("PathName") : null;
|
|
3919
|
-
o && r.push({ name: t2.slice(o.from, o.to), from: o.from, to: o.to }), n = s, s = n.parent;
|
|
3920
|
-
}
|
|
3921
|
-
return r;
|
|
3922
|
-
};
|
|
3923
|
-
var D = (e2, t2, i) => F(e2, t2, i).map((r) => r.name).join(".");
|
|
3924
|
-
var h = (e2) => {
|
|
3925
|
-
let t2 = e2.trim();
|
|
3926
|
-
if (!t2)
|
|
3892
|
+
var h = (e) => {
|
|
3893
|
+
let t = e.trim();
|
|
3894
|
+
if (!t)
|
|
3927
3895
|
return false;
|
|
3928
|
-
let i = T(
|
|
3929
|
-
return i.length === 1 && i[0].from === 0 && i[0].to ===
|
|
3896
|
+
let i = T(t, t, "expression");
|
|
3897
|
+
return i.length === 1 && i[0].from === 0 && i[0].to === t.length;
|
|
3930
3898
|
};
|
|
3931
|
-
var a = (e2) => `${e2}_${v4_default()}`;
|
|
3932
3899
|
var v = { all: new Set, outsideFilterPredicates: new Set, paths: new Set };
|
|
3933
3900
|
var B = new WeakMap;
|
|
3934
3901
|
var U = { expression: new WeakMap, unaryTests: new WeakMap };
|
|
3935
|
-
var l = (e2, t2, i = B) => {
|
|
3936
|
-
let r = i.get(e2);
|
|
3937
|
-
if (r)
|
|
3938
|
-
return r;
|
|
3939
|
-
let n = t2(e2);
|
|
3940
|
-
return i.set(e2, n), n;
|
|
3941
|
-
};
|
|
3942
|
-
var p = (e2, t2) => {
|
|
3943
|
-
let i = e2?.trim();
|
|
3944
|
-
if (!i || t2 === "unaryTests" && i === "-")
|
|
3945
|
-
return v;
|
|
3946
|
-
let r = b(i, t2);
|
|
3947
|
-
return { all: new Set(r.map((n) => n.name)), outsideFilterPredicates: new Set(r.filter((n) => !n.inFilterPredicate).map((n) => n.name)), paths: new Set(r.map((n) => n.path)) };
|
|
3948
|
-
};
|
|
3949
|
-
var m = (e2) => {
|
|
3950
|
-
let t2 = new Set, i = new Set, r = new Set;
|
|
3951
|
-
for (let n of e2) {
|
|
3952
|
-
for (let s of n.paths)
|
|
3953
|
-
r.add(s);
|
|
3954
|
-
for (let s of n.all)
|
|
3955
|
-
t2.add(s);
|
|
3956
|
-
for (let s of n.outsideFilterPredicates)
|
|
3957
|
-
i.add(s);
|
|
3958
|
-
}
|
|
3959
|
-
return { all: t2, outsideFilterPredicates: i, paths: r };
|
|
3960
|
-
};
|
|
3961
|
-
var N = (e2, t2) => l(e2, () => p(e2.text, t2), U[t2]);
|
|
3962
|
-
var V = (e2) => l(e2, () => m([p(e2.expressionText, "expression"), p(e2.allowedValues?.text, "unaryTests")]));
|
|
3963
|
-
var k = (e2) => l(e2, () => p(e2.allowedValues?.text, "unaryTests"));
|
|
3964
|
-
var q = (e2) => l(e2, () => m([...e2.inputEntries.map((t2) => N(t2, "unaryTests")), ...e2.outputEntries.map((t2) => N(t2, "expression"))]));
|
|
3965
|
-
var $ = (e2) => l(e2, () => m(e2.map(q)));
|
|
3966
|
-
var S = (e2) => l(e2, () => m([...e2.inputs.map(V), ...e2.outputs.map(k), $(e2.rules)]));
|
|
3967
|
-
var E = (e2) => S(e2).all;
|
|
3968
|
-
var j = "Annotation";
|
|
3969
|
-
var W = "Decision";
|
|
3970
|
-
var H = "decision1";
|
|
3971
|
-
var z = "UiPath Maestro";
|
|
3972
|
-
var K = () => ({ id: a("definitions"), namespace: `http://uipath.com/dmn/${a("ns")}`, exporter: z });
|
|
3973
|
-
var X = "null";
|
|
3974
|
-
var Re = (e2) => {
|
|
3975
|
-
let t2 = (e2 ?? "").trim();
|
|
3976
|
-
return t2 === "" || t2 === X;
|
|
3977
|
-
};
|
|
3978
|
-
var Y = (e2) => ({ ...K(), name: e2, decision: { id: a("decision"), name: H, label: W, variableId: a("variable"), variableTypeRef: "string", decisionTable: { id: a("decisionTable"), hitPolicy: e.First, inputs: [{ id: a("input"), label: "Input 1", expressionId: a("inputExpression"), expressionText: "", typeRef: "string" }], outputs: [ie()], annotations: [{ name: j }], rules: [{ id: a("rule"), inputEntries: [{ id: a("inputEntry"), text: "-" }], outputEntries: [{ id: a("outputEntry"), text: "" }], annotationEntries: [""] }] } }, inputData: [] });
|
|
3979
|
-
var y = "input1";
|
|
3980
|
-
var Ie = (e2) => {
|
|
3981
|
-
let t2 = Y(e2), [i] = t2.decision.decisionTable.inputs;
|
|
3982
|
-
return re({ ...t2, inputData: [{ id: a("inputData"), variableId: a("variable"), name: y, typeRef: i.typeRef }], decision: { ...t2.decision, decisionTable: { ...t2.decision.decisionTable, inputs: [{ ...i, expressionText: y }] } } });
|
|
3983
|
-
};
|
|
3984
|
-
var Pe = /[\p{L}\p{N}_]/u;
|
|
3985
|
-
var Q = /^[\p{L}_][\p{L}\p{N}_]*(\s*\.\s*[\p{L}_][\p{L}\p{N}_]*)*$/u;
|
|
3986
3902
|
var G = /^[\p{L}_][\p{L}\p{N}_]*$/u;
|
|
3987
|
-
var J = (
|
|
3988
|
-
var Z = (
|
|
3989
|
-
let i = `output${
|
|
3903
|
+
var J = (e) => G.test(e.trim()) && h(e);
|
|
3904
|
+
var Z = (e, t) => {
|
|
3905
|
+
let i = `output${t + 1}`, r = (e ?? "").replace(/[^\p{L}\p{N}_]+(.)?/gu, (s, o) => o ? o.toUpperCase() : "");
|
|
3990
3906
|
if (!/^[\p{L}_]/u.test(r))
|
|
3991
3907
|
return i;
|
|
3992
3908
|
let n = r.charAt(0).toLowerCase() + r.slice(1);
|
|
3993
3909
|
return J(n) ? n : i;
|
|
3994
3910
|
};
|
|
3995
|
-
var ee = (
|
|
3996
|
-
var
|
|
3997
|
-
var _e = (e2) => e2.trim().split(".").map((t2) => t2.trim()).join(".");
|
|
3998
|
-
var Me = (e2) => {
|
|
3999
|
-
let t2 = e2.trim();
|
|
4000
|
-
if (!(!t2 || !Q.test(t2)))
|
|
4001
|
-
return t2.split(".")[0].trim() || undefined;
|
|
4002
|
-
};
|
|
4003
|
-
var te = (e2, t2) => e2?.trim() ? e2 : t2?.trim() ? t2 : "";
|
|
4004
|
-
var ne = (e2) => te(e2.variableName, e2.name);
|
|
4005
|
-
var re = (e2) => {
|
|
4006
|
-
let t2 = E(e2.decision.decisionTable), i = (n) => t2.has(ne(n)) ? n.requirementId ?? a("informationRequirement") : n.requirementFromSource ? n.requirementId : undefined, r = e2.inputData.map((n) => {
|
|
4007
|
-
let s = i(n);
|
|
4008
|
-
return s === n.requirementId ? n : { ...n, requirementId: s };
|
|
4009
|
-
});
|
|
4010
|
-
return r.some((n, s) => n !== e2.inputData[s]) ? { ...e2, inputData: r } : e2;
|
|
4011
|
-
};
|
|
4012
|
-
function ie() {
|
|
4013
|
-
let e2 = { id: a("output"), label: "Output 1", typeRef: "string" };
|
|
4014
|
-
return { ...e2, name: ee(e2, 0) };
|
|
4015
|
-
}
|
|
3911
|
+
var ee = (e, t) => e.name?.trim() || Z(e.label, t);
|
|
3912
|
+
var te = (e, t) => e?.trim() ? e : t?.trim() ? t : "";
|
|
4016
3913
|
export {
|
|
4017
|
-
j as DEFAULT_ANNOTATION_CLAUSE_NAME,
|
|
4018
|
-
W as DEFAULT_DECISION_NAME,
|
|
4019
|
-
X as EMPTY_OUTPUT_TEXT,
|
|
4020
|
-
Pe as FEEL_NAME_CHAR,
|
|
4021
|
-
z as MAESTRO_EXPORTER,
|
|
4022
|
-
K as createBusinessRuleIdentity,
|
|
4023
|
-
Y as createNewBusinessRuleModel,
|
|
4024
|
-
Ie as createSeededBusinessRuleModel,
|
|
4025
|
-
Me as expressionRoot,
|
|
4026
|
-
ne as inputDataIdentifier,
|
|
4027
|
-
Re as isEmptyOutputText,
|
|
4028
|
-
J as isFeelIdentifier,
|
|
4029
|
-
_e as normalizeIdentifierPath,
|
|
4030
3914
|
ee as outputArgumentName,
|
|
4031
|
-
|
|
4032
|
-
re as reconcileInputData,
|
|
4033
|
-
te as resolvedIdentifier,
|
|
4034
|
-
Ce as resultIsKeyedByClause
|
|
3915
|
+
te as resolvedIdentifier
|
|
4035
3916
|
};
|
|
4036
3917
|
|
|
4037
|
-
//# debugId=
|
|
3918
|
+
//# debugId=2D85A0FF3CC0B54F64756E2164756E21
|