interaqt 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +514 -559
- package/dist/index.js.map +1 -1
- package/dist/runtime/Controller.d.ts +6 -2
- package/dist/runtime/Controller.d.ts.map +1 -1
- package/dist/runtime/computations/StateMachine.d.ts +5 -27
- package/dist/runtime/computations/StateMachine.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +9 -8
- package/dist/runtime/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { uuidv7 as he } from "uuidv7";
|
|
2
|
-
import { parse as
|
|
3
|
-
import
|
|
4
|
-
import { AsyncLocalStorage as
|
|
5
|
-
import
|
|
6
|
-
import { PGlite as
|
|
2
|
+
import { parse as Ie } from "acorn";
|
|
3
|
+
import Ce from "better-sqlite3";
|
|
4
|
+
import { AsyncLocalStorage as xe } from "async_hooks";
|
|
5
|
+
import Me from "pg";
|
|
6
|
+
import { PGlite as $e } from "@electric-sql/pglite";
|
|
7
7
|
import se from "mysql2/promise";
|
|
8
8
|
function pe(u) {
|
|
9
9
|
return u !== null && typeof u == "object";
|
|
@@ -13,7 +13,7 @@ function fe(u) {
|
|
|
13
13
|
const t = Object.getPrototypeOf(u);
|
|
14
14
|
return t === null ? !0 : t === Object.prototype || t === null;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Pe(u, t) {
|
|
17
17
|
const e = {};
|
|
18
18
|
for (const i of u)
|
|
19
19
|
i && i[t] !== void 0 && (e[String(i[t])] = i);
|
|
@@ -22,15 +22,15 @@ function $e(u, t) {
|
|
|
22
22
|
function w(u) {
|
|
23
23
|
return typeof u == "function" ? `func::${u.toString()}` : Array.isArray(u) ? u : pe(u) && !fe(u) ? `uuid::${u.uuid}` : u;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Tt(u, t) {
|
|
26
26
|
if (u == null || typeof u != "object") return u;
|
|
27
|
-
if (Array.isArray(u)) return u.map((i) =>
|
|
27
|
+
if (Array.isArray(u)) return u.map((i) => Tt(i, t));
|
|
28
28
|
if (fe(u))
|
|
29
|
-
return Object.fromEntries(Object.entries(u).map(([i, r]) => [i,
|
|
29
|
+
return Object.fromEntries(Object.entries(u).map(([i, r]) => [i, Tt(r, t)]));
|
|
30
30
|
if (u instanceof Set)
|
|
31
|
-
return new Set(Array.from(u.values()).map((i) =>
|
|
31
|
+
return new Set(Array.from(u.values()).map((i) => Tt(i, t)));
|
|
32
32
|
if (u instanceof Map)
|
|
33
|
-
return new Map(Array.from(u.entries()).map(([i, r]) => [i,
|
|
33
|
+
return new Map(Array.from(u.entries()).map(([i, r]) => [i, Tt(r, t)]));
|
|
34
34
|
const e = u;
|
|
35
35
|
return t && e._type && e.constructor?.clone ? e.constructor.clone(u, t) : u;
|
|
36
36
|
}
|
|
@@ -40,24 +40,24 @@ function yr(...u) {
|
|
|
40
40
|
}
|
|
41
41
|
function gr() {
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
t && t.isKlass && t.displayName &&
|
|
43
|
+
const Vt = /* @__PURE__ */ new Map();
|
|
44
|
+
function Oe(u, t) {
|
|
45
|
+
t && t.isKlass && t.displayName && Vt.set(u, t);
|
|
46
46
|
}
|
|
47
47
|
function br() {
|
|
48
48
|
const u = [];
|
|
49
|
-
return Array.from(
|
|
49
|
+
return Array.from(Vt.entries()).forEach(([, t]) => {
|
|
50
50
|
t.instances && Array.isArray(t.instances) && t.stringify && u.push(...t.instances.map((e) => t.stringify(e)));
|
|
51
51
|
}), `[${u.join(",")}]`;
|
|
52
52
|
}
|
|
53
53
|
function Rr(u) {
|
|
54
54
|
const t = JSON.parse(u);
|
|
55
|
-
return
|
|
55
|
+
return De(t);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function De(u) {
|
|
58
58
|
const t = /* @__PURE__ */ new Map();
|
|
59
59
|
return u.forEach(({ type: e, options: i = {}, uuid: r, public: s }) => {
|
|
60
|
-
const a =
|
|
60
|
+
const a = Vt.get(e);
|
|
61
61
|
if (!a) {
|
|
62
62
|
console.warn(`Class ${e} not found in KlassByName`);
|
|
63
63
|
return;
|
|
@@ -91,14 +91,14 @@ class Nr {
|
|
|
91
91
|
return t !== null && typeof t == "object" && typeof t.uuid == "string";
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function S(u) {
|
|
95
95
|
return u?.uuid || he();
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const Fe = /^[a-zA-Z0-9_]+$/;
|
|
98
98
|
class x {
|
|
99
99
|
// for Merged Entity
|
|
100
100
|
constructor(t, e) {
|
|
101
|
-
this._type = "Entity", this._options = e, this.uuid =
|
|
101
|
+
this._type = "Entity", this._options = e, this.uuid = S(e), this.name = t.name, this.properties = t.properties || [], this.computation = t.computation, this.baseEntity = t.baseEntity, this.matchExpression = t.matchExpression, this.inputEntities = t.inputEntities;
|
|
102
102
|
}
|
|
103
103
|
static {
|
|
104
104
|
this.isKlass = !0;
|
|
@@ -115,7 +115,7 @@ class x {
|
|
|
115
115
|
type: "string",
|
|
116
116
|
required: !0,
|
|
117
117
|
constraints: {
|
|
118
|
-
nameFormat: ({ name: t }) =>
|
|
118
|
+
nameFormat: ({ name: t }) => Fe.test(t)
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
properties: {
|
|
@@ -196,11 +196,11 @@ class x {
|
|
|
196
196
|
return this.create(e.public, e.options);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
class
|
|
199
|
+
var Lt = /* @__PURE__ */ ((u) => (u.String = "string", u.Number = "number", u.Boolean = "boolean", u.Timestamp = "timestamp", u))(Lt || {});
|
|
200
|
+
const Qe = /^[a-zA-Z0-9_]+$/;
|
|
201
|
+
class qt {
|
|
202
202
|
constructor(t, e) {
|
|
203
|
-
this._type = "Dictionary", this._options = e, this.uuid =
|
|
203
|
+
this._type = "Dictionary", this._options = e, this.uuid = S(e), this.name = t.name, this.type = t.type, this.collection = t.collection ?? !1, this.args = t.args, this.defaultValue = t.defaultValue, this.computation = t.computation;
|
|
204
204
|
}
|
|
205
205
|
static {
|
|
206
206
|
this.isKlass = !0;
|
|
@@ -218,7 +218,7 @@ class Vt {
|
|
|
218
218
|
required: !0,
|
|
219
219
|
collection: !1,
|
|
220
220
|
constraints: {
|
|
221
|
-
format: ({ name: t }) =>
|
|
221
|
+
format: ({ name: t }) => Qe.test(t),
|
|
222
222
|
length: ({ name: t }) => t.length > 1 && t.length < 5
|
|
223
223
|
}
|
|
224
224
|
},
|
|
@@ -226,7 +226,7 @@ class Vt {
|
|
|
226
226
|
type: "string",
|
|
227
227
|
required: !0,
|
|
228
228
|
collection: !1,
|
|
229
|
-
options: Array.from(Object.values(
|
|
229
|
+
options: Array.from(Object.values(Lt))
|
|
230
230
|
},
|
|
231
231
|
collection: {
|
|
232
232
|
type: "boolean",
|
|
@@ -252,7 +252,7 @@ class Vt {
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
static create(t, e) {
|
|
255
|
-
const i = new
|
|
255
|
+
const i = new qt(t, e);
|
|
256
256
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
257
257
|
throw new Error(`duplicate uuid in options ${i.uuid}, Dictionary`);
|
|
258
258
|
return this.instances.push(i), i;
|
|
@@ -291,10 +291,10 @@ class Vt {
|
|
|
291
291
|
return this.create(e.public, e.options);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
const
|
|
295
|
-
class
|
|
294
|
+
const Ve = /^[a-zA-Z0-9_]+$/;
|
|
295
|
+
class T {
|
|
296
296
|
constructor(t, e) {
|
|
297
|
-
this._type = "Property", this._options = e, this.uuid =
|
|
297
|
+
this._type = "Property", this._options = e, this.uuid = S(e), this.name = t.name, this.type = t.type, this.collection = t.collection, this.defaultValue = t.defaultValue, this.computed = t.computed, this.computation = t.computation;
|
|
298
298
|
}
|
|
299
299
|
static {
|
|
300
300
|
this.isKlass = !0;
|
|
@@ -311,14 +311,14 @@ class S {
|
|
|
311
311
|
type: "string",
|
|
312
312
|
required: !0,
|
|
313
313
|
constraints: {
|
|
314
|
-
format: ({ name: t }) =>
|
|
314
|
+
format: ({ name: t }) => Ve.test(t),
|
|
315
315
|
length: ({ name: t }) => t.length > 1 && t.length < 5
|
|
316
316
|
}
|
|
317
317
|
},
|
|
318
318
|
type: {
|
|
319
319
|
type: "string",
|
|
320
320
|
required: !0,
|
|
321
|
-
options: () => Object.values(
|
|
321
|
+
options: () => Object.values(Lt)
|
|
322
322
|
},
|
|
323
323
|
collection: {
|
|
324
324
|
type: "boolean",
|
|
@@ -340,7 +340,7 @@ class S {
|
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
342
|
static create(t, e) {
|
|
343
|
-
const i = new
|
|
343
|
+
const i = new T(t, e);
|
|
344
344
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
345
345
|
throw new Error(`duplicate uuid in options ${i.uuid}, Property`);
|
|
346
346
|
return this.instances.push(i), i;
|
|
@@ -378,9 +378,9 @@ class S {
|
|
|
378
378
|
return i.defaultValue && typeof i.defaultValue == "string" && i.defaultValue.startsWith("func::") && (i.defaultValue = new Function("return " + i.defaultValue.substring(6))()), i.computed && typeof i.computed == "string" && i.computed.startsWith("func::") && (i.computed = new Function("return " + i.computed.substring(6))()), this.create(i, e.options);
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
class
|
|
381
|
+
class O {
|
|
382
382
|
constructor(t, e) {
|
|
383
|
-
if (this._type = "Relation", this._options = e, this.uuid =
|
|
383
|
+
if (this._type = "Relation", this._options = e, this.uuid = S(e), t.inputRelations) {
|
|
384
384
|
if (!t.inputRelations || t.inputRelations.length === 0)
|
|
385
385
|
throw new Error("Merged relation must have at least one inputRelation");
|
|
386
386
|
if (!t.sourceProperty || !t.targetProperty)
|
|
@@ -410,7 +410,7 @@ class $ {
|
|
|
410
410
|
// for Merged Relation
|
|
411
411
|
// Getter for name that returns computed name if _name is undefined
|
|
412
412
|
get name() {
|
|
413
|
-
return this._name !== void 0 ? this._name :
|
|
413
|
+
return this._name !== void 0 ? this._name : O.public.name.computed ? O.public.name.computed(this) : void 0;
|
|
414
414
|
}
|
|
415
415
|
// Setter for name
|
|
416
416
|
set name(t) {
|
|
@@ -510,7 +510,7 @@ class $ {
|
|
|
510
510
|
};
|
|
511
511
|
}
|
|
512
512
|
static create(t, e) {
|
|
513
|
-
const i = new
|
|
513
|
+
const i = new O(t, e);
|
|
514
514
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
515
515
|
throw new Error(`duplicate uuid in options ${i.uuid}, Relation`);
|
|
516
516
|
return this.instances.push(i), i;
|
|
@@ -540,11 +540,11 @@ class $ {
|
|
|
540
540
|
targetProperty: t.targetProperty,
|
|
541
541
|
isTargetReliance: t.isTargetReliance,
|
|
542
542
|
type: t.type,
|
|
543
|
-
properties: t.properties?.map((s) =>
|
|
543
|
+
properties: t.properties?.map((s) => T.clone(s, e))
|
|
544
544
|
};
|
|
545
545
|
t.inputRelations || (i.source = t.source, i.target = t.target);
|
|
546
546
|
const r = t._name ?? t.name;
|
|
547
|
-
return r !== void 0 && (i.name = r), t.computation !== void 0 && (i.computation = t.computation), t.baseRelation !== void 0 && (i.baseRelation = t.baseRelation), t.matchExpression !== void 0 && (i.matchExpression = t.matchExpression), t.inputRelations !== void 0 && (i.inputRelations = t.inputRelations), new
|
|
547
|
+
return r !== void 0 && (i.name = r), t.computation !== void 0 && (i.computation = t.computation), t.baseRelation !== void 0 && (i.baseRelation = t.baseRelation), t.matchExpression !== void 0 && (i.matchExpression = t.matchExpression), t.inputRelations !== void 0 && (i.inputRelations = t.inputRelations), new O(i, t._options);
|
|
548
548
|
}
|
|
549
549
|
static is(t) {
|
|
550
550
|
return t !== null && typeof t == "object" && "_type" in t && t._type === "Relation";
|
|
@@ -557,9 +557,9 @@ class $ {
|
|
|
557
557
|
return this.create(e.public, e.options);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
class
|
|
560
|
+
class _t {
|
|
561
561
|
constructor(t, e) {
|
|
562
|
-
this._type = "Interaction", this._options = e, this.uuid =
|
|
562
|
+
this._type = "Interaction", this._options = e, this.uuid = S(e), this.name = t.name, this.conditions = t.conditions, this.userAttributives = t.userAttributives, this.userRef = t.userRef, this.action = t.action, this.payload = t.payload, this.sideEffects = t.sideEffects || [], this.data = t.data, this.query = t.query;
|
|
563
563
|
}
|
|
564
564
|
static {
|
|
565
565
|
this.isKlass = !0;
|
|
@@ -618,7 +618,7 @@ class Lt {
|
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
static create(t, e) {
|
|
621
|
-
const i = new
|
|
621
|
+
const i = new _t(t, e);
|
|
622
622
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
623
623
|
throw new Error(`duplicate uuid in options ${i.uuid}, Interaction`);
|
|
624
624
|
return this.instances.push(i), i;
|
|
@@ -655,9 +655,9 @@ class Lt {
|
|
|
655
655
|
return this.create(e.public, e.options);
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
class
|
|
658
|
+
class Bt {
|
|
659
659
|
constructor(t, e) {
|
|
660
|
-
this._type = "Activity", this._options = e, this.uuid =
|
|
660
|
+
this._type = "Activity", this._options = e, this.uuid = S(e), this.name = t.name, this.interactions = t.interactions || [], this.gateways = t.gateways || [], this.transfers = t.transfers || [], this.groups = t.groups || [], this.events = t.events || [];
|
|
661
661
|
}
|
|
662
662
|
static {
|
|
663
663
|
this.isKlass = !0;
|
|
@@ -703,7 +703,7 @@ class qt {
|
|
|
703
703
|
};
|
|
704
704
|
}
|
|
705
705
|
static create(t, e) {
|
|
706
|
-
const i = new
|
|
706
|
+
const i = new Bt(t, e);
|
|
707
707
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
708
708
|
throw new Error(`duplicate uuid in options ${i.uuid}, Activity`);
|
|
709
709
|
return this.instances.push(i), i;
|
|
@@ -743,7 +743,7 @@ class qt {
|
|
|
743
743
|
}
|
|
744
744
|
class st {
|
|
745
745
|
constructor(t, e) {
|
|
746
|
-
this._type = "ActivityGroup", this._options = e, this.uuid =
|
|
746
|
+
this._type = "ActivityGroup", this._options = e, this.uuid = S(e), this.type = t.type, this.activities = t.activities || [];
|
|
747
747
|
}
|
|
748
748
|
static {
|
|
749
749
|
this.isKlass = !0;
|
|
@@ -806,7 +806,7 @@ class st {
|
|
|
806
806
|
}
|
|
807
807
|
class me {
|
|
808
808
|
constructor(t, e) {
|
|
809
|
-
this._type = "Transfer", this._options = e, this.uuid =
|
|
809
|
+
this._type = "Transfer", this._options = e, this.uuid = S(e), this.name = t.name, this.source = t.source, this.target = t.target;
|
|
810
810
|
}
|
|
811
811
|
static {
|
|
812
812
|
this.isKlass = !0;
|
|
@@ -887,7 +887,7 @@ function Sr(u) {
|
|
|
887
887
|
}
|
|
888
888
|
class lt {
|
|
889
889
|
constructor(t, e) {
|
|
890
|
-
this._type = "BoolAtomData", this._options = e, this.uuid =
|
|
890
|
+
this._type = "BoolAtomData", this._options = e, this.uuid = S(e), this.type = t.type || "atom", this.data = t.data;
|
|
891
891
|
}
|
|
892
892
|
static {
|
|
893
893
|
this.isKlass = !0;
|
|
@@ -950,7 +950,7 @@ class lt {
|
|
|
950
950
|
}
|
|
951
951
|
class ut {
|
|
952
952
|
constructor(t, e) {
|
|
953
|
-
this._type = "BoolExpressionData", this._options = e, this.uuid =
|
|
953
|
+
this._type = "BoolExpressionData", this._options = e, this.uuid = S(e), this.type = t.type || "expression", this.operator = t.operator || "and", this.left = t.left, this.right = t.right;
|
|
954
954
|
}
|
|
955
955
|
static {
|
|
956
956
|
this.isKlass = !0;
|
|
@@ -1161,21 +1161,21 @@ class R {
|
|
|
1161
1161
|
throw new Error(`invalid bool expression type: ${JSON.stringify(this.raw)}`);
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
const
|
|
1164
|
+
const Le = {
|
|
1165
1165
|
"&&": "and",
|
|
1166
1166
|
"||": "or",
|
|
1167
1167
|
"!": "not"
|
|
1168
1168
|
};
|
|
1169
|
-
function
|
|
1169
|
+
function qe(u) {
|
|
1170
1170
|
return { key: u };
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function St(u, t, e) {
|
|
1173
1173
|
if (u.type === "LogicalExpression")
|
|
1174
1174
|
return {
|
|
1175
1175
|
type: "expression",
|
|
1176
|
-
operator:
|
|
1177
|
-
left:
|
|
1178
|
-
right:
|
|
1176
|
+
operator: Le[u.operator],
|
|
1177
|
+
left: St(u.left, t, e),
|
|
1178
|
+
right: St(u.right, t, e)
|
|
1179
1179
|
};
|
|
1180
1180
|
if (u.type === "Identifier")
|
|
1181
1181
|
return {
|
|
@@ -1186,19 +1186,19 @@ function Tt(u, t, e) {
|
|
|
1186
1186
|
return {
|
|
1187
1187
|
type: "expression",
|
|
1188
1188
|
operator: "not",
|
|
1189
|
-
left:
|
|
1189
|
+
left: St(u.argument, t, e)
|
|
1190
1190
|
};
|
|
1191
1191
|
throw new Error("unknown ast node type");
|
|
1192
1192
|
}
|
|
1193
|
-
function vr(u, t = [], e =
|
|
1194
|
-
const i =
|
|
1193
|
+
function vr(u, t = [], e = qe) {
|
|
1194
|
+
const i = Pe(t, "name"), r = Ie(u, { ecmaVersion: 2020 });
|
|
1195
1195
|
return new R(
|
|
1196
|
-
|
|
1196
|
+
St(r.body[0].expression, i, e)
|
|
1197
1197
|
);
|
|
1198
1198
|
}
|
|
1199
|
-
class
|
|
1199
|
+
class j {
|
|
1200
1200
|
constructor(t, e) {
|
|
1201
|
-
this._type = "Attributive", this._options = e, this.uuid =
|
|
1201
|
+
this._type = "Attributive", this._options = e, this.uuid = S(e), this.stringContent = t.stringContent, this.content = t.content, this.name = t.name, this.isRef = t.isRef;
|
|
1202
1202
|
}
|
|
1203
1203
|
static {
|
|
1204
1204
|
this.isKlass = !0;
|
|
@@ -1228,7 +1228,7 @@ class H {
|
|
|
1228
1228
|
};
|
|
1229
1229
|
}
|
|
1230
1230
|
static create(t, e) {
|
|
1231
|
-
const i = new
|
|
1231
|
+
const i = new j(t, e);
|
|
1232
1232
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1233
1233
|
throw new Error(`duplicate uuid in options ${i.uuid}, Attributive`);
|
|
1234
1234
|
return this.instances.push(i), i;
|
|
@@ -1266,7 +1266,7 @@ class H {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
class at {
|
|
1268
1268
|
constructor(t, e) {
|
|
1269
|
-
this._type = "Attributives", this._options = e, this.uuid =
|
|
1269
|
+
this._type = "Attributives", this._options = e, this.uuid = S(e), this.content = t.content;
|
|
1270
1270
|
}
|
|
1271
1271
|
static {
|
|
1272
1272
|
this.isKlass = !0;
|
|
@@ -1318,7 +1318,7 @@ class at {
|
|
|
1318
1318
|
return this.create(e.public, e.options);
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Dt(u) {
|
|
1322
1322
|
if (!u) return;
|
|
1323
1323
|
if (u.raw.type === "atom")
|
|
1324
1324
|
return lt.create({
|
|
@@ -1329,18 +1329,18 @@ function Ot(u) {
|
|
|
1329
1329
|
return ut.create({
|
|
1330
1330
|
type: "expression",
|
|
1331
1331
|
operator: t.operator,
|
|
1332
|
-
left:
|
|
1333
|
-
right:
|
|
1332
|
+
left: Dt(u.left),
|
|
1333
|
+
right: Dt(u.right)
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
1336
|
function kr(u) {
|
|
1337
1337
|
return at.create({
|
|
1338
|
-
content:
|
|
1338
|
+
content: Dt(u)
|
|
1339
1339
|
});
|
|
1340
1340
|
}
|
|
1341
|
-
class
|
|
1341
|
+
class Wt {
|
|
1342
1342
|
constructor(t, e) {
|
|
1343
|
-
this._type = "Condition", this._options = e, this.uuid =
|
|
1343
|
+
this._type = "Condition", this._options = e, this.uuid = S(e), this.content = t.content, this.name = t.name;
|
|
1344
1344
|
}
|
|
1345
1345
|
static {
|
|
1346
1346
|
this.isKlass = !0;
|
|
@@ -1364,7 +1364,7 @@ class _t {
|
|
|
1364
1364
|
};
|
|
1365
1365
|
}
|
|
1366
1366
|
static create(t, e) {
|
|
1367
|
-
const i = new
|
|
1367
|
+
const i = new Wt(t, e);
|
|
1368
1368
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1369
1369
|
throw new Error(`duplicate uuid in options ${i.uuid}, Condition`);
|
|
1370
1370
|
return this.instances.push(i), i;
|
|
@@ -1398,9 +1398,9 @@ class _t {
|
|
|
1398
1398
|
return i.content && typeof i.content == "string" && i.content.startsWith("func::") && (i.content = new Function("return " + i.content.substring(6))()), this.create(i, e.options);
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
|
-
class
|
|
1401
|
+
class Jt {
|
|
1402
1402
|
constructor(t, e) {
|
|
1403
|
-
this._type = "DataAttributive", this._options = e, this.uuid =
|
|
1403
|
+
this._type = "DataAttributive", this._options = e, this.uuid = S(e), this.content = t.content, this.name = t.name;
|
|
1404
1404
|
}
|
|
1405
1405
|
static {
|
|
1406
1406
|
this.isKlass = !0;
|
|
@@ -1424,7 +1424,7 @@ class Bt {
|
|
|
1424
1424
|
};
|
|
1425
1425
|
}
|
|
1426
1426
|
static create(t, e) {
|
|
1427
|
-
const i = new
|
|
1427
|
+
const i = new Jt(t, e);
|
|
1428
1428
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1429
1429
|
throw new Error(`duplicate uuid in options ${i.uuid}, DataAttributive`);
|
|
1430
1430
|
return this.instances.push(i), i;
|
|
@@ -1460,7 +1460,7 @@ class Bt {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
class ge {
|
|
1462
1462
|
constructor(t, e) {
|
|
1463
|
-
this._type = "QueryItem", this._options = e, this.uuid =
|
|
1463
|
+
this._type = "QueryItem", this._options = e, this.uuid = S(e), this.name = t.name, this.value = t.value;
|
|
1464
1464
|
}
|
|
1465
1465
|
static {
|
|
1466
1466
|
this.isKlass = !0;
|
|
@@ -1522,7 +1522,7 @@ class ge {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
class be {
|
|
1524
1524
|
constructor(t, e) {
|
|
1525
|
-
this._type = "Query", this._options = e, this.uuid =
|
|
1525
|
+
this._type = "Query", this._options = e, this.uuid = S(e), this.items = t.items;
|
|
1526
1526
|
}
|
|
1527
1527
|
static {
|
|
1528
1528
|
this.isKlass = !0;
|
|
@@ -1575,9 +1575,9 @@ class be {
|
|
|
1575
1575
|
return this.create(e.public, e.options);
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
|
-
class
|
|
1578
|
+
class Ct {
|
|
1579
1579
|
constructor(t, e) {
|
|
1580
|
-
this._type = "Action", this._options = e, this.uuid =
|
|
1580
|
+
this._type = "Action", this._options = e, this.uuid = S(e), this.name = t.name;
|
|
1581
1581
|
}
|
|
1582
1582
|
static {
|
|
1583
1583
|
this.isKlass = !0;
|
|
@@ -1597,7 +1597,7 @@ class It {
|
|
|
1597
1597
|
};
|
|
1598
1598
|
}
|
|
1599
1599
|
static create(t, e) {
|
|
1600
|
-
const i = new
|
|
1600
|
+
const i = new Ct(t, e);
|
|
1601
1601
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1602
1602
|
throw new Error(`duplicate uuid in options ${i.uuid}, Action`);
|
|
1603
1603
|
return this.instances.push(i), i;
|
|
@@ -1629,10 +1629,10 @@ class It {
|
|
|
1629
1629
|
return this.create(e.public, e.options);
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
|
-
const
|
|
1632
|
+
const _e = Ct.create({ name: "get" });
|
|
1633
1633
|
class ot {
|
|
1634
1634
|
constructor(t, e) {
|
|
1635
|
-
this._type = "Gateway", this._options = e, this.uuid =
|
|
1635
|
+
this._type = "Gateway", this._options = e, this.uuid = S(e), this.name = t.name;
|
|
1636
1636
|
}
|
|
1637
1637
|
static {
|
|
1638
1638
|
this.isKlass = !0;
|
|
@@ -1684,9 +1684,9 @@ class ot {
|
|
|
1684
1684
|
return this.create(e.public, e.options);
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
|
-
class
|
|
1687
|
+
class jt {
|
|
1688
1688
|
constructor(t, e) {
|
|
1689
|
-
this._type = "Event", this._options = e, this.uuid =
|
|
1689
|
+
this._type = "Event", this._options = e, this.uuid = S(e), this.name = t.name;
|
|
1690
1690
|
}
|
|
1691
1691
|
static {
|
|
1692
1692
|
this.isKlass = !0;
|
|
@@ -1706,7 +1706,7 @@ class Wt {
|
|
|
1706
1706
|
};
|
|
1707
1707
|
}
|
|
1708
1708
|
static create(t, e) {
|
|
1709
|
-
const i = new
|
|
1709
|
+
const i = new jt(t, e);
|
|
1710
1710
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1711
1711
|
throw new Error(`duplicate uuid in options ${i.uuid}, Event`);
|
|
1712
1712
|
return this.instances.push(i), i;
|
|
@@ -1738,9 +1738,9 @@ class Wt {
|
|
|
1738
1738
|
return this.create(e.public, e.options);
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
|
-
class
|
|
1741
|
+
class Z {
|
|
1742
1742
|
constructor(t, e) {
|
|
1743
|
-
this._type = "StateNode", this._options = e, this.uuid =
|
|
1743
|
+
this._type = "StateNode", this._options = e, this.uuid = S(e), this.name = t.name, this.computeValue = t.computeValue;
|
|
1744
1744
|
}
|
|
1745
1745
|
static {
|
|
1746
1746
|
this.isKlass = !0;
|
|
@@ -1766,7 +1766,7 @@ class Jt {
|
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
1768
|
static create(t, e) {
|
|
1769
|
-
const i = new
|
|
1769
|
+
const i = new Z(t, e);
|
|
1770
1770
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1771
1771
|
throw new Error(`duplicate uuid in options ${i.uuid}, StateNode`);
|
|
1772
1772
|
return this.instances.push(i), i;
|
|
@@ -1801,9 +1801,9 @@ class Jt {
|
|
|
1801
1801
|
return this.create(e.public, e.options);
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
|
-
class
|
|
1804
|
+
class Ht {
|
|
1805
1805
|
constructor(t, e) {
|
|
1806
|
-
this._type = "StateTransfer", this._options = e, this.uuid =
|
|
1806
|
+
this._type = "StateTransfer", this._options = e, this.uuid = S(e), this.trigger = t.trigger, this.current = t.current, this.next = t.next, this.computeTarget = t.computeTarget;
|
|
1807
1807
|
}
|
|
1808
1808
|
static {
|
|
1809
1809
|
this.isKlass = !0;
|
|
@@ -1839,7 +1839,7 @@ class jt {
|
|
|
1839
1839
|
};
|
|
1840
1840
|
}
|
|
1841
1841
|
static create(t, e) {
|
|
1842
|
-
const i = new
|
|
1842
|
+
const i = new Ht(t, e);
|
|
1843
1843
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1844
1844
|
throw new Error(`duplicate uuid in options ${i.uuid}, StateTransfer`);
|
|
1845
1845
|
return this.instances.push(i), i;
|
|
@@ -1878,9 +1878,9 @@ class jt {
|
|
|
1878
1878
|
return this.create(e.public, e.options);
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
|
-
class
|
|
1881
|
+
class dt {
|
|
1882
1882
|
constructor(t, e) {
|
|
1883
|
-
this._type = "StateMachine", this._options = e, this.uuid =
|
|
1883
|
+
this._type = "StateMachine", this._options = e, this.uuid = S(e), this.states = t.states, this.transfers = t.transfers, this.defaultState = t.defaultState;
|
|
1884
1884
|
}
|
|
1885
1885
|
static {
|
|
1886
1886
|
this.isKlass = !0;
|
|
@@ -1911,7 +1911,7 @@ class Z {
|
|
|
1911
1911
|
};
|
|
1912
1912
|
}
|
|
1913
1913
|
static create(t, e) {
|
|
1914
|
-
const i = new
|
|
1914
|
+
const i = new dt(t, e);
|
|
1915
1915
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
1916
1916
|
throw new Error(`duplicate uuid in options ${i.uuid}, StateMachine`);
|
|
1917
1917
|
return this.instances.push(i), i;
|
|
@@ -1947,9 +1947,9 @@ class Z {
|
|
|
1947
1947
|
return this.create(e.public, e.options);
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
|
-
class
|
|
1950
|
+
class ht {
|
|
1951
1951
|
constructor(t, e) {
|
|
1952
|
-
this._type = "WeightedSummation", this._options = e, this.uuid =
|
|
1952
|
+
this._type = "WeightedSummation", this._options = e, this.uuid = S(e), this.record = t.record, this.property = t.property, this.direction = t.direction, this.callback = t.callback, this.attributeQuery = t.attributeQuery, this.dataDeps = t.dataDeps;
|
|
1953
1953
|
}
|
|
1954
1954
|
static {
|
|
1955
1955
|
this.isKlass = !0;
|
|
@@ -1995,7 +1995,7 @@ class dt {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
}
|
|
1997
1997
|
static create(t, e) {
|
|
1998
|
-
const i = new
|
|
1998
|
+
const i = new ht(t, e);
|
|
1999
1999
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2000
2000
|
throw new Error(`duplicate uuid in options ${i.uuid}, WeightedSummation`);
|
|
2001
2001
|
return this.instances.push(i), i;
|
|
@@ -2037,9 +2037,9 @@ class dt {
|
|
|
2037
2037
|
return i.callback && typeof i.callback == "string" && i.callback.startsWith("func::") && (i.callback = new Function("return " + i.callback.substring(6))()), this.create(i, e.options);
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
-
class
|
|
2040
|
+
class pt {
|
|
2041
2041
|
constructor(t, e) {
|
|
2042
|
-
this._type = "Count", this._options = e, this.uuid =
|
|
2042
|
+
this._type = "Count", this._options = e, this.uuid = S(e), this.record = t.record, this.property = t.property, this.direction = t.direction, this.callback = t.callback, this.attributeQuery = t.attributeQuery, this.dataDeps = t.dataDeps;
|
|
2043
2043
|
}
|
|
2044
2044
|
static {
|
|
2045
2045
|
this.isKlass = !0;
|
|
@@ -2080,7 +2080,7 @@ class ht {
|
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
2082
2082
|
static create(t, e) {
|
|
2083
|
-
const i = new
|
|
2083
|
+
const i = new pt(t, e);
|
|
2084
2084
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2085
2085
|
throw new Error(`duplicate uuid in options ${i.uuid}, Count`);
|
|
2086
2086
|
return this.instances.push(i), i;
|
|
@@ -2102,7 +2102,7 @@ class ht {
|
|
|
2102
2102
|
}
|
|
2103
2103
|
static clone(t, e) {
|
|
2104
2104
|
let i = t.record;
|
|
2105
|
-
return e && (x.is(t.record) ? i = x.clone(t.record, e) :
|
|
2105
|
+
return e && (x.is(t.record) ? i = x.clone(t.record, e) : O.is(t.record) && (i = O.clone(t.record, e))), this.create({
|
|
2106
2106
|
record: i,
|
|
2107
2107
|
direction: t.direction,
|
|
2108
2108
|
callback: t.callback,
|
|
@@ -2121,9 +2121,9 @@ class ht {
|
|
|
2121
2121
|
return i.callback && typeof i.callback == "string" && i.callback.startsWith("func::") && (i.callback = new Function("return " + i.callback.substring(6))()), this.create(i, e.options);
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
2124
|
-
class
|
|
2124
|
+
class ft {
|
|
2125
2125
|
constructor(t, e) {
|
|
2126
|
-
this._type = "Summation", this._options = e, this.uuid =
|
|
2126
|
+
this._type = "Summation", this._options = e, this.uuid = S(e), this.record = t.record, this.property = t.property, this.direction = t.direction, this.attributeQuery = t.attributeQuery;
|
|
2127
2127
|
}
|
|
2128
2128
|
static {
|
|
2129
2129
|
this.isKlass = !0;
|
|
@@ -2154,7 +2154,7 @@ class pt {
|
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
2156
|
static create(t, e) {
|
|
2157
|
-
const i = new
|
|
2157
|
+
const i = new ft(t, e);
|
|
2158
2158
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2159
2159
|
throw new Error(`duplicate uuid in options ${i.uuid}, Summation`);
|
|
2160
2160
|
return this.instances.push(i), i;
|
|
@@ -2189,9 +2189,9 @@ class pt {
|
|
|
2189
2189
|
return this.create(e.public, e.options);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
|
-
class
|
|
2192
|
+
class mt {
|
|
2193
2193
|
constructor(t, e) {
|
|
2194
|
-
this._type = "Average", this._options = e, this.uuid =
|
|
2194
|
+
this._type = "Average", this._options = e, this.uuid = S(e), this.record = t.record, this.property = t.property, this.direction = t.direction, this.attributeQuery = t.attributeQuery;
|
|
2195
2195
|
}
|
|
2196
2196
|
static {
|
|
2197
2197
|
this.isKlass = !0;
|
|
@@ -2222,7 +2222,7 @@ class ft {
|
|
|
2222
2222
|
};
|
|
2223
2223
|
}
|
|
2224
2224
|
static create(t, e) {
|
|
2225
|
-
const i = new
|
|
2225
|
+
const i = new mt(t, e);
|
|
2226
2226
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2227
2227
|
throw new Error(`duplicate uuid in options ${i.uuid}, Average`);
|
|
2228
2228
|
return this.instances.push(i), i;
|
|
@@ -2257,9 +2257,9 @@ class ft {
|
|
|
2257
2257
|
return this.create(e.public, e.options);
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
2260
|
-
class
|
|
2260
|
+
class yt {
|
|
2261
2261
|
constructor(t, e) {
|
|
2262
|
-
this._type = "Every", this._options = e, this.uuid =
|
|
2262
|
+
this._type = "Every", this._options = e, this.uuid = S(e), this.record = t.record, this.property = t.property, this.direction = t.direction, this.callback = t.callback, this.attributeQuery = t.attributeQuery, this.dataDeps = t.dataDeps, this.notEmpty = t.notEmpty;
|
|
2263
2263
|
}
|
|
2264
2264
|
static {
|
|
2265
2265
|
this.isKlass = !0;
|
|
@@ -2305,7 +2305,7 @@ class mt {
|
|
|
2305
2305
|
};
|
|
2306
2306
|
}
|
|
2307
2307
|
static create(t, e) {
|
|
2308
|
-
const i = new
|
|
2308
|
+
const i = new yt(t, e);
|
|
2309
2309
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2310
2310
|
throw new Error(`duplicate uuid in options ${i.uuid}, Every`);
|
|
2311
2311
|
return this.instances.push(i), i;
|
|
@@ -2342,9 +2342,9 @@ class mt {
|
|
|
2342
2342
|
return i.callback && typeof i.callback == "string" && i.callback.startsWith("func::") && (i.callback = new Function("return " + i.callback.substring(6))()), this.create(i, e.options);
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
|
-
class
|
|
2345
|
+
class gt {
|
|
2346
2346
|
constructor(t, e) {
|
|
2347
|
-
this._type = "Any", this._options = e, this.uuid =
|
|
2347
|
+
this._type = "Any", this._options = e, this.uuid = S(e), this.record = t.record, this.property = t.property, this.direction = t.direction, this.callback = t.callback, this.attributeQuery = t.attributeQuery, this.dataDeps = t.dataDeps;
|
|
2348
2348
|
}
|
|
2349
2349
|
static {
|
|
2350
2350
|
this.isKlass = !0;
|
|
@@ -2390,7 +2390,7 @@ class yt {
|
|
|
2390
2390
|
};
|
|
2391
2391
|
}
|
|
2392
2392
|
static create(t, e) {
|
|
2393
|
-
const i = new
|
|
2393
|
+
const i = new gt(t, e);
|
|
2394
2394
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2395
2395
|
throw new Error(`duplicate uuid in options ${i.uuid}, Any`);
|
|
2396
2396
|
return this.instances.push(i), i;
|
|
@@ -2432,9 +2432,9 @@ class yt {
|
|
|
2432
2432
|
return i.callback && typeof i.callback == "string" && i.callback.startsWith("func::") && (i.callback = new Function("return " + i.callback.substring(6))()), this.create(i, e.options);
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
|
-
class
|
|
2435
|
+
class xt {
|
|
2436
2436
|
constructor(t, e) {
|
|
2437
|
-
this._type = "Transform", this._options = e, this.uuid =
|
|
2437
|
+
this._type = "Transform", this._options = e, this.uuid = S(e), this.record = t.record, this.attributeQuery = t.attributeQuery, this.callback = t.callback;
|
|
2438
2438
|
}
|
|
2439
2439
|
static {
|
|
2440
2440
|
this.isKlass = !0;
|
|
@@ -2465,7 +2465,7 @@ class Ct {
|
|
|
2465
2465
|
};
|
|
2466
2466
|
}
|
|
2467
2467
|
static create(t, e) {
|
|
2468
|
-
const i = new
|
|
2468
|
+
const i = new xt(t, e);
|
|
2469
2469
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2470
2470
|
throw new Error(`duplicate uuid in options ${i.uuid}, Transform`);
|
|
2471
2471
|
return this.instances.push(i), i;
|
|
@@ -2502,9 +2502,9 @@ class Ct {
|
|
|
2502
2502
|
return typeof i.callback == "string" && i.callback.startsWith("func::") && (i.callback = new Function("return " + i.callback.substring(6))()), this.create(i, e.options);
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
2505
|
-
class
|
|
2505
|
+
class bt {
|
|
2506
2506
|
constructor(t, e) {
|
|
2507
|
-
this._type = "RealTimeValue", this._options = e, this.uuid =
|
|
2507
|
+
this._type = "RealTimeValue", this._options = e, this.uuid = S(e), this.attributeQuery = t.attributeQuery, this.dataDeps = t.dataDeps, this.nextRecomputeTime = t.nextRecomputeTime, this.callback = t.callback;
|
|
2508
2508
|
}
|
|
2509
2509
|
static {
|
|
2510
2510
|
this.isKlass = !0;
|
|
@@ -2540,7 +2540,7 @@ class gt {
|
|
|
2540
2540
|
};
|
|
2541
2541
|
}
|
|
2542
2542
|
static create(t, e) {
|
|
2543
|
-
const i = new
|
|
2543
|
+
const i = new bt(t, e);
|
|
2544
2544
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2545
2545
|
throw new Error(`duplicate uuid in options ${i.uuid}, RealTimeValue`);
|
|
2546
2546
|
return this.instances.push(i), i;
|
|
@@ -2575,9 +2575,9 @@ class gt {
|
|
|
2575
2575
|
return typeof i.callback == "string" && i.callback.startsWith("func::") && (i.callback = new Function("return " + i.callback.substring(6))()), typeof i.nextRecomputeTime == "string" && i.nextRecomputeTime.startsWith("func::") && (i.nextRecomputeTime = new Function("return " + i.nextRecomputeTime.substring(6))()), this.create(i, e.options);
|
|
2576
2576
|
}
|
|
2577
2577
|
}
|
|
2578
|
-
class
|
|
2578
|
+
class Ut {
|
|
2579
2579
|
constructor(t, e) {
|
|
2580
|
-
this._type = "PayloadItem", this._options = e, this.uuid =
|
|
2580
|
+
this._type = "PayloadItem", this._options = e, this.uuid = S(e), this.name = t.name, this.attributives = t.attributives, this.base = t.base, this.isRef = t.isRef ?? !1, this.required = t.required ?? !1, this.isCollection = t.isCollection ?? !1, this.itemRef = t.itemRef;
|
|
2581
2581
|
}
|
|
2582
2582
|
static {
|
|
2583
2583
|
this.isKlass = !0;
|
|
@@ -2626,7 +2626,7 @@ class Ht {
|
|
|
2626
2626
|
};
|
|
2627
2627
|
}
|
|
2628
2628
|
static create(t, e) {
|
|
2629
|
-
const i = new
|
|
2629
|
+
const i = new Ut(t, e);
|
|
2630
2630
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2631
2631
|
throw new Error(`duplicate uuid in options ${i.uuid}, PayloadItem`);
|
|
2632
2632
|
return this.instances.push(i), i;
|
|
@@ -2664,9 +2664,9 @@ class Ht {
|
|
|
2664
2664
|
return this.create(e.public, e.options);
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
|
-
class
|
|
2667
|
+
class Gt {
|
|
2668
2668
|
constructor(t, e) {
|
|
2669
|
-
this._type = "Payload", this._options = e, this.uuid =
|
|
2669
|
+
this._type = "Payload", this._options = e, this.uuid = S(e), this.items = t.items || [];
|
|
2670
2670
|
}
|
|
2671
2671
|
static {
|
|
2672
2672
|
this.isKlass = !0;
|
|
@@ -2688,7 +2688,7 @@ class Ut {
|
|
|
2688
2688
|
};
|
|
2689
2689
|
}
|
|
2690
2690
|
static create(t, e) {
|
|
2691
|
-
const i = new
|
|
2691
|
+
const i = new Gt(t, e);
|
|
2692
2692
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2693
2693
|
throw new Error(`duplicate uuid in options ${i.uuid}, Payload`);
|
|
2694
2694
|
return this.instances.push(i), i;
|
|
@@ -2720,9 +2720,9 @@ class Ut {
|
|
|
2720
2720
|
return this.create(e.public, e.options);
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
|
-
class
|
|
2723
|
+
class Kt {
|
|
2724
2724
|
constructor(t, e) {
|
|
2725
|
-
this._type = "SideEffect", this._options = e, this.uuid =
|
|
2725
|
+
this._type = "SideEffect", this._options = e, this.uuid = S(e), this.name = t.name, this.handle = t.handle;
|
|
2726
2726
|
}
|
|
2727
2727
|
static {
|
|
2728
2728
|
this.isKlass = !0;
|
|
@@ -2748,7 +2748,7 @@ class Gt {
|
|
|
2748
2748
|
};
|
|
2749
2749
|
}
|
|
2750
2750
|
static create(t, e) {
|
|
2751
|
-
const i = new
|
|
2751
|
+
const i = new Kt(t, e);
|
|
2752
2752
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2753
2753
|
throw new Error(`duplicate uuid in options ${i.uuid}, SideEffect`);
|
|
2754
2754
|
return this.instances.push(i), i;
|
|
@@ -2782,7 +2782,7 @@ class Gt {
|
|
|
2782
2782
|
return i.handle && typeof i.handle == "string" && i.handle.startsWith("func::") && (i.handle = new Function("return " + i.handle.substring(6))()), this.create(i, e.options);
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
|
-
function
|
|
2785
|
+
function Ft(u) {
|
|
2786
2786
|
if (!u) return;
|
|
2787
2787
|
if (u.raw.type === "atom")
|
|
2788
2788
|
return lt.create({
|
|
@@ -2793,13 +2793,13 @@ function Dt(u) {
|
|
|
2793
2793
|
return ut.create({
|
|
2794
2794
|
type: "expression",
|
|
2795
2795
|
operator: t.operator,
|
|
2796
|
-
left:
|
|
2797
|
-
right:
|
|
2796
|
+
left: Ft(u.left),
|
|
2797
|
+
right: Ft(u.right)
|
|
2798
2798
|
});
|
|
2799
2799
|
}
|
|
2800
|
-
class
|
|
2800
|
+
class Mt {
|
|
2801
2801
|
constructor(t, e) {
|
|
2802
|
-
this._type = "Conditions", this._options = e, this.uuid =
|
|
2802
|
+
this._type = "Conditions", this._options = e, this.uuid = S(e), t.content && t.content instanceof R ? this.content = Ft(t.content) : this.content = t.content;
|
|
2803
2803
|
}
|
|
2804
2804
|
static {
|
|
2805
2805
|
this.isKlass = !0;
|
|
@@ -2820,7 +2820,7 @@ class xt {
|
|
|
2820
2820
|
};
|
|
2821
2821
|
}
|
|
2822
2822
|
static create(t, e) {
|
|
2823
|
-
const i = new
|
|
2823
|
+
const i = new Mt(t, e);
|
|
2824
2824
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2825
2825
|
throw new Error(`duplicate uuid in options ${i.uuid}, Conditions`);
|
|
2826
2826
|
return this.instances.push(i), i;
|
|
@@ -2851,9 +2851,9 @@ class xt {
|
|
|
2851
2851
|
return this.create(e.public, e.options);
|
|
2852
2852
|
}
|
|
2853
2853
|
}
|
|
2854
|
-
class
|
|
2854
|
+
class Xt {
|
|
2855
2855
|
constructor(t, e) {
|
|
2856
|
-
this._type = "DataAttributives", this._options = e, this.uuid =
|
|
2856
|
+
this._type = "DataAttributives", this._options = e, this.uuid = S(e), this.content = t.content;
|
|
2857
2857
|
}
|
|
2858
2858
|
static {
|
|
2859
2859
|
this.isKlass = !0;
|
|
@@ -2874,7 +2874,7 @@ class Kt {
|
|
|
2874
2874
|
};
|
|
2875
2875
|
}
|
|
2876
2876
|
static create(t, e) {
|
|
2877
|
-
const i = new
|
|
2877
|
+
const i = new Xt(t, e);
|
|
2878
2878
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
2879
2879
|
throw new Error(`duplicate uuid in options ${i.uuid}, DataAttributives`);
|
|
2880
2880
|
return this.instances.push(i), i;
|
|
@@ -2905,44 +2905,44 @@ class Kt {
|
|
|
2905
2905
|
return this.create(e.public, e.options);
|
|
2906
2906
|
}
|
|
2907
2907
|
}
|
|
2908
|
-
const
|
|
2908
|
+
const Be = [
|
|
2909
2909
|
x,
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
Lt,
|
|
2913
|
-
qt,
|
|
2914
|
-
H,
|
|
2910
|
+
O,
|
|
2911
|
+
T,
|
|
2915
2912
|
_t,
|
|
2916
2913
|
Bt,
|
|
2917
|
-
|
|
2918
|
-
ot,
|
|
2914
|
+
j,
|
|
2919
2915
|
Wt,
|
|
2920
2916
|
Jt,
|
|
2917
|
+
Ct,
|
|
2918
|
+
ot,
|
|
2921
2919
|
jt,
|
|
2922
2920
|
Z,
|
|
2921
|
+
Ht,
|
|
2923
2922
|
dt,
|
|
2924
2923
|
ht,
|
|
2925
2924
|
pt,
|
|
2926
2925
|
ft,
|
|
2927
2926
|
mt,
|
|
2928
2927
|
yt,
|
|
2929
|
-
Ct,
|
|
2930
2928
|
gt,
|
|
2931
|
-
|
|
2929
|
+
xt,
|
|
2930
|
+
bt,
|
|
2932
2931
|
Ut,
|
|
2933
2932
|
Gt,
|
|
2934
|
-
|
|
2933
|
+
Kt,
|
|
2934
|
+
qt,
|
|
2935
2935
|
lt,
|
|
2936
2936
|
ut,
|
|
2937
|
-
|
|
2938
|
-
|
|
2937
|
+
Mt,
|
|
2938
|
+
Xt
|
|
2939
2939
|
];
|
|
2940
|
-
|
|
2941
|
-
u && u.displayName &&
|
|
2940
|
+
Be.forEach((u) => {
|
|
2941
|
+
u && u.displayName && Oe(u.displayName, u);
|
|
2942
2942
|
});
|
|
2943
|
-
class
|
|
2943
|
+
class Yt {
|
|
2944
2944
|
constructor(t, e) {
|
|
2945
|
-
this._type = "Custom", this._options = e, this.uuid =
|
|
2945
|
+
this._type = "Custom", this._options = e, this.uuid = S(e), this.name = t.name, this.dataDeps = t.dataDeps, this.compute = t.compute, this.incrementalCompute = t.incrementalCompute, this.incrementalPatchCompute = t.incrementalPatchCompute, this.createState = t.createState, this.getDefaultValue = t.getDefaultValue, this.asyncReturn = t.asyncReturn, this.useLastValue = t.useLastValue;
|
|
2946
2946
|
}
|
|
2947
2947
|
static {
|
|
2948
2948
|
this.isKlass = !0;
|
|
@@ -3003,7 +3003,7 @@ class Xt {
|
|
|
3003
3003
|
};
|
|
3004
3004
|
}
|
|
3005
3005
|
static create(t, e) {
|
|
3006
|
-
const i = new
|
|
3006
|
+
const i = new Yt(t, e);
|
|
3007
3007
|
if (this.instances.find((s) => s.uuid === i.uuid))
|
|
3008
3008
|
throw new Error(`duplicate uuid in options ${i.uuid}, Custom`);
|
|
3009
3009
|
return this.instances.push(i), i;
|
|
@@ -3060,7 +3060,7 @@ class Re {
|
|
|
3060
3060
|
this.clonedEntities.set(t, e), this.reverseEntityMap.set(e, t);
|
|
3061
3061
|
}
|
|
3062
3062
|
for (const t of this.originalRelations) {
|
|
3063
|
-
const e =
|
|
3063
|
+
const e = O.clone(t, !1);
|
|
3064
3064
|
this.clonedRelations.set(t, e), this.reverseRelationMap.set(e, t);
|
|
3065
3065
|
}
|
|
3066
3066
|
this.updateAllReferences();
|
|
@@ -3084,7 +3084,7 @@ class Re {
|
|
|
3084
3084
|
if (i === t || i.uuid === t.uuid)
|
|
3085
3085
|
throw new Error(`Relation already exists in container: ${t.name}`);
|
|
3086
3086
|
this.originalRelations.push(t);
|
|
3087
|
-
const e =
|
|
3087
|
+
const e = O.clone(t, !1);
|
|
3088
3088
|
return this.clonedRelations.set(t, e), this.reverseRelationMap.set(e, t), this.updateReferencesInObject(e), e;
|
|
3089
3089
|
}
|
|
3090
3090
|
/**
|
|
@@ -3259,7 +3259,7 @@ class Re {
|
|
|
3259
3259
|
}
|
|
3260
3260
|
}
|
|
3261
3261
|
function Ar({ name: u, isRef: t = !1 }, e) {
|
|
3262
|
-
return
|
|
3262
|
+
return j.create({
|
|
3263
3263
|
name: u,
|
|
3264
3264
|
content: u ? new Function("user", `return user.roles.includes('${u}')`) : function() {
|
|
3265
3265
|
return !0;
|
|
@@ -3267,20 +3267,20 @@ function Ar({ name: u, isRef: t = !1 }, e) {
|
|
|
3267
3267
|
isRef: t
|
|
3268
3268
|
}, e);
|
|
3269
3269
|
}
|
|
3270
|
-
const _ = "_System_",
|
|
3270
|
+
const _ = "_System_", W = "_Dictionary_", it = "id", nt = "_rowId", We = x.create({
|
|
3271
3271
|
name: _,
|
|
3272
3272
|
properties: [
|
|
3273
|
-
|
|
3273
|
+
T.create({
|
|
3274
3274
|
name: "concept",
|
|
3275
3275
|
type: "string",
|
|
3276
3276
|
collection: !1
|
|
3277
3277
|
}),
|
|
3278
|
-
|
|
3278
|
+
T.create({
|
|
3279
3279
|
name: "key",
|
|
3280
3280
|
type: "string",
|
|
3281
3281
|
collection: !1
|
|
3282
3282
|
}),
|
|
3283
|
-
|
|
3283
|
+
T.create({
|
|
3284
3284
|
name: "value",
|
|
3285
3285
|
type: "string",
|
|
3286
3286
|
collection: !1
|
|
@@ -3302,7 +3302,7 @@ async function Cr(u, t) {
|
|
|
3302
3302
|
if (!await t(e)) return !1;
|
|
3303
3303
|
return !0;
|
|
3304
3304
|
}
|
|
3305
|
-
async function
|
|
3305
|
+
async function Je(u, t) {
|
|
3306
3306
|
for (let e of u)
|
|
3307
3307
|
if (await t(e)) return !0;
|
|
3308
3308
|
return !1;
|
|
@@ -3318,7 +3318,7 @@ function g(u, t) {
|
|
|
3318
3318
|
if (!u)
|
|
3319
3319
|
throw new Error(t);
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function Pt(u, t, e) {
|
|
3322
3322
|
const i = [...t];
|
|
3323
3323
|
let r = u, s;
|
|
3324
3324
|
const a = i.pop();
|
|
@@ -3326,7 +3326,7 @@ function $t(u, t, e) {
|
|
|
3326
3326
|
r[s] || (r[s] = {}), r = r[s];
|
|
3327
3327
|
return r[a] = e, !0;
|
|
3328
3328
|
}
|
|
3329
|
-
class
|
|
3329
|
+
class J {
|
|
3330
3330
|
constructor(t, e, i, r) {
|
|
3331
3331
|
this.parentEntityName = t, this.attributeName = e, this.map = i, this.symmetricDirection = r, this.data = this.map.getAttributeData(t, e), g(!!this.data, `${t} has no attribute: ${e}`);
|
|
3332
3332
|
}
|
|
@@ -3453,7 +3453,7 @@ class j {
|
|
|
3453
3453
|
return g(this.isLinkFiltered(), "only filtered relation can get match expression"), this.data.matchExpression;
|
|
3454
3454
|
}
|
|
3455
3455
|
getBaseAttributeInfo() {
|
|
3456
|
-
return g(this.isLinkFiltered(), "only filtered relation can get base attribute info"), new
|
|
3456
|
+
return g(this.isLinkFiltered(), "only filtered relation can get base attribute info"), new J(this.parentEntityName, this.data.baseRelationAttributeName, this.map, this.symmetricDirection);
|
|
3457
3457
|
}
|
|
3458
3458
|
}
|
|
3459
3459
|
class m {
|
|
@@ -3650,7 +3650,7 @@ class m {
|
|
|
3650
3650
|
return new m(i, this.map, a, this.contextRootEntity, this.fromRelation);
|
|
3651
3651
|
}
|
|
3652
3652
|
}
|
|
3653
|
-
class
|
|
3653
|
+
class je {
|
|
3654
3654
|
constructor(t, e, i, r) {
|
|
3655
3655
|
this.recordName = t, this.map = e, this.data = i, this.fromRelation = r;
|
|
3656
3656
|
}
|
|
@@ -3686,7 +3686,7 @@ class M {
|
|
|
3686
3686
|
e,
|
|
3687
3687
|
N,
|
|
3688
3688
|
new C(h, e, i.attributeQuery || [], s, a),
|
|
3689
|
-
new
|
|
3689
|
+
new je(h, e, i.modifier),
|
|
3690
3690
|
r,
|
|
3691
3691
|
s,
|
|
3692
3692
|
a,
|
|
@@ -3780,7 +3780,7 @@ class q {
|
|
|
3780
3780
|
}), this.parentLinkQueryTree && (t[f] = this.parentLinkQueryTree.getData()), t;
|
|
3781
3781
|
}
|
|
3782
3782
|
}
|
|
3783
|
-
const f = "&",
|
|
3783
|
+
const f = "&", He = "*";
|
|
3784
3784
|
class C {
|
|
3785
3785
|
constructor(t, e, i = [], r, s, a) {
|
|
3786
3786
|
this.recordName = t, this.map = e, this.data = i, this.parentRecord = r, this.attributeName = s, this.shouldQueryParentLinkData = a, this.relatedRecords = [], this.xToManyRecords = [], this.xToOneRecords = [], this.valueAttributes = [], this.id = Math.random();
|
|
@@ -3793,7 +3793,7 @@ class C {
|
|
|
3793
3793
|
this.parentLinkRecordQuery = M.create(y.linkName, this.map, d, void 0);
|
|
3794
3794
|
return;
|
|
3795
3795
|
}
|
|
3796
|
-
if (l ===
|
|
3796
|
+
if (l === He) {
|
|
3797
3797
|
o = new Set(this.map.getRecordInfo(this.recordName).valueAttributes.map((y) => y.attributeName));
|
|
3798
3798
|
return;
|
|
3799
3799
|
}
|
|
@@ -3802,10 +3802,10 @@ class C {
|
|
|
3802
3802
|
let y = l, N = d;
|
|
3803
3803
|
if (p.isLinkFiltered()) {
|
|
3804
3804
|
y = p.getBaseAttributeInfo().attributeName;
|
|
3805
|
-
const v = d.matchExpression, F = p.getLinkInfo().getBaseLinkInfo(), re = new m(F.name, this.map, p.getMatchExpression()).rebase(p.isRecordSource() ? "target" : "source"),
|
|
3805
|
+
const v = d.matchExpression, F = p.getLinkInfo().getBaseLinkInfo(), re = new m(F.name, this.map, p.getMatchExpression()).rebase(p.isRecordSource() ? "target" : "source"), Ee = v ? re.and(v.data) : re;
|
|
3806
3806
|
N = {
|
|
3807
3807
|
...d,
|
|
3808
|
-
matchExpression:
|
|
3808
|
+
matchExpression: Ee.data
|
|
3809
3809
|
};
|
|
3810
3810
|
}
|
|
3811
3811
|
const b = M.create(p.recordName, this.map, N, void 0, this.recordName, y, h, !1, l);
|
|
@@ -3923,7 +3923,7 @@ class C {
|
|
|
3923
3923
|
return this.parentLinkRecordQuery ? new C(this.recordName, this.map, this.data, this.parentRecord, this.attributeName, !0) : this;
|
|
3924
3924
|
}
|
|
3925
3925
|
}
|
|
3926
|
-
function
|
|
3926
|
+
function Ue(u) {
|
|
3927
3927
|
const t = [];
|
|
3928
3928
|
return u.forEach((e) => t.push(...Array.isArray(e) ? e : [e])), t;
|
|
3929
3929
|
}
|
|
@@ -3933,7 +3933,7 @@ class L {
|
|
|
3933
3933
|
const s = this.map.getRecordInfo(e);
|
|
3934
3934
|
this.recordName = s.isFilteredEntity || s.isFilteredRelation ? s.resolvedBaseRecordName : e;
|
|
3935
3935
|
const [a, o, n] = this.map.groupAttributes(this.recordName, i ? Object.keys(i) : []);
|
|
3936
|
-
this.relatedEntitiesData =
|
|
3936
|
+
this.relatedEntitiesData = Ue(o.map(
|
|
3937
3937
|
(l) => Array.isArray(i[l.attributeName]) ? i[l.attributeName].map((d) => new L(this.map, l.recordName, d, l)) : new L(this.map, l.recordName, i[l.attributeName], l)
|
|
3938
3938
|
)), this.valueAttributes = a, this.entityIdAttributes = n;
|
|
3939
3939
|
const c = this.map.getRecordInfo(this.recordName);
|
|
@@ -4010,7 +4010,7 @@ class L {
|
|
|
4010
4010
|
}), i;
|
|
4011
4011
|
}
|
|
4012
4012
|
}
|
|
4013
|
-
class
|
|
4013
|
+
class Ge {
|
|
4014
4014
|
constructor(t, e) {
|
|
4015
4015
|
this.map = t, this.queryAgent = e, this.dependencies = /* @__PURE__ */ new Map();
|
|
4016
4016
|
}
|
|
@@ -4236,7 +4236,7 @@ class Ue {
|
|
|
4236
4236
|
}
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
4239
|
-
class
|
|
4239
|
+
class Ke {
|
|
4240
4240
|
constructor() {
|
|
4241
4241
|
this.aliasToPath = /* @__PURE__ */ new Map(), this.pathStrToAlias = /* @__PURE__ */ new Map(), this.aliasPlaceholder = 0;
|
|
4242
4242
|
}
|
|
@@ -4251,21 +4251,21 @@ class Ge {
|
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
const we = ":root";
|
|
4254
|
-
class
|
|
4254
|
+
class kt {
|
|
4255
4255
|
constructor(t, e, i = []) {
|
|
4256
4256
|
this.label = t, this.parent = e, this.stack = i;
|
|
4257
4257
|
}
|
|
4258
4258
|
concat(t) {
|
|
4259
|
-
return new
|
|
4259
|
+
return new kt(this.label, this.parent, [...this.stack, t]);
|
|
4260
4260
|
}
|
|
4261
4261
|
getStack(t) {
|
|
4262
4262
|
return [...this.stack];
|
|
4263
4263
|
}
|
|
4264
4264
|
spawn(t) {
|
|
4265
|
-
return new
|
|
4265
|
+
return new kt(t, this);
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
4268
|
-
class
|
|
4268
|
+
class Xe {
|
|
4269
4269
|
constructor(t) {
|
|
4270
4270
|
this.recordQuery = t, this.recordQueryByName = /* @__PURE__ */ new Map(), this.set(we, t), this.recursiveSaveLabelledRecordQuery(t);
|
|
4271
4271
|
}
|
|
@@ -4281,9 +4281,9 @@ class Ke {
|
|
|
4281
4281
|
return this.recordQueryByName.get(t);
|
|
4282
4282
|
}
|
|
4283
4283
|
}
|
|
4284
|
-
class
|
|
4284
|
+
class Ye {
|
|
4285
4285
|
constructor(t, e) {
|
|
4286
|
-
this.map = t, this.database = e, this.getPlaceholder = e.getPlaceholder || (() => (i) => "?"), this.filteredEntityManager = new
|
|
4286
|
+
this.map = t, this.database = e, this.getPlaceholder = e.getPlaceholder || (() => (i) => "?"), this.filteredEntityManager = new Ge(t, this), this.initializeFilteredEntityDependencies();
|
|
4287
4287
|
}
|
|
4288
4288
|
/**
|
|
4289
4289
|
* 初始化所有 filtered entity 的依赖关系
|
|
@@ -4335,15 +4335,15 @@ ${b}
|
|
|
4335
4335
|
const s = {};
|
|
4336
4336
|
return Object.entries(r).forEach(([a, o]) => {
|
|
4337
4337
|
const n = i.getPath(a).slice(1, 1 / 0);
|
|
4338
|
-
n.length === 1 && e.includes(n[0]) && typeof o == "string" && (o = JSON.parse(o)), o !== null &&
|
|
4338
|
+
n.length === 1 && e.includes(n[0]) && typeof o == "string" && (o = JSON.parse(o)), o !== null && Pt(s, n, o);
|
|
4339
4339
|
}), s;
|
|
4340
4340
|
});
|
|
4341
4341
|
}
|
|
4342
4342
|
// 查 entity 和 查 relation 都是一样的。具体在 entityQuery 里面区别。
|
|
4343
4343
|
// TODO 为了性能,也可以把信息丢到客户端,然客户端去结构化???
|
|
4344
4344
|
// CAUTION findRelatedRecords 中的递归调用会使得 includeRelationData 变为 true
|
|
4345
|
-
async findRecords(t, e = "", i, r = new
|
|
4346
|
-
if (i || (i = new
|
|
4345
|
+
async findRecords(t, e = "", i, r = new kt(we)) {
|
|
4346
|
+
if (i || (i = new Xe(t)), t.goto) {
|
|
4347
4347
|
if (t.exit && await t.exit(r))
|
|
4348
4348
|
return [];
|
|
4349
4349
|
const l = i.get(t.goto);
|
|
@@ -4382,7 +4382,7 @@ ${b}
|
|
|
4382
4382
|
value: ["=", b]
|
|
4383
4383
|
})
|
|
4384
4384
|
}), F = t.label ? c.concat(N) : c;
|
|
4385
|
-
|
|
4385
|
+
Pt(
|
|
4386
4386
|
N,
|
|
4387
4387
|
[l.alias || l.attributeName, f, h.attributeName],
|
|
4388
4388
|
await this.findRecords(
|
|
@@ -4470,7 +4470,7 @@ ${b}
|
|
|
4470
4470
|
for (let b of N.attributeQuery.xToManyRecords)
|
|
4471
4471
|
for (let v of p) {
|
|
4472
4472
|
const F = v[f].id, ie = d.label ? y.concat(v) : y;
|
|
4473
|
-
|
|
4473
|
+
Pt(
|
|
4474
4474
|
v,
|
|
4475
4475
|
[f, b.attributeName],
|
|
4476
4476
|
await this.findXToManyRelatedRecords(
|
|
@@ -4552,7 +4552,7 @@ ${b}
|
|
|
4552
4552
|
return t ? `${t}___` : "";
|
|
4553
4553
|
}
|
|
4554
4554
|
buildSelectClause(t, e = "") {
|
|
4555
|
-
const i = new
|
|
4555
|
+
const i = new Ke();
|
|
4556
4556
|
return t.length ? [t.map(({ tableAliasAndField: s, attribute: a, nameContext: o }) => {
|
|
4557
4557
|
const n = [
|
|
4558
4558
|
`${this.withPrefix(e)}${o[0]}`,
|
|
@@ -5124,9 +5124,9 @@ WHERE "${s.idField}" = ${l()}
|
|
|
5124
5124
|
return p ? [N, ...p] : void 0;
|
|
5125
5125
|
}
|
|
5126
5126
|
}
|
|
5127
|
-
class
|
|
5127
|
+
class ze {
|
|
5128
5128
|
constructor(t, e) {
|
|
5129
|
-
this.map = t, this.database = e, this.agent = new
|
|
5129
|
+
this.map = t, this.database = e, this.agent = new Ye(t, e);
|
|
5130
5130
|
}
|
|
5131
5131
|
async findOne(t, e, i = {}, r) {
|
|
5132
5132
|
const s = {
|
|
@@ -5231,19 +5231,19 @@ class ct {
|
|
|
5231
5231
|
return Object.keys(this.data.attributes).filter((t) => {
|
|
5232
5232
|
const e = this.data.attributes[t];
|
|
5233
5233
|
return e.isRecord && e.field;
|
|
5234
|
-
}).map((t) => new
|
|
5234
|
+
}).map((t) => new J(this.name, t, this.map));
|
|
5235
5235
|
}
|
|
5236
5236
|
get strictRecordAttributes() {
|
|
5237
5237
|
return Object.keys(this.data.attributes).filter((t) => {
|
|
5238
5238
|
const e = this.data.attributes[t];
|
|
5239
5239
|
return e.isRecord && !e.field && !e.isFilteredRelation;
|
|
5240
|
-
}).map((t) => new
|
|
5240
|
+
}).map((t) => new J(this.name, t, this.map));
|
|
5241
5241
|
}
|
|
5242
5242
|
get differentTableRecordAttributes() {
|
|
5243
5243
|
return this.strictRecordAttributes.filter((t) => !(t.isMergedWithParent() || t.isLinkMergedWithParent()));
|
|
5244
5244
|
}
|
|
5245
5245
|
get reliance() {
|
|
5246
|
-
return Object.keys(this.data.attributes).filter((t) => this.data.attributes[t].isReliance).map((t) => new
|
|
5246
|
+
return Object.keys(this.data.attributes).filter((t) => this.data.attributes[t].isReliance).map((t) => new J(this.name, t, this.map));
|
|
5247
5247
|
}
|
|
5248
5248
|
get notRelianceCombined() {
|
|
5249
5249
|
return this.combinedRecords.filter((t) => !t.isReliance);
|
|
@@ -5255,10 +5255,10 @@ class ct {
|
|
|
5255
5255
|
return this.reliance.filter((t) => t.table === this.table);
|
|
5256
5256
|
}
|
|
5257
5257
|
get valueAttributes() {
|
|
5258
|
-
return Object.entries(this.data.attributes).filter(([, t]) => !t.isRecord).map(([t]) => new
|
|
5258
|
+
return Object.entries(this.data.attributes).filter(([, t]) => !t.isRecord).map(([t]) => new J(this.name, t, this.map));
|
|
5259
5259
|
}
|
|
5260
5260
|
getAttributeInfo(t) {
|
|
5261
|
-
return new
|
|
5261
|
+
return new J(this.name, t, this.map);
|
|
5262
5262
|
}
|
|
5263
5263
|
get baseRecordName() {
|
|
5264
5264
|
return this.data.baseRecordName;
|
|
@@ -5285,7 +5285,7 @@ class ct {
|
|
|
5285
5285
|
return this.data?.resolvedMatchExpression;
|
|
5286
5286
|
}
|
|
5287
5287
|
}
|
|
5288
|
-
class
|
|
5288
|
+
class At {
|
|
5289
5289
|
constructor(t, e, i, r = !0) {
|
|
5290
5290
|
this.name = t, this.data = e, this.map = i, this.isFromSource = r;
|
|
5291
5291
|
}
|
|
@@ -5373,7 +5373,7 @@ class kt {
|
|
|
5373
5373
|
getBaseLinkInfo() {
|
|
5374
5374
|
g(this.isFilteredRelation(), "only filtered relation can get base link info");
|
|
5375
5375
|
const t = this.data.baseLinkName;
|
|
5376
|
-
return new
|
|
5376
|
+
return new At(t, this.map.data.links[t], this.map);
|
|
5377
5377
|
}
|
|
5378
5378
|
getMatchExpression() {
|
|
5379
5379
|
if (this.isFilteredRelation())
|
|
@@ -5387,7 +5387,7 @@ class kt {
|
|
|
5387
5387
|
return g(this.isFilteredRelation(), "only filtered relation can get resolved record name"), this.data.resolvedBaseRecordName;
|
|
5388
5388
|
}
|
|
5389
5389
|
}
|
|
5390
|
-
class
|
|
5390
|
+
class Ze {
|
|
5391
5391
|
constructor(t) {
|
|
5392
5392
|
this.data = t;
|
|
5393
5393
|
}
|
|
@@ -5412,10 +5412,10 @@ class ze {
|
|
|
5412
5412
|
}
|
|
5413
5413
|
getLinkInfo(t, e) {
|
|
5414
5414
|
const i = this.getAttributeAndSymmetricDirection(e)[0], { linkName: r, isSource: s } = this.data.records[t].attributes[i];
|
|
5415
|
-
return g(!!r, `cannot find relation ${t} ${i}`), new
|
|
5415
|
+
return g(!!r, `cannot find relation ${t} ${i}`), new At(r, this.data.links[r], this, !!s);
|
|
5416
5416
|
}
|
|
5417
5417
|
getLinkInfoByName(t) {
|
|
5418
|
-
return g(!!this.data.links[t], `cannot find link ${t}`), new
|
|
5418
|
+
return g(!!this.data.links[t], `cannot find link ${t}`), new At(t, this.data.links[t], this);
|
|
5419
5419
|
}
|
|
5420
5420
|
getInfoByPath(t) {
|
|
5421
5421
|
const [e, ...i] = t;
|
|
@@ -5435,7 +5435,7 @@ class ze {
|
|
|
5435
5435
|
}
|
|
5436
5436
|
}
|
|
5437
5437
|
if (!(!s || !a))
|
|
5438
|
-
return new
|
|
5438
|
+
return new J(s, a, this, c);
|
|
5439
5439
|
}
|
|
5440
5440
|
getTableAndAliasStack(t) {
|
|
5441
5441
|
const [e, ...i] = t;
|
|
@@ -5583,7 +5583,7 @@ class ze {
|
|
|
5583
5583
|
return r.join(".");
|
|
5584
5584
|
}
|
|
5585
5585
|
}
|
|
5586
|
-
function
|
|
5586
|
+
function ti(u) {
|
|
5587
5587
|
const t = /* @__PURE__ */ new Map();
|
|
5588
5588
|
for (const e of u)
|
|
5589
5589
|
if (e.inputEntities)
|
|
@@ -5594,7 +5594,7 @@ function Ze(u) {
|
|
|
5594
5594
|
}
|
|
5595
5595
|
return t;
|
|
5596
5596
|
}
|
|
5597
|
-
function
|
|
5597
|
+
function ei(u) {
|
|
5598
5598
|
const t = /* @__PURE__ */ new Map();
|
|
5599
5599
|
for (const e of u) {
|
|
5600
5600
|
const i = e.name || `${e.source.name}_${e.sourceProperty}_${e.targetProperty}_${e.target.name}`;
|
|
@@ -5608,8 +5608,8 @@ function ti(u) {
|
|
|
5608
5608
|
}
|
|
5609
5609
|
return t;
|
|
5610
5610
|
}
|
|
5611
|
-
function
|
|
5612
|
-
const e = new Re(u, t), i =
|
|
5611
|
+
function ii(u, t) {
|
|
5612
|
+
const e = new Re(u, t), i = ti(u), r = ei(t);
|
|
5613
5613
|
return oe(
|
|
5614
5614
|
u,
|
|
5615
5615
|
e,
|
|
@@ -5624,30 +5624,30 @@ function ei(u, t) {
|
|
|
5624
5624
|
}
|
|
5625
5625
|
function oe(u, t, e, i) {
|
|
5626
5626
|
const r = u.filter((s) => {
|
|
5627
|
-
const a =
|
|
5627
|
+
const a = wt(s);
|
|
5628
5628
|
return a && a.length > 0;
|
|
5629
5629
|
});
|
|
5630
5630
|
if (r.length !== 0)
|
|
5631
5631
|
for (const s of r)
|
|
5632
|
-
|
|
5632
|
+
ri(
|
|
5633
5633
|
s,
|
|
5634
5634
|
t,
|
|
5635
5635
|
i,
|
|
5636
5636
|
e
|
|
5637
5637
|
);
|
|
5638
5638
|
}
|
|
5639
|
-
function
|
|
5640
|
-
const r = e === "entity", a = `__${tt(u)}_input_${e}`, o = r ? t.getEntityByName(u.name) : t.getRelationByName(u.name), [n, c] =
|
|
5639
|
+
function ri(u, t, e, i) {
|
|
5640
|
+
const r = e === "entity", a = `__${tt(u)}_input_${e}`, o = r ? t.getEntityByName(u.name) : t.getRelationByName(u.name), [n, c] = ci(
|
|
5641
5641
|
o,
|
|
5642
5642
|
a,
|
|
5643
5643
|
i,
|
|
5644
5644
|
t
|
|
5645
5645
|
);
|
|
5646
5646
|
t.replace(n, u), c !== n && t.add(c);
|
|
5647
|
-
const l =
|
|
5647
|
+
const l = wt(u);
|
|
5648
5648
|
if (l)
|
|
5649
5649
|
for (const d of l)
|
|
5650
|
-
|
|
5650
|
+
si(
|
|
5651
5651
|
d,
|
|
5652
5652
|
c,
|
|
5653
5653
|
a,
|
|
@@ -5655,8 +5655,8 @@ function ii(u, t, e, i) {
|
|
|
5655
5655
|
r
|
|
5656
5656
|
);
|
|
5657
5657
|
}
|
|
5658
|
-
function
|
|
5659
|
-
const [s, a] =
|
|
5658
|
+
function si(u, t, e, i, r) {
|
|
5659
|
+
const [s, a] = li(
|
|
5660
5660
|
u,
|
|
5661
5661
|
t,
|
|
5662
5662
|
e
|
|
@@ -5666,8 +5666,8 @@ function ri(u, t, e, i, r) {
|
|
|
5666
5666
|
const o = tt(a), n = r ? i.getEntityByName(o) : i.getRelationByName(o);
|
|
5667
5667
|
n && i.replace(s, n);
|
|
5668
5668
|
}
|
|
5669
|
-
function
|
|
5670
|
-
const e = /* @__PURE__ */ new Map(), i =
|
|
5669
|
+
function ai(u, t) {
|
|
5670
|
+
const e = /* @__PURE__ */ new Map(), i = wt(u);
|
|
5671
5671
|
if (i && i.length > 0)
|
|
5672
5672
|
for (const r of i) {
|
|
5673
5673
|
const s = tt(r), a = [...t.get(s) || []], o = e.get(s) || [];
|
|
@@ -5680,27 +5680,27 @@ function si(u, t) {
|
|
|
5680
5680
|
}
|
|
5681
5681
|
return e;
|
|
5682
5682
|
}
|
|
5683
|
-
function
|
|
5684
|
-
const i =
|
|
5685
|
-
return
|
|
5683
|
+
function oi(u, t, e) {
|
|
5684
|
+
const i = ai(t, e);
|
|
5685
|
+
return T.create({
|
|
5686
5686
|
name: u,
|
|
5687
5687
|
type: "json",
|
|
5688
5688
|
defaultValue: (r, s) => {
|
|
5689
|
-
const a =
|
|
5689
|
+
const a = wt(t), n = (i.get(s) || []).filter(
|
|
5690
5690
|
(c) => a.some((l) => tt(l) === c)
|
|
5691
5691
|
);
|
|
5692
5692
|
return n.length > 0 ? n : [s];
|
|
5693
5693
|
}
|
|
5694
5694
|
});
|
|
5695
5695
|
}
|
|
5696
|
-
function
|
|
5697
|
-
const i =
|
|
5696
|
+
function ni(u, t, e) {
|
|
5697
|
+
const i = wt(u), r = [], s = /* @__PURE__ */ new Map(), a = {};
|
|
5698
5698
|
for (const o of i) {
|
|
5699
5699
|
let n = o;
|
|
5700
|
-
if (
|
|
5700
|
+
if (Rt(n))
|
|
5701
5701
|
for (; n.baseEntity && n.properties.length === 0; )
|
|
5702
5702
|
n = n.baseEntity;
|
|
5703
|
-
else if (
|
|
5703
|
+
else if (di(n))
|
|
5704
5704
|
for (; n.baseRelation && n.properties.length === 0; )
|
|
5705
5705
|
n = n.baseRelation;
|
|
5706
5706
|
const c = Object.fromEntries(n.properties.map((h) => [h.name, h]));
|
|
@@ -5721,7 +5721,7 @@ function oi(u, t, e) {
|
|
|
5721
5721
|
}
|
|
5722
5722
|
}
|
|
5723
5723
|
for (const o of Object.keys(a)) {
|
|
5724
|
-
const n =
|
|
5724
|
+
const n = T.clone(a[o], !0);
|
|
5725
5725
|
n.defaultValue = (c, l) => {
|
|
5726
5726
|
const d = s.get(l)?.[o];
|
|
5727
5727
|
if (d?.defaultValue)
|
|
@@ -5730,13 +5730,13 @@ function oi(u, t, e) {
|
|
|
5730
5730
|
}
|
|
5731
5731
|
return r;
|
|
5732
5732
|
}
|
|
5733
|
-
function
|
|
5734
|
-
const r =
|
|
5733
|
+
function ci(u, t, e, i) {
|
|
5734
|
+
const r = oi(
|
|
5735
5735
|
t,
|
|
5736
5736
|
u,
|
|
5737
5737
|
e
|
|
5738
5738
|
), s = [
|
|
5739
|
-
...
|
|
5739
|
+
...ni(
|
|
5740
5740
|
u,
|
|
5741
5741
|
e,
|
|
5742
5742
|
i
|
|
@@ -5744,7 +5744,7 @@ function ni(u, t, e, i) {
|
|
|
5744
5744
|
r,
|
|
5745
5745
|
...u.properties
|
|
5746
5746
|
];
|
|
5747
|
-
if (
|
|
5747
|
+
if (Rt(u)) {
|
|
5748
5748
|
const a = i.getEntityByName(u.name), o = x.create({
|
|
5749
5749
|
name: a.name
|
|
5750
5750
|
});
|
|
@@ -5759,7 +5759,7 @@ function ni(u, t, e, i) {
|
|
|
5759
5759
|
}))
|
|
5760
5760
|
)) : o.properties = s, [o, n || o];
|
|
5761
5761
|
} else {
|
|
5762
|
-
const a = i.getRelationByName(u.name), o =
|
|
5762
|
+
const a = i.getRelationByName(u.name), o = O.create({
|
|
5763
5763
|
name: a.name,
|
|
5764
5764
|
source: a.source,
|
|
5765
5765
|
sourceProperty: a.sourceProperty,
|
|
@@ -5771,7 +5771,7 @@ function ni(u, t, e, i) {
|
|
|
5771
5771
|
let n;
|
|
5772
5772
|
if (a.inputRelations?.some((c) => c.baseRelation)) {
|
|
5773
5773
|
const c = a.name || `${a.source.name}_${a.sourceProperty}_${a.targetProperty}_${a.target.name}`;
|
|
5774
|
-
n =
|
|
5774
|
+
n = O.create({
|
|
5775
5775
|
name: `__${c}_base`,
|
|
5776
5776
|
source: a.source,
|
|
5777
5777
|
sourceProperty: `__${a.sourceProperty}_base`,
|
|
@@ -5794,8 +5794,8 @@ function ni(u, t, e, i) {
|
|
|
5794
5794
|
return [o, n || o];
|
|
5795
5795
|
}
|
|
5796
5796
|
}
|
|
5797
|
-
function
|
|
5798
|
-
if (
|
|
5797
|
+
function li(u, t, e) {
|
|
5798
|
+
if (Rt(u)) {
|
|
5799
5799
|
const i = u, r = t;
|
|
5800
5800
|
let s = i;
|
|
5801
5801
|
if (i.baseEntity)
|
|
@@ -5808,7 +5808,7 @@ function ci(u, t, e) {
|
|
|
5808
5808
|
}), [a, s];
|
|
5809
5809
|
} else {
|
|
5810
5810
|
const i = u, r = t, s = tt(i);
|
|
5811
|
-
return i.baseRelation ? [i,
|
|
5811
|
+
return i.baseRelation ? [i, ui(i)] : [O.create({
|
|
5812
5812
|
name: s,
|
|
5813
5813
|
baseRelation: r,
|
|
5814
5814
|
sourceProperty: i.sourceProperty,
|
|
@@ -5820,25 +5820,25 @@ function ci(u, t, e) {
|
|
|
5820
5820
|
}), i];
|
|
5821
5821
|
}
|
|
5822
5822
|
}
|
|
5823
|
-
function
|
|
5823
|
+
function ui(u) {
|
|
5824
5824
|
let t = u;
|
|
5825
5825
|
for (; t.baseRelation; )
|
|
5826
5826
|
t = t.baseRelation;
|
|
5827
5827
|
return t;
|
|
5828
5828
|
}
|
|
5829
|
-
function
|
|
5829
|
+
function Rt(u) {
|
|
5830
5830
|
return "inputEntities" in u || !("sourceProperty" in u);
|
|
5831
5831
|
}
|
|
5832
|
-
function
|
|
5832
|
+
function di(u) {
|
|
5833
5833
|
return "sourceProperty" in u;
|
|
5834
5834
|
}
|
|
5835
|
-
function
|
|
5836
|
-
return
|
|
5835
|
+
function wt(u) {
|
|
5836
|
+
return Rt(u) ? u.inputEntities || [] : u.inputRelations || [];
|
|
5837
5837
|
}
|
|
5838
5838
|
function tt(u) {
|
|
5839
|
-
return
|
|
5839
|
+
return Rt(u), u.name;
|
|
5840
5840
|
}
|
|
5841
|
-
class
|
|
5841
|
+
class hi {
|
|
5842
5842
|
constructor(t, e, i, r = []) {
|
|
5843
5843
|
this.entities = t, this.relations = e, this.database = i, this.mergeLinks = r, this.fieldNameMap = /* @__PURE__ */ new Map(), this.usedFieldNames = /* @__PURE__ */ new Set(), this.fieldCounter = 1, this.recordToTableMap = /* @__PURE__ */ new Map(), this.tableToRecordsMap = /* @__PURE__ */ new Map(), this.mergeLog = [], this.tables = {}, this.map = { links: {}, records: {} }, this.buildMap(), this.buildTables();
|
|
5844
5844
|
}
|
|
@@ -6117,7 +6117,7 @@ class di {
|
|
|
6117
6117
|
* 统一处理 merged entities 和 merged relations
|
|
6118
6118
|
*/
|
|
6119
6119
|
processMergedItems() {
|
|
6120
|
-
const t =
|
|
6120
|
+
const t = ii(
|
|
6121
6121
|
this.entities,
|
|
6122
6122
|
this.relations
|
|
6123
6123
|
);
|
|
@@ -6441,7 +6441,7 @@ class G extends K {
|
|
|
6441
6441
|
}), this.schedulingPhase = e.schedulingPhase, this.failedComputations = e.failedComputations, this.severity = V.HIGH;
|
|
6442
6442
|
}
|
|
6443
6443
|
}
|
|
6444
|
-
class
|
|
6444
|
+
class $ extends K {
|
|
6445
6445
|
constructor(t, e) {
|
|
6446
6446
|
super(t, {
|
|
6447
6447
|
errorType: e.context?.errorType || "ConditionError",
|
|
@@ -6460,7 +6460,7 @@ class P extends K {
|
|
|
6460
6460
|
* Helper factory methods for common condition error scenarios
|
|
6461
6461
|
*/
|
|
6462
6462
|
static userCheckFailed(t, e) {
|
|
6463
|
-
return new
|
|
6463
|
+
return new $("User check failed", {
|
|
6464
6464
|
checkType: "user",
|
|
6465
6465
|
evaluationError: t,
|
|
6466
6466
|
severity: V.HIGH,
|
|
@@ -6471,7 +6471,7 @@ class P extends K {
|
|
|
6471
6471
|
}
|
|
6472
6472
|
static payloadValidationFailed(t, e, i, r) {
|
|
6473
6473
|
const s = `${t} ${e}`;
|
|
6474
|
-
return new
|
|
6474
|
+
return new $(`Payload validation failed for field '${t}': ${e}`, {
|
|
6475
6475
|
checkType: "payload",
|
|
6476
6476
|
fieldName: t,
|
|
6477
6477
|
payload: i,
|
|
@@ -6482,7 +6482,7 @@ class P extends K {
|
|
|
6482
6482
|
});
|
|
6483
6483
|
}
|
|
6484
6484
|
static conditionCheckFailed(t, e) {
|
|
6485
|
-
return new
|
|
6485
|
+
return new $(`Condition check failed: ${t.data.name}`, {
|
|
6486
6486
|
checkType: "condition",
|
|
6487
6487
|
evaluationError: t,
|
|
6488
6488
|
severity: V.HIGH,
|
|
@@ -6493,7 +6493,7 @@ class P extends K {
|
|
|
6493
6493
|
}
|
|
6494
6494
|
static attributiveCheckFailed(t, e, i, r) {
|
|
6495
6495
|
const s = `${t} ${e}`;
|
|
6496
|
-
return new
|
|
6496
|
+
return new $(`Attributive check failed for field '${t}': ${e}`, {
|
|
6497
6497
|
checkType: "attributive",
|
|
6498
6498
|
fieldName: t,
|
|
6499
6499
|
payload: i,
|
|
@@ -6504,7 +6504,7 @@ class P extends K {
|
|
|
6504
6504
|
});
|
|
6505
6505
|
}
|
|
6506
6506
|
static conceptCheckFailed(t, e) {
|
|
6507
|
-
return new
|
|
6507
|
+
return new $(`Concept check failed for field '${t}'`, {
|
|
6508
6508
|
checkType: "concept",
|
|
6509
6509
|
fieldName: t,
|
|
6510
6510
|
evaluationError: e,
|
|
@@ -6548,7 +6548,7 @@ class Ne {
|
|
|
6548
6548
|
this.interaction.userAttributives
|
|
6549
6549
|
), a = (o) => o.isRef ? i(o, t.user, e) : this.checkAttributive(o, t, t.user);
|
|
6550
6550
|
if (r = await this.checkAttributives(s, a, []), r === !0) return r;
|
|
6551
|
-
throw
|
|
6551
|
+
throw $.userCheckFailed(r);
|
|
6552
6552
|
}
|
|
6553
6553
|
// 用来check attributive 形容的后面的 target 到底是不是那个概念的实例。
|
|
6554
6554
|
async checkConcept(t, e, i, r = []) {
|
|
@@ -6568,12 +6568,12 @@ class Ne {
|
|
|
6568
6568
|
}
|
|
6569
6569
|
if (this.isConceptAlias(e)) {
|
|
6570
6570
|
const s = [];
|
|
6571
|
-
return await
|
|
6571
|
+
return await Je(e.for, async (o) => {
|
|
6572
6572
|
const n = await this.isConcept(t, o);
|
|
6573
6573
|
return n === !0 ? !0 : (s.push(n), !1);
|
|
6574
6574
|
}) ? !0 : { name: e.name, type: "conceptAlias", stack: r, error: s };
|
|
6575
6575
|
} else {
|
|
6576
|
-
if (
|
|
6576
|
+
if (j.is(e))
|
|
6577
6577
|
return await this.checkAttributive(e, void 0, t) ? !0 : { name: e.name, type: "conceptCheck", stack: r, error: "role check error" };
|
|
6578
6578
|
const s = e.constructor?.check;
|
|
6579
6579
|
return s ? s(t) ? !0 : { name: e.name, type: "conceptCheck", stack: r, error: "constructor check error" } : e.constructor && typeof e.constructor.check == "function" ? e.constructor.check(t) ? !0 : { name: e.name || "", type: "conceptCheck", stack: r, error: "constructor check error" } : x.is(e) ? t && typeof t == "object" && "id" in t || t && typeof t == "object" ? !0 : { name: e.name || "", type: "conceptCheck", stack: r, error: "invalid entity data" } : t && typeof t == "object" ? !0 : typeof e == "function" ? t instanceof e ? !0 : { name: e.name, type: "conceptCheck", stack: r, error: "instanceof check error" } : (console.warn(`unknown concept ${e}, cannot check ${t}. pass.`), !0);
|
|
@@ -6597,24 +6597,24 @@ class Ne {
|
|
|
6597
6597
|
for (let r of e) {
|
|
6598
6598
|
const s = t.payload[r.name];
|
|
6599
6599
|
if (r.required && !s)
|
|
6600
|
-
throw
|
|
6600
|
+
throw $.payloadValidationFailed(r.name, "missing", t.payload);
|
|
6601
6601
|
if (!s) return;
|
|
6602
6602
|
if (r.isCollection && !Array.isArray(s))
|
|
6603
|
-
throw
|
|
6603
|
+
throw $.payloadValidationFailed(r.name, "data is not array", s);
|
|
6604
6604
|
if (r.isCollection) {
|
|
6605
6605
|
if (r.isRef && !s.every((o) => !!o.id))
|
|
6606
|
-
throw
|
|
6606
|
+
throw $.payloadValidationFailed(r.name, "data not every is ref", s);
|
|
6607
6607
|
} else if (r.isRef && !s.id)
|
|
6608
|
-
throw
|
|
6608
|
+
throw $.payloadValidationFailed(r.name, "data is not a ref", s);
|
|
6609
6609
|
if (r.base)
|
|
6610
6610
|
if (r.isCollection) {
|
|
6611
6611
|
const o = await ae(s, (n) => this.checkConcept(n, r.base));
|
|
6612
6612
|
if (o !== !0)
|
|
6613
|
-
throw
|
|
6613
|
+
throw $.conceptCheckFailed(r.name, o);
|
|
6614
6614
|
} else {
|
|
6615
6615
|
const o = await this.checkConcept(s, r.base);
|
|
6616
6616
|
if (o !== !0)
|
|
6617
|
-
throw
|
|
6617
|
+
throw $.conceptCheckFailed(r.name, o);
|
|
6618
6618
|
}
|
|
6619
6619
|
let a = s;
|
|
6620
6620
|
if (r.isRef) {
|
|
@@ -6632,29 +6632,29 @@ class Ne {
|
|
|
6632
6632
|
if (r.isCollection) {
|
|
6633
6633
|
const n = await ae(a, (c) => {
|
|
6634
6634
|
const l = this.createHandleAttributive(
|
|
6635
|
-
|
|
6635
|
+
j,
|
|
6636
6636
|
t,
|
|
6637
6637
|
c
|
|
6638
6638
|
);
|
|
6639
6639
|
return this.checkAttributives(o, l);
|
|
6640
6640
|
});
|
|
6641
6641
|
if (n !== !0)
|
|
6642
|
-
throw
|
|
6642
|
+
throw $.attributiveCheckFailed(r.name, "not every item match attribute", a, n);
|
|
6643
6643
|
} else {
|
|
6644
6644
|
const n = this.createHandleAttributive(
|
|
6645
|
-
|
|
6645
|
+
j,
|
|
6646
6646
|
t,
|
|
6647
6647
|
a
|
|
6648
6648
|
), c = await this.checkAttributives(o, n);
|
|
6649
6649
|
if (c !== !0)
|
|
6650
|
-
throw
|
|
6650
|
+
throw $.attributiveCheckFailed(r.name, "not match attributive", a, c);
|
|
6651
6651
|
}
|
|
6652
6652
|
}
|
|
6653
6653
|
}
|
|
6654
6654
|
}
|
|
6655
6655
|
async checkCondition(t) {
|
|
6656
6656
|
if (this.interaction.conditions) {
|
|
6657
|
-
const e =
|
|
6657
|
+
const e = Mt.is(this.interaction.conditions) ? new R(this.interaction.conditions.content) : R.atom(this.interaction.conditions), i = async (s) => {
|
|
6658
6658
|
if (!s) return !0;
|
|
6659
6659
|
if (s.content) {
|
|
6660
6660
|
const a = s.content;
|
|
@@ -6670,7 +6670,7 @@ class Ne {
|
|
|
6670
6670
|
return !0;
|
|
6671
6671
|
}, r = await e.evaluateAsync(i);
|
|
6672
6672
|
if (r !== !0)
|
|
6673
|
-
throw
|
|
6673
|
+
throw $.conditionCheckFailed(r);
|
|
6674
6674
|
}
|
|
6675
6675
|
}
|
|
6676
6676
|
// CAUTION sideEffect 是并行的。如果要串行,用户应该自己写在一个里面
|
|
@@ -6688,14 +6688,14 @@ class Ne {
|
|
|
6688
6688
|
k(!i.sideEffects[o], `sideEffect ${o} already exists`), i.sideEffects[o] = { result: n, error: c };
|
|
6689
6689
|
}
|
|
6690
6690
|
isGetInteraction() {
|
|
6691
|
-
return this.interaction.action ===
|
|
6691
|
+
return this.interaction.action === _e;
|
|
6692
6692
|
}
|
|
6693
6693
|
async saveEvent(t, e) {
|
|
6694
6694
|
return await this.controller.activityManager.saveEvent(t, e);
|
|
6695
6695
|
}
|
|
6696
6696
|
async retrieveData(t) {
|
|
6697
6697
|
let e;
|
|
6698
|
-
if (x.is(this.interaction.data) ||
|
|
6698
|
+
if (x.is(this.interaction.data) || O.is(this.interaction.data)) {
|
|
6699
6699
|
const i = this.interaction.data.name, { modifier: r, attributeQuery: s } = Object.fromEntries(
|
|
6700
6700
|
this.interaction.query?.items?.map((n) => [n.name, n.value]) || []
|
|
6701
6701
|
), a = { ...t.query?.modifier || {}, ...r || {} }, o = t.query?.attributeQuery || [];
|
|
@@ -6949,14 +6949,14 @@ class rt {
|
|
|
6949
6949
|
async saveUserRefs(t, e, i) {
|
|
6950
6950
|
const r = (await this.getActivity(t))?.refs || {};
|
|
6951
6951
|
e.interaction.userRef?.name && (r[e.interaction.userRef?.name] = i.user.id), e.interaction.payload?.items.forEach((s) => {
|
|
6952
|
-
if (
|
|
6952
|
+
if (j.is(s.itemRef) && s.itemRef?.name && i.payload[s.name]) {
|
|
6953
6953
|
const a = i.payload[s.name];
|
|
6954
6954
|
s.isCollection ? (r[s.itemRef.name] || (r[s.itemRef.name] = []), r[s.itemRef.name].push(a.id)) : r[s.itemRef.name] = a.id;
|
|
6955
6955
|
}
|
|
6956
6956
|
}), await this.setActivity(t, { refs: r });
|
|
6957
6957
|
}
|
|
6958
6958
|
}
|
|
6959
|
-
class
|
|
6959
|
+
class pi extends D {
|
|
6960
6960
|
onChange(t, e) {
|
|
6961
6961
|
if (this.graph.isStartNode(t)) {
|
|
6962
6962
|
if (e)
|
|
@@ -6967,87 +6967,87 @@ class hi extends D {
|
|
|
6967
6967
|
}
|
|
6968
6968
|
}
|
|
6969
6969
|
}
|
|
6970
|
-
D.GroupStateNodeType.set("any",
|
|
6971
|
-
class
|
|
6970
|
+
D.GroupStateNodeType.set("any", pi);
|
|
6971
|
+
class fi extends D {
|
|
6972
6972
|
onChange(t, e) {
|
|
6973
6973
|
this.isGroupCompleted() && this.complete();
|
|
6974
6974
|
}
|
|
6975
6975
|
}
|
|
6976
|
-
D.GroupStateNodeType.set("every",
|
|
6977
|
-
class
|
|
6976
|
+
D.GroupStateNodeType.set("every", fi);
|
|
6977
|
+
class mi extends D {
|
|
6978
6978
|
onChange(t, e) {
|
|
6979
6979
|
this.graph.isEndNode(t) && this.complete();
|
|
6980
6980
|
}
|
|
6981
6981
|
}
|
|
6982
|
-
D.GroupStateNodeType.set("race",
|
|
6983
|
-
class
|
|
6982
|
+
D.GroupStateNodeType.set("race", mi);
|
|
6983
|
+
class yi extends D {
|
|
6984
6984
|
// 可以根据 group 上的具体配置逻辑,来动态决定。
|
|
6985
6985
|
}
|
|
6986
|
-
D.GroupStateNodeType.set("program",
|
|
6987
|
-
const I = new
|
|
6988
|
-
name:
|
|
6986
|
+
D.GroupStateNodeType.set("program", yi);
|
|
6987
|
+
const I = new xe(), H = "_Interaction_", vt = "_Activity_", zt = x.create({
|
|
6988
|
+
name: H,
|
|
6989
6989
|
properties: [
|
|
6990
|
-
|
|
6990
|
+
T.create({
|
|
6991
6991
|
name: "interactionId",
|
|
6992
6992
|
type: "string",
|
|
6993
6993
|
collection: !1
|
|
6994
6994
|
}),
|
|
6995
|
-
|
|
6995
|
+
T.create({
|
|
6996
6996
|
name: "interactionName",
|
|
6997
6997
|
type: "string",
|
|
6998
6998
|
collection: !1
|
|
6999
6999
|
}),
|
|
7000
|
-
|
|
7000
|
+
T.create({
|
|
7001
7001
|
name: "payload",
|
|
7002
7002
|
type: "object",
|
|
7003
7003
|
collection: !1
|
|
7004
7004
|
}),
|
|
7005
|
-
|
|
7005
|
+
T.create({
|
|
7006
7006
|
name: "user",
|
|
7007
7007
|
type: "object",
|
|
7008
7008
|
collection: !1
|
|
7009
7009
|
}),
|
|
7010
|
-
|
|
7010
|
+
T.create({
|
|
7011
7011
|
name: "query",
|
|
7012
7012
|
type: "object",
|
|
7013
7013
|
collection: !1
|
|
7014
7014
|
})
|
|
7015
7015
|
]
|
|
7016
7016
|
}), Te = x.create({
|
|
7017
|
-
name:
|
|
7017
|
+
name: vt,
|
|
7018
7018
|
properties: [
|
|
7019
|
-
|
|
7019
|
+
T.create({
|
|
7020
7020
|
name: "name",
|
|
7021
7021
|
type: "string",
|
|
7022
7022
|
collection: !1
|
|
7023
7023
|
}),
|
|
7024
|
-
|
|
7024
|
+
T.create({
|
|
7025
7025
|
name: "uuid",
|
|
7026
7026
|
type: "string",
|
|
7027
7027
|
collection: !1
|
|
7028
7028
|
}),
|
|
7029
|
-
|
|
7029
|
+
T.create({
|
|
7030
7030
|
name: "state",
|
|
7031
7031
|
type: "object",
|
|
7032
7032
|
collection: !1
|
|
7033
7033
|
}),
|
|
7034
|
-
|
|
7034
|
+
T.create({
|
|
7035
7035
|
name: "refs",
|
|
7036
7036
|
type: "object",
|
|
7037
7037
|
collection: !1
|
|
7038
7038
|
})
|
|
7039
7039
|
]
|
|
7040
|
-
}),
|
|
7040
|
+
}), gi = O.create({
|
|
7041
7041
|
name: "activityInteraction",
|
|
7042
7042
|
source: Te,
|
|
7043
7043
|
sourceProperty: "interaction",
|
|
7044
|
-
target:
|
|
7044
|
+
target: zt,
|
|
7045
7045
|
targetProperty: "activity",
|
|
7046
7046
|
type: "1:n"
|
|
7047
7047
|
});
|
|
7048
|
-
class
|
|
7048
|
+
class bi {
|
|
7049
7049
|
constructor(t, e, i) {
|
|
7050
|
-
this.controller = t, this.activityCalls = /* @__PURE__ */ new Map(), this.activityCallsByName = /* @__PURE__ */ new Map(), this.interactionCallsByName = /* @__PURE__ */ new Map(), this.interactionCalls = /* @__PURE__ */ new Map(), this.controller.entities.push(Te,
|
|
7050
|
+
this.controller = t, this.activityCalls = /* @__PURE__ */ new Map(), this.activityCallsByName = /* @__PURE__ */ new Map(), this.interactionCallsByName = /* @__PURE__ */ new Map(), this.interactionCalls = /* @__PURE__ */ new Map(), this.controller.entities.push(Te, zt), this.controller.relations.push(gi), e.forEach((r) => {
|
|
7051
7051
|
const s = new rt(r, t);
|
|
7052
7052
|
this.activityCalls.set(r.uuid, s), r.name && (k(!this.activityCallsByName.has(r.name), `activity name ${r.name} is duplicated`), this.activityCallsByName.set(r.name, s));
|
|
7053
7053
|
}), i.forEach((r) => {
|
|
@@ -7165,7 +7165,7 @@ class gi {
|
|
|
7165
7165
|
}
|
|
7166
7166
|
}
|
|
7167
7167
|
async createActivity(t) {
|
|
7168
|
-
return this.controller.system.storage.create(
|
|
7168
|
+
return this.controller.system.storage.create(vt, {
|
|
7169
7169
|
...t,
|
|
7170
7170
|
state: t.state,
|
|
7171
7171
|
refs: t.refs
|
|
@@ -7175,20 +7175,20 @@ class gi {
|
|
|
7175
7175
|
const i = {
|
|
7176
7176
|
...e
|
|
7177
7177
|
};
|
|
7178
|
-
return delete i.state, delete i.refs, e.state && (i.state = e.state), e.refs && (i.refs = e.refs), this.controller.system.storage.update(
|
|
7178
|
+
return delete i.state, delete i.refs, e.state && (i.state = e.state), e.refs && (i.refs = e.refs), this.controller.system.storage.update(vt, t, i);
|
|
7179
7179
|
}
|
|
7180
7180
|
async getActivity(t) {
|
|
7181
|
-
return (await this.controller.system.storage.find(
|
|
7181
|
+
return (await this.controller.system.storage.find(vt, t, void 0, ["*"])).map((e) => ({
|
|
7182
7182
|
...e,
|
|
7183
7183
|
state: e.state,
|
|
7184
7184
|
refs: e.refs
|
|
7185
7185
|
}));
|
|
7186
7186
|
}
|
|
7187
7187
|
async saveEvent(t, e = []) {
|
|
7188
|
-
return this.controller.system.storage.create(
|
|
7188
|
+
return this.controller.system.storage.create(H, t, e);
|
|
7189
7189
|
}
|
|
7190
7190
|
async getEvent(t) {
|
|
7191
|
-
return (await this.controller.system.storage.find(
|
|
7191
|
+
return (await this.controller.system.storage.find(H, t, void 0, ["*"])).map((e) => ({
|
|
7192
7192
|
...e
|
|
7193
7193
|
}));
|
|
7194
7194
|
}
|
|
@@ -7207,7 +7207,7 @@ class gi {
|
|
|
7207
7207
|
}
|
|
7208
7208
|
class A {
|
|
7209
7209
|
static {
|
|
7210
|
-
this.skip = () => new
|
|
7210
|
+
this.skip = () => new Et();
|
|
7211
7211
|
}
|
|
7212
7212
|
static {
|
|
7213
7213
|
this.resolved = (t, e) => new ke(t, e);
|
|
@@ -7219,7 +7219,7 @@ class A {
|
|
|
7219
7219
|
this.fullRecompute = (t) => new Se(t);
|
|
7220
7220
|
}
|
|
7221
7221
|
}
|
|
7222
|
-
class
|
|
7222
|
+
class Et extends A {
|
|
7223
7223
|
}
|
|
7224
7224
|
class Se extends A {
|
|
7225
7225
|
constructor(t) {
|
|
@@ -7251,15 +7251,15 @@ class E {
|
|
|
7251
7251
|
return t[this.key];
|
|
7252
7252
|
}
|
|
7253
7253
|
}
|
|
7254
|
-
class
|
|
7254
|
+
class B {
|
|
7255
7255
|
constructor(t) {
|
|
7256
7256
|
this.defaultValue = t;
|
|
7257
7257
|
}
|
|
7258
7258
|
async set(t) {
|
|
7259
|
-
return await this.controller.system.storage.set(
|
|
7259
|
+
return await this.controller.system.storage.set(W, this.key, t), t;
|
|
7260
7260
|
}
|
|
7261
7261
|
async get() {
|
|
7262
|
-
return await this.controller.system.storage.get(
|
|
7262
|
+
return await this.controller.system.storage.get(W, this.key);
|
|
7263
7263
|
}
|
|
7264
7264
|
}
|
|
7265
7265
|
function ue(u, t) {
|
|
@@ -7269,7 +7269,7 @@ function ue(u, t) {
|
|
|
7269
7269
|
return !1;
|
|
7270
7270
|
return !0;
|
|
7271
7271
|
}
|
|
7272
|
-
class
|
|
7272
|
+
class Ae {
|
|
7273
7273
|
constructor(t) {
|
|
7274
7274
|
this.data = t, this.map = {};
|
|
7275
7275
|
for (const e of t.transfers)
|
|
@@ -7291,19 +7291,19 @@ class zt {
|
|
|
7291
7291
|
return this.data.transfers.filter((e) => ue(e.trigger, t));
|
|
7292
7292
|
}
|
|
7293
7293
|
}
|
|
7294
|
-
class
|
|
7294
|
+
class Ri {
|
|
7295
7295
|
constructor(t, e, i) {
|
|
7296
|
-
this.controller = t, this.args = e, this.dataContext = i, this.useLastValue = !0, this.eventDeps = {}, this.transitionFinder = new
|
|
7296
|
+
this.controller = t, this.args = e, this.dataContext = i, this.useLastValue = !0, this.eventDeps = {}, this.transitionFinder = new Ae(this.args), this.defaultState = this.args.defaultState;
|
|
7297
7297
|
}
|
|
7298
7298
|
static {
|
|
7299
|
-
this.computationType =
|
|
7299
|
+
this.computationType = dt;
|
|
7300
7300
|
}
|
|
7301
7301
|
static {
|
|
7302
7302
|
this.contextType = "global";
|
|
7303
7303
|
}
|
|
7304
7304
|
createState() {
|
|
7305
7305
|
return {
|
|
7306
|
-
currentState: new
|
|
7306
|
+
currentState: new B(this.defaultState.name)
|
|
7307
7307
|
};
|
|
7308
7308
|
}
|
|
7309
7309
|
// 这里的 defaultValue 不能是 async 的模式。因为是直接创建时填入的。
|
|
@@ -7311,7 +7311,7 @@ class bi {
|
|
|
7311
7311
|
return this.defaultState.computeValue ? this.defaultState.computeValue.call(this.controller, void 0, t) : this.defaultState.name;
|
|
7312
7312
|
}
|
|
7313
7313
|
mutationEventToTrigger(t) {
|
|
7314
|
-
if (t.recordName ===
|
|
7314
|
+
if (t.recordName === H) {
|
|
7315
7315
|
const e = t.record.interactionName;
|
|
7316
7316
|
return this.controller.interactions.find((r) => r.name === e);
|
|
7317
7317
|
} else
|
|
@@ -7321,7 +7321,7 @@ class bi {
|
|
|
7321
7321
|
};
|
|
7322
7322
|
}
|
|
7323
7323
|
async incrementalCompute(t, e, i) {
|
|
7324
|
-
k(e.recordName ===
|
|
7324
|
+
k(e.recordName === H, "Record StateMachine only supports interaction record");
|
|
7325
7325
|
const r = await this.state.currentState.get(), s = this.mutationEventToTrigger(e), a = this.transitionFinder?.findNextState(r, s);
|
|
7326
7326
|
if (!a) return A.skip();
|
|
7327
7327
|
await this.state.currentState.set(a.name);
|
|
@@ -7329,12 +7329,12 @@ class bi {
|
|
|
7329
7329
|
return a.computeValue ? await a.computeValue.call(this.controller, t, o) : a.name;
|
|
7330
7330
|
}
|
|
7331
7331
|
}
|
|
7332
|
-
class
|
|
7332
|
+
class wi {
|
|
7333
7333
|
constructor(t, e, i) {
|
|
7334
|
-
this.controller = t, this.args = e, this.useLastValue = !0, this.eventDeps = {}, this.transitionFinder = new
|
|
7334
|
+
this.controller = t, this.args = e, this.useLastValue = !0, this.eventDeps = {}, this.transitionFinder = new Ae(this.args), this.defaultState = this.args.defaultState, this.dataContext = i;
|
|
7335
7335
|
}
|
|
7336
7336
|
static {
|
|
7337
|
-
this.computationType =
|
|
7337
|
+
this.computationType = dt;
|
|
7338
7338
|
}
|
|
7339
7339
|
static {
|
|
7340
7340
|
this.contextType = "property";
|
|
@@ -7356,7 +7356,7 @@ Or if you want to use state name as value, you should not set ${this.dataContext
|
|
|
7356
7356
|
), e !== void 0 || this.defaultState.computeValue ? this.defaultState.computeValue.call(this.controller, e, void 0) : this.defaultState.name;
|
|
7357
7357
|
}
|
|
7358
7358
|
mutationEventToTrigger(t) {
|
|
7359
|
-
if (t.recordName ===
|
|
7359
|
+
if (t.recordName === H) {
|
|
7360
7360
|
const e = t.record.interactionName;
|
|
7361
7361
|
return this.controller.interactions.find((r) => r.name === e);
|
|
7362
7362
|
}
|
|
@@ -7366,13 +7366,13 @@ Or if you want to use state name as value, you should not set ${this.dataContext
|
|
|
7366
7366
|
if (e) {
|
|
7367
7367
|
const i = this.transitionFinder.findTransfers(e);
|
|
7368
7368
|
return (await Promise.all(i.map((r) => {
|
|
7369
|
-
const s = t.recordName ===
|
|
7369
|
+
const s = t.recordName === H ? t.record : t;
|
|
7370
7370
|
return r.computeTarget.call(this.controller, s);
|
|
7371
7371
|
}))).flat().filter(Boolean);
|
|
7372
7372
|
}
|
|
7373
7373
|
}
|
|
7374
7374
|
async incrementalCompute(t, e, i) {
|
|
7375
|
-
k(e.recordName ===
|
|
7375
|
+
k(e.recordName === H, "Record StateMachine only supports interaction record");
|
|
7376
7376
|
const r = await this.state.currentState.get(i), s = this.mutationEventToTrigger(e), a = this.transitionFinder?.findNextState(r, s);
|
|
7377
7377
|
if (!a) return A.skip();
|
|
7378
7378
|
await this.state.currentState.set(i, a.name);
|
|
@@ -7380,75 +7380,16 @@ Or if you want to use state name as value, you should not set ${this.dataContext
|
|
|
7380
7380
|
return a.computeValue ? await a.computeValue.call(this.controller, t, o) : a.name;
|
|
7381
7381
|
}
|
|
7382
7382
|
}
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
createState() {
|
|
7394
|
-
return {
|
|
7395
|
-
currentState: new E(this.defaultState.name)
|
|
7396
|
-
};
|
|
7397
|
-
}
|
|
7398
|
-
// 这里的 defaultValue 不能是 async 的模式。因为是直接创建时填入的。
|
|
7399
|
-
getDefaultValue(t) {
|
|
7400
|
-
return this.defaultState.computeValue ? this.defaultState.computeValue.call(this.controller, void 0, t) : this.defaultState.name;
|
|
7401
|
-
}
|
|
7402
|
-
mutationEventToTrigger(t) {
|
|
7403
|
-
if (t.recordName === B) {
|
|
7404
|
-
const e = t.record.interactionName;
|
|
7405
|
-
return this.controller.interactions.find((r) => r.name === e);
|
|
7406
|
-
}
|
|
7407
|
-
}
|
|
7408
|
-
async computeDirtyRecords(t) {
|
|
7409
|
-
const e = this.mutationEventToTrigger(t);
|
|
7410
|
-
if (e) {
|
|
7411
|
-
const i = this.transitionFinder.findTransfers(e);
|
|
7412
|
-
return (await Promise.all(i.map((r) => {
|
|
7413
|
-
const s = t.recordName === B ? t.record : t;
|
|
7414
|
-
return r.computeTarget.call(this.controller, s);
|
|
7415
|
-
}))).flat().filter(Boolean);
|
|
7416
|
-
}
|
|
7417
|
-
}
|
|
7418
|
-
async incrementalPatchCompute(t, e, i) {
|
|
7419
|
-
k(e.recordName === B, "Record StateMachine only supports interaction record");
|
|
7420
|
-
const r = i.id ? await this.state.currentState.get(i) : this.defaultState.name, s = this.mutationEventToTrigger(e), a = this.transitionFinder?.findNextState(r, s);
|
|
7421
|
-
if (!a) return A.skip();
|
|
7422
|
-
const o = e.record, n = a.computeValue ? await a.computeValue.call(this.controller, t, o) : a.name;
|
|
7423
|
-
if (i.id)
|
|
7424
|
-
return n === null ? {
|
|
7425
|
-
type: "delete",
|
|
7426
|
-
affectedId: [i.id]
|
|
7427
|
-
} : {
|
|
7428
|
-
type: "update",
|
|
7429
|
-
affectedId: [i.id],
|
|
7430
|
-
data: {
|
|
7431
|
-
...a,
|
|
7432
|
-
[this.state.currentState.key]: a.name
|
|
7433
|
-
}
|
|
7434
|
-
};
|
|
7435
|
-
if (n)
|
|
7436
|
-
return k(
|
|
7437
|
-
!(this.isRelation && (i.source?.id === void 0 || i.target?.id === void 0)),
|
|
7438
|
-
`
|
|
7439
|
-
${this.dataContext.id.name} StateMachine transfer from ${r} to ${a.name} will create new relation,
|
|
7440
|
-
it requires both source and target id, but your computeTarget function returned ${JSON.stringify(i)}`
|
|
7441
|
-
), {
|
|
7442
|
-
type: "insert",
|
|
7443
|
-
data: {
|
|
7444
|
-
...i,
|
|
7445
|
-
...n,
|
|
7446
|
-
[this.state.currentState.key]: a.name
|
|
7447
|
-
}
|
|
7448
|
-
};
|
|
7449
|
-
}
|
|
7450
|
-
}
|
|
7451
|
-
const Ni = [bi, Ri, wi];
|
|
7383
|
+
const xr = Z.create({
|
|
7384
|
+
name: "nonExistent",
|
|
7385
|
+
computeValue: () => null
|
|
7386
|
+
}), Mr = Z.create({
|
|
7387
|
+
name: "nonDeleted",
|
|
7388
|
+
computeValue: () => !1
|
|
7389
|
+
}), $r = Z.create({
|
|
7390
|
+
name: "deleted",
|
|
7391
|
+
computeValue: () => !0
|
|
7392
|
+
}), Ni = [Ri, wi];
|
|
7452
7393
|
class Ti {
|
|
7453
7394
|
constructor(t, e, i) {
|
|
7454
7395
|
this.controller = t, this.args = e, this.dataContext = i, this.useLastValue = !0, this.dataDeps = {}, this.matchRecordToWeight = this.args.callback.bind(this.controller), this.record = this.args.record, this.dataDeps = {
|
|
@@ -7461,7 +7402,7 @@ class Ti {
|
|
|
7461
7402
|
};
|
|
7462
7403
|
}
|
|
7463
7404
|
static {
|
|
7464
|
-
this.computationType =
|
|
7405
|
+
this.computationType = ht;
|
|
7465
7406
|
}
|
|
7466
7407
|
static {
|
|
7467
7408
|
this.contextType = "global";
|
|
@@ -7520,7 +7461,7 @@ class Si {
|
|
|
7520
7461
|
};
|
|
7521
7462
|
}
|
|
7522
7463
|
static {
|
|
7523
|
-
this.computationType =
|
|
7464
|
+
this.computationType = ht;
|
|
7524
7465
|
}
|
|
7525
7466
|
static {
|
|
7526
7467
|
this.contextType = "property";
|
|
@@ -7591,15 +7532,15 @@ class ki {
|
|
|
7591
7532
|
}, this.defaultValue = !this.args.notEmpty;
|
|
7592
7533
|
}
|
|
7593
7534
|
static {
|
|
7594
|
-
this.computationType =
|
|
7535
|
+
this.computationType = yt;
|
|
7595
7536
|
}
|
|
7596
7537
|
static {
|
|
7597
7538
|
this.contextType = "global";
|
|
7598
7539
|
}
|
|
7599
7540
|
createState() {
|
|
7600
7541
|
return {
|
|
7601
|
-
matchCount: new
|
|
7602
|
-
totalCount: new
|
|
7542
|
+
matchCount: new B(0),
|
|
7543
|
+
totalCount: new B(0),
|
|
7603
7544
|
isItemMatch: new E(!1, this.args.record.name)
|
|
7604
7545
|
};
|
|
7605
7546
|
}
|
|
@@ -7651,7 +7592,7 @@ class Ai {
|
|
|
7651
7592
|
};
|
|
7652
7593
|
}
|
|
7653
7594
|
static {
|
|
7654
|
-
this.computationType =
|
|
7595
|
+
this.computationType = yt;
|
|
7655
7596
|
}
|
|
7656
7597
|
static {
|
|
7657
7598
|
this.contextType = "property";
|
|
@@ -7719,14 +7660,14 @@ class Ii {
|
|
|
7719
7660
|
};
|
|
7720
7661
|
}
|
|
7721
7662
|
static {
|
|
7722
|
-
this.computationType =
|
|
7663
|
+
this.computationType = gt;
|
|
7723
7664
|
}
|
|
7724
7665
|
static {
|
|
7725
7666
|
this.contextType = "global";
|
|
7726
7667
|
}
|
|
7727
7668
|
createState() {
|
|
7728
7669
|
return {
|
|
7729
|
-
matchCount: new
|
|
7670
|
+
matchCount: new B(0),
|
|
7730
7671
|
isItemMatch: new E(!1, this.args.record.name)
|
|
7731
7672
|
};
|
|
7732
7673
|
}
|
|
@@ -7783,7 +7724,7 @@ class Ci {
|
|
|
7783
7724
|
};
|
|
7784
7725
|
}
|
|
7785
7726
|
static {
|
|
7786
|
-
this.computationType =
|
|
7727
|
+
this.computationType = gt;
|
|
7787
7728
|
}
|
|
7788
7729
|
static {
|
|
7789
7730
|
this.contextType = "property";
|
|
@@ -7849,14 +7790,14 @@ class Mi {
|
|
|
7849
7790
|
};
|
|
7850
7791
|
}
|
|
7851
7792
|
static {
|
|
7852
|
-
this.computationType =
|
|
7793
|
+
this.computationType = pt;
|
|
7853
7794
|
}
|
|
7854
7795
|
static {
|
|
7855
7796
|
this.contextType = "global";
|
|
7856
7797
|
}
|
|
7857
7798
|
createState() {
|
|
7858
7799
|
return {
|
|
7859
|
-
count: new
|
|
7800
|
+
count: new B(0),
|
|
7860
7801
|
isItemMatch: new E(!1, this.record.name)
|
|
7861
7802
|
};
|
|
7862
7803
|
}
|
|
@@ -7905,7 +7846,7 @@ class $i {
|
|
|
7905
7846
|
};
|
|
7906
7847
|
}
|
|
7907
7848
|
static {
|
|
7908
|
-
this.computationType =
|
|
7849
|
+
this.computationType = pt;
|
|
7909
7850
|
}
|
|
7910
7851
|
static {
|
|
7911
7852
|
this.contextType = "property";
|
|
@@ -7981,7 +7922,7 @@ class Oi {
|
|
|
7981
7922
|
};
|
|
7982
7923
|
}
|
|
7983
7924
|
static {
|
|
7984
|
-
this.computationType =
|
|
7925
|
+
this.computationType = xt;
|
|
7985
7926
|
}
|
|
7986
7927
|
static {
|
|
7987
7928
|
this.contextType = ["entity", "relation"];
|
|
@@ -8058,19 +7999,19 @@ class Oi {
|
|
|
8058
7999
|
}
|
|
8059
8000
|
}
|
|
8060
8001
|
const Di = [Oi];
|
|
8061
|
-
class
|
|
8002
|
+
class P {
|
|
8062
8003
|
constructor(t) {
|
|
8063
8004
|
this.node = t;
|
|
8064
8005
|
}
|
|
8065
8006
|
static number(t) {
|
|
8066
|
-
return new
|
|
8007
|
+
return new P({ type: "number", value: t });
|
|
8067
8008
|
}
|
|
8068
8009
|
static variable(t) {
|
|
8069
|
-
return new
|
|
8010
|
+
return new P({ type: "variable", variable: { id: t } });
|
|
8070
8011
|
}
|
|
8071
8012
|
add(t) {
|
|
8072
8013
|
const e = typeof t == "number" ? { type: "number", value: t } : t.node;
|
|
8073
|
-
return new
|
|
8014
|
+
return new P({
|
|
8074
8015
|
type: "operation",
|
|
8075
8016
|
operation: "+",
|
|
8076
8017
|
left: this.node,
|
|
@@ -8079,7 +8020,7 @@ class O {
|
|
|
8079
8020
|
}
|
|
8080
8021
|
subtract(t) {
|
|
8081
8022
|
const e = typeof t == "number" ? { type: "number", value: t } : t.node;
|
|
8082
|
-
return new
|
|
8023
|
+
return new P({
|
|
8083
8024
|
type: "operation",
|
|
8084
8025
|
operation: "-",
|
|
8085
8026
|
left: this.node,
|
|
@@ -8088,7 +8029,7 @@ class O {
|
|
|
8088
8029
|
}
|
|
8089
8030
|
multiply(t) {
|
|
8090
8031
|
const e = typeof t == "number" ? { type: "number", value: t } : t.node;
|
|
8091
|
-
return new
|
|
8032
|
+
return new P({
|
|
8092
8033
|
type: "operation",
|
|
8093
8034
|
operation: "*",
|
|
8094
8035
|
left: this.node,
|
|
@@ -8097,7 +8038,7 @@ class O {
|
|
|
8097
8038
|
}
|
|
8098
8039
|
divide(t) {
|
|
8099
8040
|
const e = typeof t == "number" ? { type: "number", value: t } : t.node;
|
|
8100
|
-
return new
|
|
8041
|
+
return new P({
|
|
8101
8042
|
type: "operation",
|
|
8102
8043
|
operation: "/",
|
|
8103
8044
|
left: this.node,
|
|
@@ -8106,7 +8047,7 @@ class O {
|
|
|
8106
8047
|
}
|
|
8107
8048
|
power(t) {
|
|
8108
8049
|
const e = typeof t == "number" ? { type: "number", value: t } : t.node;
|
|
8109
|
-
return new
|
|
8050
|
+
return new P({
|
|
8110
8051
|
type: "operation",
|
|
8111
8052
|
operation: "^",
|
|
8112
8053
|
left: this.node,
|
|
@@ -8114,7 +8055,7 @@ class O {
|
|
|
8114
8055
|
});
|
|
8115
8056
|
}
|
|
8116
8057
|
sqrt() {
|
|
8117
|
-
return new
|
|
8058
|
+
return new P({
|
|
8118
8059
|
type: "operation",
|
|
8119
8060
|
operation: "sqrt",
|
|
8120
8061
|
left: this.node
|
|
@@ -8156,10 +8097,10 @@ class O {
|
|
|
8156
8097
|
}
|
|
8157
8098
|
}
|
|
8158
8099
|
gt(t) {
|
|
8159
|
-
return new
|
|
8100
|
+
return new It(this, ">", t);
|
|
8160
8101
|
}
|
|
8161
8102
|
lt(t) {
|
|
8162
|
-
return new
|
|
8103
|
+
return new It(this, "<", t);
|
|
8163
8104
|
}
|
|
8164
8105
|
eq(t) {
|
|
8165
8106
|
return new Zt(this, t);
|
|
@@ -8172,7 +8113,7 @@ class O {
|
|
|
8172
8113
|
t.type === "variable" ? e.add(t.variable.id) : t.type === "operation" && (t.left && this.collectVariables(t.left, e), t.right && this.collectVariables(t.right, e));
|
|
8173
8114
|
}
|
|
8174
8115
|
clone() {
|
|
8175
|
-
return new
|
|
8116
|
+
return new P(this.cloneNode(this.node));
|
|
8176
8117
|
}
|
|
8177
8118
|
cloneNode(t) {
|
|
8178
8119
|
const e = { type: t.type };
|
|
@@ -8259,7 +8200,7 @@ class O {
|
|
|
8259
8200
|
}
|
|
8260
8201
|
}
|
|
8261
8202
|
}
|
|
8262
|
-
class
|
|
8203
|
+
class It {
|
|
8263
8204
|
constructor(t, e, i) {
|
|
8264
8205
|
this.left = t, this.operator = e, this.right = i;
|
|
8265
8206
|
}
|
|
@@ -8268,7 +8209,7 @@ class Et {
|
|
|
8268
8209
|
return this.operator === ">" ? e > i : e < i;
|
|
8269
8210
|
}
|
|
8270
8211
|
solve() {
|
|
8271
|
-
const t = typeof this.right == "number" ?
|
|
8212
|
+
const t = typeof this.right == "number" ? P.number(this.right) : this.right, e = this.left.getVariables(), i = t.getVariables(), r = [.../* @__PURE__ */ new Set([...e, ...i])];
|
|
8272
8213
|
if (r.length !== 1)
|
|
8273
8214
|
throw new Error("Can only solve inequalities with exactly one variable");
|
|
8274
8215
|
const s = r[0];
|
|
@@ -8303,7 +8244,7 @@ class Zt {
|
|
|
8303
8244
|
return Math.abs(e - i) < 1e-10;
|
|
8304
8245
|
}
|
|
8305
8246
|
solve() {
|
|
8306
|
-
const t = typeof this.right == "number" ?
|
|
8247
|
+
const t = typeof this.right == "number" ? P.number(this.right) : this.right, e = this.left.getVariables(), i = t.getVariables(), r = [.../* @__PURE__ */ new Set([...e, ...i])];
|
|
8307
8248
|
if (r.length !== 1)
|
|
8308
8249
|
throw new Error("Can only solve equations with exactly one variable");
|
|
8309
8250
|
const s = r[0];
|
|
@@ -8334,15 +8275,15 @@ class Fi {
|
|
|
8334
8275
|
this.controller = t, this.args = e, this.dataContext = i, this.useLastValue = !1, this.dataDeps = this.args.dataDeps ?? {}, this.callback = (r, s) => this.args.callback.call(this.controller, r, s), this.nextRecomputeTime = this.args.nextRecomputeTime ? (r, s) => this.args.nextRecomputeTime.call(this.controller, r, s) : void 0;
|
|
8335
8276
|
}
|
|
8336
8277
|
static {
|
|
8337
|
-
this.computationType =
|
|
8278
|
+
this.computationType = bt;
|
|
8338
8279
|
}
|
|
8339
8280
|
static {
|
|
8340
8281
|
this.contextType = "global";
|
|
8341
8282
|
}
|
|
8342
8283
|
createState() {
|
|
8343
8284
|
return {
|
|
8344
|
-
lastRecomputeTime: new
|
|
8345
|
-
nextRecomputeTime: new
|
|
8285
|
+
lastRecomputeTime: new B(null),
|
|
8286
|
+
nextRecomputeTime: new B(null)
|
|
8346
8287
|
};
|
|
8347
8288
|
}
|
|
8348
8289
|
getDefaultValue() {
|
|
@@ -8350,11 +8291,11 @@ class Fi {
|
|
|
8350
8291
|
}
|
|
8351
8292
|
// TODO now 是不是应该用 dataDeps 动态注入???这样能手动测试。改成在哪里配置?
|
|
8352
8293
|
async compute(t) {
|
|
8353
|
-
const e = await this.args.callback(
|
|
8294
|
+
const e = await this.args.callback(P.variable("now"), t), i = Date.now();
|
|
8354
8295
|
let r, s;
|
|
8355
|
-
if (e instanceof
|
|
8296
|
+
if (e instanceof P)
|
|
8356
8297
|
r = e.evaluate({ now: i }), s = i + this.nextRecomputeTime(i, t);
|
|
8357
|
-
else if (e instanceof
|
|
8298
|
+
else if (e instanceof It || e instanceof Zt)
|
|
8358
8299
|
r = e.evaluate({ now: i }), s = e.solve();
|
|
8359
8300
|
else
|
|
8360
8301
|
throw new Error("Invalid result type");
|
|
@@ -8372,7 +8313,7 @@ class Qi {
|
|
|
8372
8313
|
}, this.isResultNumber = this.dataContext.id.type === "number", this.callback = (r, s) => this.args.callback.call(this.controller, r, s), this.nextRecomputeTime = this.args.nextRecomputeTime ? (r, s) => this.args.nextRecomputeTime.call(this.controller, r, s) : void 0;
|
|
8373
8314
|
}
|
|
8374
8315
|
static {
|
|
8375
|
-
this.computationType =
|
|
8316
|
+
this.computationType = bt;
|
|
8376
8317
|
}
|
|
8377
8318
|
static {
|
|
8378
8319
|
this.contextType = "property";
|
|
@@ -8388,11 +8329,11 @@ class Qi {
|
|
|
8388
8329
|
}
|
|
8389
8330
|
// TODO now 是不是应该用 dataDeps 动态注入???这样能手动测试。改成在哪里配置?
|
|
8390
8331
|
async compute(t, e) {
|
|
8391
|
-
const i = await this.args.callback(
|
|
8332
|
+
const i = await this.args.callback(P.variable("now"), t), r = Date.now();
|
|
8392
8333
|
let s, a;
|
|
8393
|
-
if (i instanceof
|
|
8334
|
+
if (i instanceof P)
|
|
8394
8335
|
s = i.evaluate({ now: r }), a = r + this.nextRecomputeTime(r, t);
|
|
8395
|
-
else if (i instanceof
|
|
8336
|
+
else if (i instanceof It || i instanceof Zt)
|
|
8396
8337
|
s = i.evaluate({ now: r }), a = i.solve();
|
|
8397
8338
|
else
|
|
8398
8339
|
throw new Error("Invalid result type");
|
|
@@ -8417,7 +8358,7 @@ class Li {
|
|
|
8417
8358
|
};
|
|
8418
8359
|
}
|
|
8419
8360
|
static {
|
|
8420
|
-
this.computationType =
|
|
8361
|
+
this.computationType = ft;
|
|
8421
8362
|
}
|
|
8422
8363
|
static {
|
|
8423
8364
|
this.contextType = "global";
|
|
@@ -8482,7 +8423,7 @@ class qi {
|
|
|
8482
8423
|
};
|
|
8483
8424
|
}
|
|
8484
8425
|
static {
|
|
8485
|
-
this.computationType =
|
|
8426
|
+
this.computationType = ft;
|
|
8486
8427
|
}
|
|
8487
8428
|
static {
|
|
8488
8429
|
this.contextType = "property";
|
|
@@ -8568,15 +8509,15 @@ class Bi {
|
|
|
8568
8509
|
};
|
|
8569
8510
|
}
|
|
8570
8511
|
static {
|
|
8571
|
-
this.computationType =
|
|
8512
|
+
this.computationType = mt;
|
|
8572
8513
|
}
|
|
8573
8514
|
static {
|
|
8574
8515
|
this.contextType = "global";
|
|
8575
8516
|
}
|
|
8576
8517
|
createState() {
|
|
8577
8518
|
return {
|
|
8578
|
-
sum: new
|
|
8579
|
-
count: new
|
|
8519
|
+
sum: new B(0),
|
|
8520
|
+
count: new B(0),
|
|
8580
8521
|
itemValue: new E(0, this.record.name)
|
|
8581
8522
|
};
|
|
8582
8523
|
}
|
|
@@ -8645,7 +8586,7 @@ class Wi {
|
|
|
8645
8586
|
};
|
|
8646
8587
|
}
|
|
8647
8588
|
static {
|
|
8648
|
-
this.computationType =
|
|
8589
|
+
this.computationType = mt;
|
|
8649
8590
|
}
|
|
8650
8591
|
static {
|
|
8651
8592
|
this.contextType = "property";
|
|
@@ -8709,7 +8650,7 @@ class Wi {
|
|
|
8709
8650
|
}
|
|
8710
8651
|
}
|
|
8711
8652
|
const Ji = [Bi, Wi];
|
|
8712
|
-
class
|
|
8653
|
+
class $t {
|
|
8713
8654
|
constructor(t, e, i) {
|
|
8714
8655
|
this.controller = t, this.args = e, this.dataContext = i, this.state = {}, this.dataDeps = {}, this.useLastValue = e.useLastValue !== void 0 ? e.useLastValue : !0, e.dataDeps && (this.dataDeps = e.dataDeps), e.compute && (this.computeCallback = e.compute, this.compute = async (...r) => {
|
|
8715
8656
|
if (this.computeCallback) {
|
|
@@ -8753,7 +8694,7 @@ class Mt {
|
|
|
8753
8694
|
}));
|
|
8754
8695
|
}
|
|
8755
8696
|
static {
|
|
8756
|
-
this.computationType =
|
|
8697
|
+
this.computationType = Yt;
|
|
8757
8698
|
}
|
|
8758
8699
|
createState() {
|
|
8759
8700
|
if (this.createStateCallback) {
|
|
@@ -8780,22 +8721,22 @@ class Mt {
|
|
|
8780
8721
|
return A.skip();
|
|
8781
8722
|
}
|
|
8782
8723
|
}
|
|
8783
|
-
class ji extends
|
|
8724
|
+
class ji extends $t {
|
|
8784
8725
|
static {
|
|
8785
8726
|
this.contextType = "global";
|
|
8786
8727
|
}
|
|
8787
8728
|
}
|
|
8788
|
-
class Hi extends
|
|
8729
|
+
class Hi extends $t {
|
|
8789
8730
|
static {
|
|
8790
8731
|
this.contextType = "entity";
|
|
8791
8732
|
}
|
|
8792
8733
|
}
|
|
8793
|
-
class Ui extends
|
|
8734
|
+
class Ui extends $t {
|
|
8794
8735
|
static {
|
|
8795
8736
|
this.contextType = "relation";
|
|
8796
8737
|
}
|
|
8797
8738
|
}
|
|
8798
|
-
class Gi extends
|
|
8739
|
+
class Gi extends $t {
|
|
8799
8740
|
static {
|
|
8800
8741
|
this.contextType = "property";
|
|
8801
8742
|
}
|
|
@@ -8840,7 +8781,7 @@ class Xi {
|
|
|
8840
8781
|
} else {
|
|
8841
8782
|
const r = {
|
|
8842
8783
|
type: "records",
|
|
8843
|
-
source:
|
|
8784
|
+
source: zt,
|
|
8844
8785
|
attributeQuery: ["*"]
|
|
8845
8786
|
};
|
|
8846
8787
|
e.push(...this.convertDataDepToERMutationEventsSourceMap("record", r, i, "create"));
|
|
@@ -8879,7 +8820,7 @@ class Xi {
|
|
|
8879
8820
|
* @returns 是否需要触发计算
|
|
8880
8821
|
*/
|
|
8881
8822
|
shouldTriggerUpdateComputation(t, e) {
|
|
8882
|
-
return t.type !== "update" ? !0 : t.dataDep.type === "global" && e.recordName === _ ? e.record?.concept ===
|
|
8823
|
+
return t.type !== "update" ? !0 : t.dataDep.type === "global" && e.recordName === _ ? e.record?.concept === W && e.record?.key === t.dataDep.source.name : !t.attributes.filter((r) => r !== "id").every(
|
|
8883
8824
|
(r) => !e.record.hasOwnProperty(r) || e.record[r] === e.oldRecord[r]
|
|
8884
8825
|
);
|
|
8885
8826
|
}
|
|
@@ -9032,7 +8973,7 @@ class Xi {
|
|
|
9032
8973
|
i[t.recordName] || (i[t.recordName] = {}), i[t.recordName][t.type] || (i[t.recordName][t.type] = []), i[t.recordName][t.type].push(t);
|
|
9033
8974
|
}
|
|
9034
8975
|
}
|
|
9035
|
-
const
|
|
8976
|
+
const Ot = "_ASYNC_TASK_";
|
|
9036
8977
|
class Yi {
|
|
9037
8978
|
constructor(t, e, i, r, s) {
|
|
9038
8979
|
this.controller = t, this.computations = /* @__PURE__ */ new Set(), this.computationHandleMap = /* @__PURE__ */ new Map(), this.erMutationEventSources = [], this.dataSourceMapTree = {}, this.sourceMapManager = new Xi(this.controller), this.buildComputationHandleMap(s);
|
|
@@ -9060,20 +9001,20 @@ class Yi {
|
|
|
9060
9001
|
const p = x.create({
|
|
9061
9002
|
name: this.getAsyncTaskRecordKey(h),
|
|
9062
9003
|
properties: [
|
|
9063
|
-
|
|
9004
|
+
T.create({
|
|
9064
9005
|
name: "status",
|
|
9065
9006
|
type: "string"
|
|
9066
9007
|
}),
|
|
9067
|
-
|
|
9008
|
+
T.create({
|
|
9068
9009
|
name: "args",
|
|
9069
9010
|
type: "json"
|
|
9070
9011
|
}),
|
|
9071
|
-
|
|
9012
|
+
T.create({
|
|
9072
9013
|
name: "result",
|
|
9073
9014
|
type: "json"
|
|
9074
9015
|
})
|
|
9075
9016
|
]
|
|
9076
|
-
}), y =
|
|
9017
|
+
}), y = O.create({
|
|
9077
9018
|
name: `${p.name}_${h.dataContext.host.name}_${h.dataContext.id.name}`,
|
|
9078
9019
|
source: p,
|
|
9079
9020
|
target: h.dataContext.host,
|
|
@@ -9086,19 +9027,19 @@ class Yi {
|
|
|
9086
9027
|
const p = x.create({
|
|
9087
9028
|
name: this.getAsyncTaskRecordKey(h),
|
|
9088
9029
|
properties: [
|
|
9089
|
-
|
|
9030
|
+
T.create({
|
|
9090
9031
|
name: "status",
|
|
9091
9032
|
type: "string"
|
|
9092
9033
|
}),
|
|
9093
|
-
|
|
9034
|
+
T.create({
|
|
9094
9035
|
name: "args",
|
|
9095
9036
|
type: "json"
|
|
9096
9037
|
}),
|
|
9097
|
-
|
|
9038
|
+
T.create({
|
|
9098
9039
|
name: "result",
|
|
9099
9040
|
type: "json"
|
|
9100
9041
|
}),
|
|
9101
|
-
|
|
9042
|
+
T.create({
|
|
9102
9043
|
name: "globalKey",
|
|
9103
9044
|
type: "string"
|
|
9104
9045
|
})
|
|
@@ -9110,19 +9051,19 @@ class Yi {
|
|
|
9110
9051
|
const p = x.create({
|
|
9111
9052
|
name: this.getAsyncTaskRecordKey(h),
|
|
9112
9053
|
properties: [
|
|
9113
|
-
|
|
9054
|
+
T.create({
|
|
9114
9055
|
name: "status",
|
|
9115
9056
|
type: "string"
|
|
9116
9057
|
}),
|
|
9117
|
-
|
|
9058
|
+
T.create({
|
|
9118
9059
|
name: "args",
|
|
9119
9060
|
type: "json"
|
|
9120
9061
|
}),
|
|
9121
|
-
|
|
9062
|
+
T.create({
|
|
9122
9063
|
name: "result",
|
|
9123
9064
|
type: "json"
|
|
9124
9065
|
}),
|
|
9125
|
-
|
|
9066
|
+
T.create({
|
|
9126
9067
|
name: "entityName",
|
|
9127
9068
|
type: "string"
|
|
9128
9069
|
})
|
|
@@ -9134,19 +9075,19 @@ class Yi {
|
|
|
9134
9075
|
const p = x.create({
|
|
9135
9076
|
name: this.getAsyncTaskRecordKey(h),
|
|
9136
9077
|
properties: [
|
|
9137
|
-
|
|
9078
|
+
T.create({
|
|
9138
9079
|
name: "status",
|
|
9139
9080
|
type: "string"
|
|
9140
9081
|
}),
|
|
9141
|
-
|
|
9082
|
+
T.create({
|
|
9142
9083
|
name: "args",
|
|
9143
9084
|
type: "json"
|
|
9144
9085
|
}),
|
|
9145
|
-
|
|
9086
|
+
T.create({
|
|
9146
9087
|
name: "result",
|
|
9147
9088
|
type: "json"
|
|
9148
9089
|
}),
|
|
9149
|
-
|
|
9090
|
+
T.create({
|
|
9150
9091
|
name: "relationName",
|
|
9151
9092
|
type: "string"
|
|
9152
9093
|
})
|
|
@@ -9215,7 +9156,7 @@ class Yi {
|
|
|
9215
9156
|
const e = t;
|
|
9216
9157
|
if (e.state)
|
|
9217
9158
|
for (const i of Object.values(e.state))
|
|
9218
|
-
i instanceof
|
|
9159
|
+
i instanceof B && (i.controller = this.controller, await this.controller.system.storage.set(W, i.key, i.defaultValue ?? null));
|
|
9219
9160
|
}
|
|
9220
9161
|
}
|
|
9221
9162
|
async setupMutationListeners() {
|
|
@@ -9354,8 +9295,8 @@ class Yi {
|
|
|
9354
9295
|
getAsyncTaskRecordKey(t) {
|
|
9355
9296
|
if (t.dataContext.type === "property") {
|
|
9356
9297
|
const e = t.dataContext;
|
|
9357
|
-
return `${
|
|
9358
|
-
} else return t.dataContext.type === "global" ? `${
|
|
9298
|
+
return `${Ot}_${e.host.name}_${e.id.name}`;
|
|
9299
|
+
} else return t.dataContext.type === "global" ? `${Ot}_${t.dataContext.id}` : `${Ot}_${t.dataContext.type}_${t.dataContext.id?.name || t.dataContext.id}`;
|
|
9359
9300
|
}
|
|
9360
9301
|
async createAsyncTask(t, e, i, r) {
|
|
9361
9302
|
if (t.dataContext.type === "property")
|
|
@@ -9474,7 +9415,7 @@ class Yi {
|
|
|
9474
9415
|
causedBy: o instanceof Error ? o : new Error(String(o))
|
|
9475
9416
|
});
|
|
9476
9417
|
}
|
|
9477
|
-
if (s instanceof
|
|
9418
|
+
if (s instanceof Et)
|
|
9478
9419
|
return;
|
|
9479
9420
|
if (s instanceof ve)
|
|
9480
9421
|
try {
|
|
@@ -9530,7 +9471,7 @@ class Yi {
|
|
|
9530
9471
|
return this.controller.system.storage.findOne(t.dataContext.host.name, m.atom({ key: "id", value: ["=", e.id] }), {}, s.attributeQuery);
|
|
9531
9472
|
} else {
|
|
9532
9473
|
if (s.type === "global")
|
|
9533
|
-
return await this.controller.system.storage.get(
|
|
9474
|
+
return await this.controller.system.storage.get(W, s.source.name);
|
|
9534
9475
|
throw new U(`Unknown data dependency type: ${s.type}`, {
|
|
9535
9476
|
depName: r,
|
|
9536
9477
|
depType: s.type,
|
|
@@ -9566,7 +9507,7 @@ class Yi {
|
|
|
9566
9507
|
async setupGlobalDict() {
|
|
9567
9508
|
const t = this.controller.dict.filter((e) => e.defaultValue !== void 0);
|
|
9568
9509
|
for (const e of t)
|
|
9569
|
-
await this.controller.system.storage.set(
|
|
9510
|
+
await this.controller.system.storage.set(W, e.name, e.defaultValue());
|
|
9570
9511
|
}
|
|
9571
9512
|
async setup() {
|
|
9572
9513
|
try {
|
|
@@ -9610,7 +9551,7 @@ class Yi {
|
|
|
9610
9551
|
}
|
|
9611
9552
|
}
|
|
9612
9553
|
}
|
|
9613
|
-
const
|
|
9554
|
+
const Pr = "User";
|
|
9614
9555
|
class z {
|
|
9615
9556
|
constructor(t) {
|
|
9616
9557
|
this.name = t.name, this.record = t.record, this.content = t.content;
|
|
@@ -9619,7 +9560,15 @@ class z {
|
|
|
9619
9560
|
return new z(t);
|
|
9620
9561
|
}
|
|
9621
9562
|
}
|
|
9622
|
-
|
|
9563
|
+
const Qt = "_isDeleted_", Or = {
|
|
9564
|
+
create() {
|
|
9565
|
+
return T.create({
|
|
9566
|
+
name: Qt,
|
|
9567
|
+
type: "boolean"
|
|
9568
|
+
});
|
|
9569
|
+
}
|
|
9570
|
+
};
|
|
9571
|
+
class Dr {
|
|
9623
9572
|
constructor(t) {
|
|
9624
9573
|
this.recordNameToSideEffects = /* @__PURE__ */ new Map(), this.globals = {
|
|
9625
9574
|
BoolExp: R,
|
|
@@ -9638,7 +9587,7 @@ class Mr {
|
|
|
9638
9587
|
forceThtrowInteractionError: d = !1
|
|
9639
9588
|
// 会 catch 住 error,并在 result 中返回。
|
|
9640
9589
|
} = t;
|
|
9641
|
-
this.system = e, this.ignorePermission = l, this.forceThtrowInteractionError = d, this.entities = [...i], this.relations = [...r], this.activities = [...s], this.interactions = [...a], this.dict = [...o], this.recordMutationSideEffects = [...n], this.activityManager = new
|
|
9590
|
+
this.system = e, this.ignorePermission = l, this.forceThtrowInteractionError = d, this.entities = [...i], this.relations = [...r], this.activities = [...s], this.interactions = [...a], this.dict = [...o], this.recordMutationSideEffects = [...n], this.activityManager = new bi(this, s, a);
|
|
9642
9591
|
const h = [
|
|
9643
9592
|
...Pi,
|
|
9644
9593
|
...Di,
|
|
@@ -9661,10 +9610,20 @@ class Mr {
|
|
|
9661
9610
|
const e = this.scheduler.createStates();
|
|
9662
9611
|
await this.system.setup(this.entities, this.relations, e, t), await this.scheduler.setup();
|
|
9663
9612
|
}
|
|
9613
|
+
async retrieveLastValue(t, e) {
|
|
9614
|
+
if (t.type === "global")
|
|
9615
|
+
return this.system.storage.get(W, t.id);
|
|
9616
|
+
if (t.type === "entity" || t.type === "relation")
|
|
9617
|
+
return this.system.storage.find(t.id.name, void 0, void 0, ["*"]);
|
|
9618
|
+
{
|
|
9619
|
+
const i = t;
|
|
9620
|
+
return e[i.id.name] ? e[i.id.name] : (await this.system.storage.findOne(i.host.name, R.atom({ key: "id", value: ["=", e.id] }), void 0, ["*"]))[i.id.name];
|
|
9621
|
+
}
|
|
9622
|
+
}
|
|
9664
9623
|
async applyResult(t, e, i) {
|
|
9665
|
-
if (!(e instanceof
|
|
9624
|
+
if (!(e instanceof Et)) {
|
|
9666
9625
|
if (t.type === "global")
|
|
9667
|
-
return this.system.storage.set(
|
|
9626
|
+
return this.system.storage.set(W, t.id, e);
|
|
9668
9627
|
if (t.type === "entity") {
|
|
9669
9628
|
if (e == null) return;
|
|
9670
9629
|
const r = t;
|
|
@@ -9681,26 +9640,16 @@ class Mr {
|
|
|
9681
9640
|
await this.system.storage.create(r.id.name, a);
|
|
9682
9641
|
} else {
|
|
9683
9642
|
const r = t;
|
|
9684
|
-
await this.system.storage.update(r.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [r.id.name]: e });
|
|
9643
|
+
r.id.name === Qt && e ? await this.system.storage.delete(r.host.name, R.atom({ key: "id", value: ["=", i.id] })) : await this.system.storage.update(r.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [r.id.name]: e });
|
|
9685
9644
|
}
|
|
9686
9645
|
}
|
|
9687
9646
|
}
|
|
9688
|
-
async retrieveLastValue(t, e) {
|
|
9689
|
-
if (t.type === "global")
|
|
9690
|
-
return this.system.storage.get(J, t.id);
|
|
9691
|
-
if (t.type === "entity" || t.type === "relation")
|
|
9692
|
-
return this.system.storage.find(t.id.name, void 0, void 0, ["*"]);
|
|
9693
|
-
{
|
|
9694
|
-
const i = t;
|
|
9695
|
-
return e[i.id.name] ? e[i.id.name] : (await this.system.storage.findOne(i.host.name, R.atom({ key: "id", value: ["=", e.id] }), void 0, ["*"]))[i.id.name];
|
|
9696
|
-
}
|
|
9697
|
-
}
|
|
9698
9647
|
async applyResultPatch(t, e, i) {
|
|
9699
|
-
if (e instanceof
|
|
9648
|
+
if (e instanceof Et || e === void 0) return;
|
|
9700
9649
|
const r = Array.isArray(e) ? e : [e];
|
|
9701
9650
|
for (const s of r) {
|
|
9702
9651
|
if (t.type === "global")
|
|
9703
|
-
return this.system.storage.set(
|
|
9652
|
+
return this.system.storage.set(W, t.id, s);
|
|
9704
9653
|
if (t.type === "entity" || t.type === "relation") {
|
|
9705
9654
|
const a = t;
|
|
9706
9655
|
if (s.type === "insert")
|
|
@@ -9714,7 +9663,7 @@ class Mr {
|
|
|
9714
9663
|
}
|
|
9715
9664
|
} else {
|
|
9716
9665
|
const a = t;
|
|
9717
|
-
s.type === "insert" ? await this.system.storage.update(a.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [a.id.name]: s.data }) : s.type === "update" ? await this.system.storage.update(a.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [a.id.name]: s.data }) : s.type === "delete" && await this.system.storage.update(a.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [a.id.name]: null });
|
|
9666
|
+
a.id.name === Qt && s.data ? (k(s.type !== "delete", "Hard deletion property cannot be deleted"), await this.system.storage.delete(a.host.name, R.atom({ key: "id", value: ["=", i.id] }))) : s.type === "insert" ? await this.system.storage.update(a.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [a.id.name]: s.data }) : s.type === "update" ? await this.system.storage.update(a.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [a.id.name]: s.data }) : s.type === "delete" && await this.system.storage.update(a.host.name, R.atom({ key: "id", value: ["=", i.id] }), { [a.id.name]: null });
|
|
9718
9667
|
}
|
|
9719
9668
|
}
|
|
9720
9669
|
}
|
|
@@ -9795,10 +9744,10 @@ let zi = class {
|
|
|
9795
9744
|
};
|
|
9796
9745
|
class Zi {
|
|
9797
9746
|
constructor(t = ":memory:", e) {
|
|
9798
|
-
this.file = t, this.options = e, this.idSystem = new zi(this), this.logger = this.options?.logger ||
|
|
9747
|
+
this.file = t, this.options = e, this.idSystem = new zi(this), this.logger = this.options?.logger || Nt;
|
|
9799
9748
|
}
|
|
9800
9749
|
async open() {
|
|
9801
|
-
this.db = new
|
|
9750
|
+
this.db = new Ce(this.file, this.options), await this.idSystem.setup();
|
|
9802
9751
|
}
|
|
9803
9752
|
async query(t, e = [], i = "") {
|
|
9804
9753
|
const r = I.getStore(), s = this.logger.child(r?.logContext || {}), a = e.map((o) => o === !1 ? 0 : o === !0 ? 1 : o);
|
|
@@ -9895,12 +9844,12 @@ class ir {
|
|
|
9895
9844
|
}
|
|
9896
9845
|
async setup(t, e, i = !1) {
|
|
9897
9846
|
await this.db.open(i);
|
|
9898
|
-
const r = new
|
|
9847
|
+
const r = new hi(
|
|
9899
9848
|
t,
|
|
9900
9849
|
e,
|
|
9901
9850
|
this.db
|
|
9902
9851
|
);
|
|
9903
|
-
i && await r.createTables(), this.queryHandle = new
|
|
9852
|
+
i && await r.createTables(), this.queryHandle = new ze(new Ze(r.map), this.db), this.map = r.map;
|
|
9904
9853
|
}
|
|
9905
9854
|
findOne(...t) {
|
|
9906
9855
|
return this.queryHandle.findOne(...t);
|
|
@@ -9990,9 +9939,9 @@ class ee {
|
|
|
9990
9939
|
return new ee(this.level);
|
|
9991
9940
|
}
|
|
9992
9941
|
}
|
|
9993
|
-
const
|
|
9994
|
-
class
|
|
9995
|
-
constructor(t = new Zi(void 0, { logger:
|
|
9942
|
+
const Nt = new te(), ar = new ee();
|
|
9943
|
+
class Qr {
|
|
9944
|
+
constructor(t = new Zi(void 0, { logger: Nt }), e = ar) {
|
|
9996
9945
|
this.logger = e, this.conceptClass = /* @__PURE__ */ new Map(), this.storage = new ir(t);
|
|
9997
9946
|
}
|
|
9998
9947
|
setup(t, e, i, r = !1) {
|
|
@@ -10007,11 +9956,11 @@ class Pr {
|
|
|
10007
9956
|
throw new Error(`Entity or Relation not found: ${d.record}`);
|
|
10008
9957
|
for (; h.baseEntity || h.baseRelation; )
|
|
10009
9958
|
h = h.baseEntity || h.baseRelation;
|
|
10010
|
-
if (d.defaultValue instanceof
|
|
9959
|
+
if (d.defaultValue instanceof T)
|
|
10011
9960
|
d.defaultValue.name = d.key, h.properties.push(d.defaultValue);
|
|
10012
9961
|
else {
|
|
10013
9962
|
const p = typeof d.defaultValue;
|
|
10014
|
-
h.properties.push(
|
|
9963
|
+
h.properties.push(T.create({
|
|
10015
9964
|
name: d.key,
|
|
10016
9965
|
type: p,
|
|
10017
9966
|
// 应该系统定义
|
|
@@ -10022,7 +9971,7 @@ class Pr {
|
|
|
10022
9971
|
}
|
|
10023
9972
|
});
|
|
10024
9973
|
}), this.storage.setup(
|
|
10025
|
-
[...a,
|
|
9974
|
+
[...a, We],
|
|
10026
9975
|
o,
|
|
10027
9976
|
r
|
|
10028
9977
|
);
|
|
@@ -10031,7 +9980,7 @@ class Pr {
|
|
|
10031
9980
|
this.storage.destroy();
|
|
10032
9981
|
}
|
|
10033
9982
|
}
|
|
10034
|
-
const { Client: de } =
|
|
9983
|
+
const { Client: de } = Me;
|
|
10035
9984
|
let or = class {
|
|
10036
9985
|
constructor(t) {
|
|
10037
9986
|
this.db = t;
|
|
@@ -10044,9 +9993,9 @@ let or = class {
|
|
|
10044
9993
|
return e === void 0 ? await this.db.scheme(`INSERT INTO "_IDS_" (name, last) VALUES ('${t}', ${i})`, r) : await this.db.update('UPDATE "_IDS_" SET last = $1 WHERE name = $2', [i, t], void 0, r), i;
|
|
10045
9994
|
}
|
|
10046
9995
|
};
|
|
10047
|
-
class
|
|
9996
|
+
class Lr {
|
|
10048
9997
|
constructor(t, e = {}) {
|
|
10049
|
-
this.database = t, this.options = e, this.idSystem = new or(this), this.logger = this.options?.logger ||
|
|
9998
|
+
this.database = t, this.options = e, this.idSystem = new or(this), this.logger = this.options?.logger || Nt, this.db = new de({
|
|
10050
9999
|
...e
|
|
10051
10000
|
});
|
|
10052
10001
|
}
|
|
@@ -10136,9 +10085,9 @@ let nr = class {
|
|
|
10136
10085
|
return he();
|
|
10137
10086
|
}
|
|
10138
10087
|
};
|
|
10139
|
-
class
|
|
10088
|
+
class _r {
|
|
10140
10089
|
constructor(t, e = {}) {
|
|
10141
|
-
this.database = t, this.options = e, this.idSystem = new nr(this), this.logger = this.options?.logger ||
|
|
10090
|
+
this.database = t, this.options = e, this.idSystem = new nr(this), this.logger = this.options?.logger || Nt, this.db = new $e(this.database);
|
|
10142
10091
|
}
|
|
10143
10092
|
async open(t = !1) {
|
|
10144
10093
|
if (t) {
|
|
@@ -10265,9 +10214,9 @@ class cr {
|
|
|
10265
10214
|
return e === void 0 ? await this.db.scheme(`INSERT INTO "_IDS_" (name, last) VALUES ('${t}', ${i})`, r) : await this.db.update('UPDATE "_IDS_" SET last = ? WHERE name = ?', [i, t], void 0, r), i;
|
|
10266
10215
|
}
|
|
10267
10216
|
}
|
|
10268
|
-
class
|
|
10217
|
+
class Br {
|
|
10269
10218
|
constructor(t, e = {}) {
|
|
10270
|
-
this.database = t, this.options = e, this.idSystem = new cr(this), this.logger = this.options?.logger ||
|
|
10219
|
+
this.database = t, this.options = e, this.idSystem = new cr(this), this.logger = this.options?.logger || Nt;
|
|
10271
10220
|
}
|
|
10272
10221
|
async open(t = !1) {
|
|
10273
10222
|
({ ...this.options }, this.db = await se.createConnection({
|
|
@@ -10346,22 +10295,23 @@ class Vr {
|
|
|
10346
10295
|
}
|
|
10347
10296
|
}
|
|
10348
10297
|
export {
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10298
|
+
vt as ACTIVITY_RECORD,
|
|
10299
|
+
He as ALL_ATTR_SYMBOL,
|
|
10300
|
+
Ot as ASYNC_TASK_RECORD,
|
|
10301
|
+
Ct as Action,
|
|
10302
|
+
Bt as Activity,
|
|
10353
10303
|
rt as ActivityCall,
|
|
10354
10304
|
st as ActivityGroup,
|
|
10355
|
-
|
|
10356
|
-
|
|
10305
|
+
gi as ActivityInteractionRelation,
|
|
10306
|
+
bi as ActivityManager,
|
|
10357
10307
|
Te as ActivityStateEntity,
|
|
10358
|
-
|
|
10308
|
+
gt as Any,
|
|
10359
10309
|
xi as AnyHandles,
|
|
10360
|
-
|
|
10310
|
+
J as AttributeInfo,
|
|
10361
10311
|
C as AttributeQuery,
|
|
10362
|
-
|
|
10312
|
+
j as Attributive,
|
|
10363
10313
|
at as Attributives,
|
|
10364
|
-
|
|
10314
|
+
mt as Average,
|
|
10365
10315
|
Ji as AverageHandles,
|
|
10366
10316
|
Nr as BaseKlass,
|
|
10367
10317
|
lt as BoolAtomData,
|
|
@@ -10373,134 +10323,139 @@ export {
|
|
|
10373
10323
|
ve as ComputationResultAsync,
|
|
10374
10324
|
Se as ComputationResultFullRecompute,
|
|
10375
10325
|
ke as ComputationResultResolved,
|
|
10376
|
-
|
|
10326
|
+
Et as ComputationResultSkip,
|
|
10377
10327
|
ce as ComputationStateError,
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10328
|
+
Wt as Condition,
|
|
10329
|
+
$ as ConditionError,
|
|
10330
|
+
Mt as Conditions,
|
|
10331
|
+
Dr as Controller,
|
|
10332
|
+
pt as Count,
|
|
10383
10333
|
Pi as CountHandles,
|
|
10384
|
-
|
|
10334
|
+
Yt as Custom,
|
|
10385
10335
|
Ki as CustomHandles,
|
|
10386
10336
|
te as DBConsoleLogger,
|
|
10387
10337
|
rr as DBLogLevel,
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10338
|
+
hi as DBSetup,
|
|
10339
|
+
$r as DELETED_STATE,
|
|
10340
|
+
W as DICTIONARY_RECORD,
|
|
10341
|
+
Jt as DataAttributive,
|
|
10342
|
+
Xt as DataAttributives,
|
|
10343
|
+
qt as Dictionary,
|
|
10393
10344
|
x as Entity,
|
|
10394
10345
|
Hi as EntityCustomHandle,
|
|
10395
|
-
|
|
10396
|
-
|
|
10346
|
+
ze as EntityQueryHandle,
|
|
10347
|
+
Ze as EntityToTableMap,
|
|
10397
10348
|
Zt as Equation,
|
|
10398
|
-
|
|
10399
|
-
|
|
10349
|
+
jt as Event,
|
|
10350
|
+
yt as Every,
|
|
10400
10351
|
Ei as EveryHandles,
|
|
10401
|
-
|
|
10352
|
+
P as Expression,
|
|
10402
10353
|
ot as Gateway,
|
|
10403
|
-
|
|
10354
|
+
_e as GetAction,
|
|
10404
10355
|
Ii as GlobalAnyHandle,
|
|
10405
10356
|
Bi as GlobalAverageHandle,
|
|
10406
|
-
|
|
10357
|
+
B as GlobalBoundState,
|
|
10407
10358
|
Mi as GlobalCountHandle,
|
|
10408
10359
|
ji as GlobalCustomHandle,
|
|
10409
10360
|
ki as GlobalEveryHandle,
|
|
10410
10361
|
Fi as GlobalRealTimeComputation,
|
|
10411
|
-
|
|
10362
|
+
Ri as GlobalStateMachineHandle,
|
|
10412
10363
|
Li as GlobalSumHandle,
|
|
10413
10364
|
Ti as GlobalWeightedSummationHandle,
|
|
10365
|
+
Qt as HARD_DELETION_PROPERTY_NAME,
|
|
10366
|
+
Or as HardDeletionProperty,
|
|
10414
10367
|
it as ID_ATTR,
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10368
|
+
H as INTERACTION_RECORD,
|
|
10369
|
+
It as Inequality,
|
|
10370
|
+
_t as Interaction,
|
|
10418
10371
|
Ne as InteractionCall,
|
|
10419
|
-
|
|
10420
|
-
|
|
10372
|
+
zt as InteractionEventEntity,
|
|
10373
|
+
Vt as KlassByName,
|
|
10421
10374
|
f as LINK_SYMBOL,
|
|
10422
|
-
|
|
10375
|
+
At as LinkInfo,
|
|
10423
10376
|
m as MatchExp,
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10377
|
+
je as Modifier,
|
|
10378
|
+
Qr as MonoSystem,
|
|
10379
|
+
Br as MysqlDB,
|
|
10380
|
+
Mr as NON_DELETED_STATE,
|
|
10381
|
+
xr as NON_EXIST_STATE,
|
|
10427
10382
|
L as NewRecordData,
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10383
|
+
_r as PGLiteDB,
|
|
10384
|
+
Gt as Payload,
|
|
10385
|
+
Ut as PayloadItem,
|
|
10386
|
+
Lr as PostgreSQLDB,
|
|
10387
|
+
T as Property,
|
|
10433
10388
|
Ci as PropertyAnyHandle,
|
|
10434
10389
|
Wi as PropertyAverageHandle,
|
|
10435
10390
|
$i as PropertyCountHandle,
|
|
10436
10391
|
Gi as PropertyCustomHandle,
|
|
10437
10392
|
Ai as PropertyEveryHandle,
|
|
10438
10393
|
Qi as PropertyRealTimeComputation,
|
|
10439
|
-
|
|
10394
|
+
wi as PropertyStateMachineHandle,
|
|
10440
10395
|
qi as PropertySumHandle,
|
|
10441
|
-
|
|
10396
|
+
Lt as PropertyTypes,
|
|
10442
10397
|
Si as PropertyWeightedSummationHandle,
|
|
10443
10398
|
be as Query,
|
|
10444
10399
|
ge as QueryItem,
|
|
10445
10400
|
we as ROOT_LABEL,
|
|
10446
10401
|
nt as ROW_ID_ATTR,
|
|
10447
|
-
|
|
10402
|
+
bt as RealTime,
|
|
10448
10403
|
Vi as RealTimeHandles,
|
|
10449
10404
|
E as RecordBoundState,
|
|
10450
10405
|
ct as RecordInfo,
|
|
10451
10406
|
z as RecordMutationSideEffect,
|
|
10452
10407
|
M as RecordQuery,
|
|
10453
|
-
|
|
10408
|
+
Ye as RecordQueryAgent,
|
|
10454
10409
|
q as RecordQueryTree,
|
|
10455
|
-
wi as RecordStateMachineHandle,
|
|
10456
10410
|
Oi as RecordsTransformHandle,
|
|
10457
|
-
|
|
10411
|
+
kt as RecursiveContext,
|
|
10458
10412
|
Re as RefContainer,
|
|
10459
|
-
|
|
10413
|
+
O as Relation,
|
|
10460
10414
|
Ui as RelationCustomHandle,
|
|
10461
10415
|
Zi as SQLiteDB,
|
|
10462
10416
|
_ as SYSTEM_RECORD,
|
|
10463
|
-
|
|
10464
|
-
|
|
10417
|
+
Yi as Scheduler,
|
|
10418
|
+
Kt as SideEffect,
|
|
10419
|
+
dt as StateMachine,
|
|
10465
10420
|
Ni as StateMachineHandles,
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10421
|
+
Z as StateNode,
|
|
10422
|
+
Ht as StateTransfer,
|
|
10423
|
+
ft as Summation,
|
|
10469
10424
|
_i as SummationHandles,
|
|
10470
10425
|
ee as SystemConsoleLogger,
|
|
10471
|
-
|
|
10426
|
+
We as SystemEntity,
|
|
10472
10427
|
sr as SystemLogLevel,
|
|
10473
10428
|
me as Transfer,
|
|
10474
|
-
|
|
10429
|
+
xt as Transform,
|
|
10475
10430
|
Di as TransformHandles,
|
|
10476
|
-
|
|
10477
|
-
|
|
10431
|
+
Pr as USER_ENTITY,
|
|
10432
|
+
ht as WeightedSummation,
|
|
10478
10433
|
vi as WeightedSummationHandles,
|
|
10479
10434
|
k as assert,
|
|
10480
10435
|
I as asyncInteractionContext,
|
|
10481
10436
|
kr as boolExpToAttributives,
|
|
10482
10437
|
yr as clearAllInstances,
|
|
10483
10438
|
wr as createClass,
|
|
10484
|
-
|
|
10439
|
+
De as createInstances,
|
|
10485
10440
|
Rr as createInstancesFromString,
|
|
10486
10441
|
Ar as createUserRoleAttributive,
|
|
10487
|
-
|
|
10488
|
-
|
|
10442
|
+
Nt as dbConsoleLogger,
|
|
10443
|
+
Tt as deepClone,
|
|
10489
10444
|
Cr as everyAsync,
|
|
10490
10445
|
ae as everyWithErrorAsync,
|
|
10491
10446
|
Er as filterMap,
|
|
10492
10447
|
Sr as findRootActivity,
|
|
10493
10448
|
ye as forEachInteraction,
|
|
10494
|
-
|
|
10449
|
+
S as generateUUID,
|
|
10495
10450
|
Tr as getInteractions,
|
|
10496
|
-
|
|
10451
|
+
Pe as indexBy,
|
|
10497
10452
|
pe as isObject,
|
|
10498
10453
|
fe as isPlainObject,
|
|
10499
10454
|
Ir as mapObject,
|
|
10500
10455
|
vr as parse,
|
|
10501
|
-
|
|
10456
|
+
Oe as registerKlass,
|
|
10502
10457
|
gr as removeAllInstance,
|
|
10503
|
-
|
|
10458
|
+
Je as someAsync,
|
|
10504
10459
|
br as stringifyAllInstances,
|
|
10505
10460
|
w as stringifyAttribute,
|
|
10506
10461
|
ar as systemConsoleLogger
|