@yuneta/gobj-js 7.25.8 → 7.25.9
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/README.md +17 -0
- package/dist/gobj-js.cjs.js +432 -60
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +1210 -991
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +429 -61
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +1233 -1014
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +432 -60
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1251 -1032
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +432 -60
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +1240 -1021
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +2 -2
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -17,16 +17,15 @@ var e = {
|
|
|
17
17
|
};
|
|
18
18
|
function t(n) {
|
|
19
19
|
return function(n, r) {
|
|
20
|
-
var l, o, i, s, a, u, _, c, f
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
l = l[s.keys[i]];
|
|
20
|
+
for (var l, o, i, s, a, u, _, c, f = 1, g = n.length, d = "", b = 0; b < g; b++) if ("string" == typeof n[b]) d += n[b];
|
|
21
|
+
else if ("object" == typeof n[b]) {
|
|
22
|
+
if ((i = n[b]).keys) for (l = r[f], o = 0; o < i.keys.length; o++) {
|
|
23
|
+
if (null == l) throw new Error(t("[sprintf] Cannot access property \"%s\" of undefined value \"%s\"", i.keys[o], i.keys[o - 1]));
|
|
24
|
+
l = l[i.keys[o]];
|
|
26
25
|
}
|
|
27
|
-
else l =
|
|
28
|
-
if (e.not_type.test(
|
|
29
|
-
switch (e.number.test(
|
|
26
|
+
else l = i.param_no ? r[i.param_no] : r[f++];
|
|
27
|
+
if (e.not_type.test(i.type) && e.not_primitive.test(i.type) && l instanceof Function && (l = l()), e.numeric_arg.test(i.type) && "number" != typeof l && isNaN(l)) throw new TypeError(t("[sprintf] expecting number but found %T", l));
|
|
28
|
+
switch (e.number.test(i.type) && (_ = l >= 0), i.type) {
|
|
30
29
|
case "b":
|
|
31
30
|
l = parseInt(l, 10).toString(2);
|
|
32
31
|
break;
|
|
@@ -38,43 +37,43 @@ function t(n) {
|
|
|
38
37
|
l = parseInt(l, 10);
|
|
39
38
|
break;
|
|
40
39
|
case "j":
|
|
41
|
-
l = JSON.stringify(l, null,
|
|
40
|
+
l = JSON.stringify(l, null, i.width ? parseInt(i.width) : 0);
|
|
42
41
|
break;
|
|
43
42
|
case "e":
|
|
44
|
-
l =
|
|
43
|
+
l = i.precision ? parseFloat(l).toExponential(i.precision) : parseFloat(l).toExponential();
|
|
45
44
|
break;
|
|
46
45
|
case "f":
|
|
47
|
-
l =
|
|
46
|
+
l = i.precision ? parseFloat(l).toFixed(i.precision) : parseFloat(l);
|
|
48
47
|
break;
|
|
49
48
|
case "g":
|
|
50
|
-
l =
|
|
49
|
+
l = i.precision ? String(Number(l.toPrecision(i.precision))) : parseFloat(l);
|
|
51
50
|
break;
|
|
52
51
|
case "o":
|
|
53
52
|
l = (parseInt(l, 10) >>> 0).toString(8);
|
|
54
53
|
break;
|
|
55
54
|
case "s":
|
|
56
|
-
l = String(l), l =
|
|
55
|
+
l = String(l), l = i.precision ? l.substring(0, i.precision) : l;
|
|
57
56
|
break;
|
|
58
57
|
case "t":
|
|
59
|
-
l = String(!!l), l =
|
|
58
|
+
l = String(!!l), l = i.precision ? l.substring(0, i.precision) : l;
|
|
60
59
|
break;
|
|
61
60
|
case "T":
|
|
62
|
-
l = Object.prototype.toString.call(l).slice(8, -1).toLowerCase(), l =
|
|
61
|
+
l = Object.prototype.toString.call(l).slice(8, -1).toLowerCase(), l = i.precision ? l.substring(0, i.precision) : l;
|
|
63
62
|
break;
|
|
64
63
|
case "u":
|
|
65
64
|
l = parseInt(l, 10) >>> 0;
|
|
66
65
|
break;
|
|
67
66
|
case "v":
|
|
68
|
-
l = l.valueOf(), l =
|
|
67
|
+
l = l.valueOf(), l = i.precision ? l.substring(0, i.precision) : l;
|
|
69
68
|
break;
|
|
70
69
|
case "x":
|
|
71
70
|
l = (parseInt(l, 10) >>> 0).toString(16);
|
|
72
71
|
break;
|
|
73
72
|
case "X": l = (parseInt(l, 10) >>> 0).toString(16).toUpperCase();
|
|
74
73
|
}
|
|
75
|
-
e.json.test(
|
|
74
|
+
e.json.test(i.type) ? d += l : (!e.number.test(i.type) || _ && !i.sign ? c = "" : (c = _ ? "+" : "-", l = l.toString().replace(e.sign, "")), a = i.pad_char ? "0" === i.pad_char ? "0" : i.pad_char.charAt(1) : " ", u = i.width - (c + l).length, s = i.width && u > 0 ? a.repeat(u) : "", d += i.align ? c + l + s : "0" === a ? c + s + l : s + c + l);
|
|
76
75
|
}
|
|
77
|
-
return
|
|
76
|
+
return d;
|
|
78
77
|
}(function(t) {
|
|
79
78
|
if (r[t]) return r[t];
|
|
80
79
|
let n, l = t, o = [], i = 0;
|
|
@@ -134,7 +133,7 @@ function s(e, t, n, r, l) {
|
|
|
134
133
|
data: l || []
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
|
-
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = {},
|
|
136
|
+
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = {}, h = null, E = null, T = 0, y = Object.freeze({
|
|
138
137
|
DTP_STRING: 1,
|
|
139
138
|
DTP_BOOLEAN: 2,
|
|
140
139
|
DTP_INTEGER: 3,
|
|
@@ -169,17 +168,17 @@ var v = Object.freeze({
|
|
|
169
168
|
SDF_AUTHZ_RS: 1048576
|
|
170
169
|
});
|
|
171
170
|
v.SDF_RD, v.SDF_WR, v.SDF_STATS, v.SDF_PERSIST, v.SDF_VOLATIL, v.SDF_RSTATS, v.SDF_PSTATS, v.SDF_WR, v.SDF_PERSIST;
|
|
172
|
-
var
|
|
171
|
+
var O = class {
|
|
173
172
|
constructor(e, t, n = 0, r = null, l = "", o = null, i = null, s = 0, a = null, u = null, _ = null) {
|
|
174
173
|
this.type = e, this.name = t, this.alias = o, this.flag = n, this.default_value = r, this.header = i, this.fillspace = s, this.description = l, this.json_fn = a, this.schema = u, this.authpth = _;
|
|
175
174
|
}
|
|
176
|
-
},
|
|
175
|
+
}, S = () => new O(0, null), N = (e, t, n, r, l) => new O(e, t, n, r, l), w = (e, t, n, r, l, o) => new O(e, t, 0, null, o, n, null, 0, l, r, null), R = (e, t, n, r, l, o, i) => new O(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new O(e, t, n, r, l), D = (e, t, n, r, l, o) => new O(e, t, n, null, o, r, null, 0, null, l, null), $ = (e, t, n, r, l) => new O(e, t, n, null, l, null, null, 0, null, null, r), A = (e, t, n, r, l, o) => new O(e, t, n, null, o, null, r, l), I = class {
|
|
177
176
|
constructor(e, t, n, r, l, o, i, s, a) {
|
|
178
177
|
this.gclass_name = e, this.dl_states = [], this.dl_events = [], this.gmt = t, this.lmt = n, this.attrs_table = r, this.priv = l, this.authz_table = o, this.command_table = i, this.s_user_trace_level = s, this.gclass_flag = Number(a) || 0, this.instances = 0, this.trace_level = 0, this.no_trace_level = 0, this.jn_trace_filter = null, this.fsm_checked = !1;
|
|
179
178
|
}
|
|
180
179
|
}, k = class {
|
|
181
180
|
constructor(e, t, n, r, l) {
|
|
182
|
-
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(l) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv =
|
|
181
|
+
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(l) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv = wr(t.priv), this.running = !1, this.playing = !1, this.disabled = !1, this.bottom_gobj = null, this.trace_level = 0, this.no_trace_level = 0;
|
|
183
182
|
}
|
|
184
183
|
}, C = Object.freeze({
|
|
185
184
|
gcflag_manual_start: 1,
|
|
@@ -210,11 +209,11 @@ var S = class {
|
|
|
210
209
|
WALK_BYLEVEL: 4,
|
|
211
210
|
WALK_FIRST2LAST: 16,
|
|
212
211
|
WALK_LAST2FIRST: 32
|
|
213
|
-
}),
|
|
212
|
+
}), V = class {
|
|
214
213
|
constructor(e, t, n) {
|
|
215
214
|
this.event_name = e, this.action = t, this.next_state = n;
|
|
216
215
|
}
|
|
217
|
-
},
|
|
216
|
+
}, G = class {
|
|
218
217
|
constructor(e) {
|
|
219
218
|
this.state_name = e, this.dl_actions = [];
|
|
220
219
|
}
|
|
@@ -224,14 +223,14 @@ var S = class {
|
|
|
224
223
|
}
|
|
225
224
|
};
|
|
226
225
|
var W = 1;
|
|
227
|
-
function
|
|
226
|
+
function x(e) {
|
|
228
227
|
W = 1 === Number(e) ? 1 : 0;
|
|
229
228
|
}
|
|
230
|
-
function
|
|
229
|
+
function K() {
|
|
231
230
|
return W;
|
|
232
231
|
}
|
|
233
232
|
function Y(e) {
|
|
234
|
-
|
|
233
|
+
Kr(e) && (e = JSON.stringify(e)), ar(" ".repeat(Math.max(1, 2 * T)) + String(e));
|
|
235
234
|
}
|
|
236
235
|
var B = Object.freeze({
|
|
237
236
|
TRACE_MACHINE: 65536,
|
|
@@ -325,7 +324,7 @@ var B = Object.freeze({
|
|
|
325
324
|
B.TRACE_COMMANDS,
|
|
326
325
|
"Trace commands"
|
|
327
326
|
]
|
|
328
|
-
],
|
|
327
|
+
], H = 0, q = 0, Q = 0;
|
|
329
328
|
function z(e, t) {
|
|
330
329
|
let n = [];
|
|
331
330
|
for (const [t, r] of J) e & r && n.push(t);
|
|
@@ -333,7 +332,7 @@ function z(e, t) {
|
|
|
333
332
|
return n;
|
|
334
333
|
}
|
|
335
334
|
function X(e, t, n) {
|
|
336
|
-
if (
|
|
335
|
+
if (el(e)) return void 0 === n ? 268369920 : 65535;
|
|
337
336
|
if (/^[0-9]+$/.test(String(e))) {
|
|
338
337
|
const t = Number(e);
|
|
339
338
|
if (t) return t;
|
|
@@ -344,15 +343,15 @@ function X(e, t, n) {
|
|
|
344
343
|
for (let n = 0; n < t.length && n < 16; n++) if (t[n] && t[n][0] === e) return 1 << n;
|
|
345
344
|
}
|
|
346
345
|
return 0;
|
|
347
|
-
}(String(e), n) || (
|
|
346
|
+
}(String(e), n) || (or(`${t}: trace level NOT FOUND: ${e}`), 0);
|
|
348
347
|
}
|
|
349
348
|
function Z(e) {
|
|
350
349
|
if (Q) return 4294967295;
|
|
351
|
-
let t =
|
|
350
|
+
let t = H;
|
|
352
351
|
return e && (t |= e.trace_level || 0, e.gclass && (t |= e.gclass.trace_level || 0)), t;
|
|
353
352
|
}
|
|
354
353
|
function ee(e) {
|
|
355
|
-
let t =
|
|
354
|
+
let t = q;
|
|
356
355
|
return e && (t |= e.no_trace_level || 0, e.gclass && (t |= e.gclass.no_trace_level || 0)), t;
|
|
357
356
|
}
|
|
358
357
|
function te(e) {
|
|
@@ -381,76 +380,76 @@ function ie(e, t) {
|
|
|
381
380
|
}
|
|
382
381
|
function se(e, t) {
|
|
383
382
|
const n = X(e, "gobj_set_global_trace");
|
|
384
|
-
return n ? (t ?
|
|
383
|
+
return n ? (t ? H |= n : H &= ~n, 0) : -1;
|
|
385
384
|
}
|
|
386
385
|
function ae(e, t) {
|
|
387
386
|
const n = X(e, "gobj_set_global_no_trace");
|
|
388
|
-
return n ? (t ?
|
|
387
|
+
return n ? (t ? q |= n : q &= ~n, 0) : -1;
|
|
389
388
|
}
|
|
390
389
|
function ue() {
|
|
391
|
-
return
|
|
390
|
+
return H;
|
|
392
391
|
}
|
|
393
392
|
function _e() {
|
|
394
|
-
return
|
|
393
|
+
return q;
|
|
395
394
|
}
|
|
396
395
|
function ce(e, t) {
|
|
397
|
-
return
|
|
396
|
+
return H = t ? (H | e) >>> 0 : (H & ~e) >>> 0, 0;
|
|
398
397
|
}
|
|
399
398
|
function fe(e, t) {
|
|
400
|
-
return
|
|
399
|
+
return q = t ? (q | e) >>> 0 : (q & ~e) >>> 0, 0;
|
|
401
400
|
}
|
|
402
401
|
function ge() {
|
|
403
|
-
return z(
|
|
402
|
+
return z(H, null);
|
|
404
403
|
}
|
|
405
404
|
function de() {
|
|
406
|
-
return z(
|
|
405
|
+
return z(q, null);
|
|
407
406
|
}
|
|
408
407
|
function be(e) {
|
|
409
|
-
const t =
|
|
410
|
-
return t ? z(t.trace_level |
|
|
408
|
+
const t = Br(e) ? Me(e) : e;
|
|
409
|
+
return t ? z(t.trace_level | H, t.s_user_trace_level) : (or(`gobj_get_gclass_trace_level: gclass NOT FOUND: ${e}`), []);
|
|
411
410
|
}
|
|
412
411
|
function pe(e) {
|
|
413
|
-
const t =
|
|
414
|
-
return t ? z(t.trace_level, t.s_user_trace_level) : (
|
|
412
|
+
const t = Br(e) ? Me(e) : e;
|
|
413
|
+
return t ? z(t.trace_level, t.s_user_trace_level) : (or(`gobj_get_gclass_trace_level2: gclass NOT FOUND: ${e}`), []);
|
|
415
414
|
}
|
|
416
415
|
function me(e) {
|
|
417
|
-
const t =
|
|
418
|
-
return t ? z(t.no_trace_level, t.s_user_trace_level) : (
|
|
416
|
+
const t = Br(e) ? Me(e) : e;
|
|
417
|
+
return t ? z(t.no_trace_level, t.s_user_trace_level) : (or(`gobj_get_gclass_trace_no_level: gclass NOT FOUND: ${e}`), []);
|
|
419
418
|
}
|
|
420
|
-
function
|
|
419
|
+
function he(e) {
|
|
421
420
|
return Q = Number(e) || 0, 0;
|
|
422
421
|
}
|
|
423
|
-
function
|
|
424
|
-
const r =
|
|
425
|
-
if (!r) return
|
|
422
|
+
function Ee(e, t, n) {
|
|
423
|
+
const r = Br(e) ? Me(e) : e;
|
|
424
|
+
if (!r) return or(`gobj_set_gclass_trace: gclass NOT FOUND: ${e}`), -1;
|
|
426
425
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
427
426
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
428
427
|
}
|
|
429
428
|
function Te(e, t, n) {
|
|
430
|
-
if (!e) return
|
|
429
|
+
if (!e) return or("gobj_set_gobj_trace: gobj NULL"), -1;
|
|
431
430
|
const r = X(t, "gobj_set_gobj_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
432
431
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
433
432
|
}
|
|
434
433
|
function ye(e, t, n) {
|
|
435
|
-
const r =
|
|
436
|
-
if (!r) return
|
|
434
|
+
const r = Br(e) ? Me(e) : e;
|
|
435
|
+
if (!r) return or(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
437
436
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_no_trace", r.s_user_trace_level || null);
|
|
438
437
|
return l ? (n ? r.no_trace_level |= l : r.no_trace_level &= ~l, 0) : -1;
|
|
439
438
|
}
|
|
440
439
|
function ve(e, t, n) {
|
|
441
|
-
if (!e) return
|
|
440
|
+
if (!e) return or("gobj_set_gobj_no_trace: gobj NULL"), -1;
|
|
442
441
|
const r = X(t, "gobj_set_gobj_no_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
443
442
|
return r ? (n ? e.no_trace_level |= r : e.no_trace_level &= ~r, 0) : -1;
|
|
444
443
|
}
|
|
445
|
-
function
|
|
444
|
+
function Oe() {
|
|
446
445
|
return J.map(([e, t, n]) => ({
|
|
447
446
|
name: e,
|
|
448
447
|
bit: t,
|
|
449
448
|
description: n,
|
|
450
|
-
set: !!(
|
|
449
|
+
set: !!(H & t)
|
|
451
450
|
}));
|
|
452
451
|
}
|
|
453
|
-
function
|
|
452
|
+
function Se(e, t, n, r, l, o, i) {
|
|
454
453
|
u = t, _ = n, c = r, f = l, g = o, d = i;
|
|
455
454
|
const s = [["EV_STATE_CHANGED", P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS], [0, 0]];
|
|
456
455
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -461,165 +460,165 @@ function Oe(e, t, n, r, l, o, i) {
|
|
|
461
460
|
}
|
|
462
461
|
function Ne(e, t) {
|
|
463
462
|
let n = {};
|
|
464
|
-
if (!
|
|
463
|
+
if (!Yr(t)) return or("sdata_desc MUST be an array"), _r(t), n;
|
|
465
464
|
for (let r = 0; r < t.length; r++) {
|
|
466
465
|
const l = t[r];
|
|
467
|
-
l.name &&
|
|
466
|
+
l.name && we(e, n, l);
|
|
468
467
|
}
|
|
469
468
|
return n;
|
|
470
469
|
}
|
|
471
|
-
function
|
|
470
|
+
function we(e, t, n) {
|
|
472
471
|
let r, l = n.default_value;
|
|
473
472
|
switch (n.type) {
|
|
474
473
|
case y.DTP_STRING:
|
|
475
474
|
r = String(l);
|
|
476
475
|
break;
|
|
477
476
|
case y.DTP_BOOLEAN:
|
|
478
|
-
r =
|
|
477
|
+
r = tl(l);
|
|
479
478
|
break;
|
|
480
479
|
case y.DTP_INTEGER:
|
|
481
|
-
r = parseInt(l), isNaN(r) &&
|
|
480
|
+
r = parseInt(l), isNaN(r) && or(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
482
481
|
break;
|
|
483
482
|
case y.DTP_REAL:
|
|
484
|
-
r = Number(l), isNaN(r) &&
|
|
483
|
+
r = Number(l), isNaN(r) && or(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
485
484
|
break;
|
|
486
485
|
case y.DTP_LIST:
|
|
487
|
-
if (
|
|
486
|
+
if (Br(l)) try {
|
|
488
487
|
r = JSON.parse(l);
|
|
489
488
|
} catch (e) {
|
|
490
|
-
|
|
489
|
+
or(`JSON parse error: ${e.message}`);
|
|
491
490
|
}
|
|
492
491
|
else r = l;
|
|
493
|
-
|
|
492
|
+
Yr(r) || (r = []);
|
|
494
493
|
break;
|
|
495
494
|
case y.DTP_DICT:
|
|
496
|
-
if (
|
|
495
|
+
if (Br(l)) try {
|
|
497
496
|
r = JSON.parse(l);
|
|
498
497
|
} catch (e) {
|
|
499
|
-
|
|
498
|
+
or(`JSON parse error: ${e.message}`);
|
|
500
499
|
}
|
|
501
500
|
else r = l;
|
|
502
|
-
|
|
501
|
+
Kr(r) || (r = {});
|
|
503
502
|
break;
|
|
504
503
|
case y.DTP_JSON:
|
|
505
|
-
if (
|
|
504
|
+
if (Br(l)) try {
|
|
506
505
|
r = JSON.parse(l);
|
|
507
506
|
} catch (e) {
|
|
508
|
-
|
|
507
|
+
or(`JSON parse error: ${e.message}`);
|
|
509
508
|
}
|
|
510
509
|
else r = l;
|
|
511
510
|
break;
|
|
512
511
|
case y.DTP_POINTER: r = l;
|
|
513
512
|
}
|
|
514
|
-
return void 0 === r && (
|
|
513
|
+
return void 0 === r && (or(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
514
|
}
|
|
516
|
-
function
|
|
515
|
+
function Re(e, t, n, r) {
|
|
517
516
|
let l;
|
|
518
517
|
switch (n.type) {
|
|
519
518
|
case y.DTP_STRING:
|
|
520
519
|
if (null == r) l = "";
|
|
521
|
-
else if (
|
|
520
|
+
else if (Br(r)) l = String(r);
|
|
522
521
|
else {
|
|
523
522
|
let e = JSON.stringify(r);
|
|
524
523
|
e && (l = String(e));
|
|
525
524
|
}
|
|
526
525
|
break;
|
|
527
526
|
case y.DTP_BOOLEAN:
|
|
528
|
-
l =
|
|
527
|
+
l = tl(r);
|
|
529
528
|
break;
|
|
530
529
|
case y.DTP_INTEGER:
|
|
531
|
-
l = parseInt(r), isNaN(l) &&
|
|
530
|
+
l = parseInt(r), isNaN(l) && or(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
532
531
|
break;
|
|
533
532
|
case y.DTP_REAL:
|
|
534
|
-
l = Number(r), isNaN(l) &&
|
|
533
|
+
l = Number(r), isNaN(l) && or(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
535
534
|
break;
|
|
536
535
|
case y.DTP_LIST:
|
|
537
|
-
if (
|
|
536
|
+
if (Br(r)) try {
|
|
538
537
|
l = JSON.parse(r);
|
|
539
538
|
} catch (e) {
|
|
540
|
-
|
|
539
|
+
or(`JSON parse error: ${e.message}`);
|
|
541
540
|
}
|
|
542
541
|
else l = r;
|
|
543
|
-
if (!
|
|
542
|
+
if (!Yr(l)) return or(`attr must be an array: ${n.name}`), -1;
|
|
544
543
|
break;
|
|
545
544
|
case y.DTP_DICT:
|
|
546
|
-
if (
|
|
545
|
+
if (Br(r)) try {
|
|
547
546
|
l = JSON.parse(r);
|
|
548
547
|
} catch (e) {
|
|
549
|
-
|
|
548
|
+
or(`JSON parse error: ${e.message}`);
|
|
550
549
|
}
|
|
551
550
|
else l = r;
|
|
552
|
-
if (!
|
|
551
|
+
if (!Kr(l)) return or(`attr must be an object: ${n.name}`), -1;
|
|
553
552
|
break;
|
|
554
553
|
case y.DTP_JSON:
|
|
555
|
-
if (
|
|
554
|
+
if (Br(r)) try {
|
|
556
555
|
l = JSON.parse(r);
|
|
557
556
|
} catch (e) {
|
|
558
|
-
|
|
557
|
+
or(`JSON parse error: ${e.message}`);
|
|
559
558
|
}
|
|
560
559
|
else l = r;
|
|
561
|
-
if (!
|
|
560
|
+
if (!Yr(l) && !Kr(l)) return or(`attr must be a json dict/list: ${n.name}`), -1;
|
|
562
561
|
break;
|
|
563
562
|
case y.DTP_POINTER: l = r;
|
|
564
563
|
}
|
|
565
|
-
return void 0 === l &&
|
|
564
|
+
return void 0 === l && or(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, Kr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
566
565
|
}
|
|
567
|
-
function
|
|
566
|
+
function je(e) {
|
|
568
567
|
return e.jn_attrs;
|
|
569
568
|
}
|
|
570
569
|
function De(e, t, n) {
|
|
571
|
-
return Qt(e, t) ?
|
|
570
|
+
return Qt(e, t) ? je(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n && or(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`), null);
|
|
572
571
|
}
|
|
573
572
|
function $e(e, t, n) {
|
|
574
|
-
if (!(e && e instanceof I)) return n &&
|
|
573
|
+
if (!(e && e instanceof I)) return n && or("gclass NULL"), null;
|
|
575
574
|
if (!t) return e.attrs_table;
|
|
576
575
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
577
576
|
const r = e.attrs_table[n];
|
|
578
577
|
if (r.name && r.name === t) return r;
|
|
579
578
|
}
|
|
580
|
-
return n &&
|
|
579
|
+
return n && or(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
581
580
|
}
|
|
582
581
|
function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
583
|
-
if (
|
|
584
|
-
if (e.includes("`") || e.includes("^") || e.includes(".")) return
|
|
585
|
-
if (Me(e)) return
|
|
582
|
+
if (el(e)) return or("gclass_name EMPTY"), null;
|
|
583
|
+
if (e.includes("`") || e.includes("^") || e.includes(".")) return or(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
584
|
+
if (Me(e)) return or(`GClass ALREADY exists: ${e}`), null;
|
|
586
585
|
let c = new I(e, r, l, o, i, s, a, u, _);
|
|
587
586
|
(function(e, t) {
|
|
588
|
-
e && e instanceof I ? t ? p[t] ?
|
|
587
|
+
e && e instanceof I ? t ? p[t] ? or(`gclass ALREADY REGISTERED: ${t}`) : p[t] = e : or("gclass_name undefined") : or("gclass undefined");
|
|
589
588
|
})(c, e);
|
|
590
589
|
const f = n.length;
|
|
591
590
|
for (let e = 0; e < f; e++) {
|
|
592
591
|
let t = n[e][0], r = n[e][1];
|
|
593
|
-
if (
|
|
592
|
+
if (el(t)) continue;
|
|
594
593
|
if (Le(c, t) < 0) return Ie(c), null;
|
|
595
594
|
const l = r.length;
|
|
596
595
|
for (let e = 0; e < l; e++) {
|
|
597
596
|
let n = r[e][0], l = r[e][1], o = r[e][2];
|
|
598
|
-
|
|
597
|
+
el(n) || Ue(c, t, n, l, o);
|
|
599
598
|
}
|
|
600
599
|
}
|
|
601
600
|
for (let e = 0; e < t.length; e++) {
|
|
602
601
|
let n = t[e][0], r = t[e][1];
|
|
603
|
-
if (!
|
|
604
|
-
if (
|
|
602
|
+
if (!el(n)) {
|
|
603
|
+
if (Ve(c, n)) return or(`SMachine: event repeated in input_events: ${n}`), Ie(c), null;
|
|
605
604
|
Fe(c, n, r);
|
|
606
605
|
}
|
|
607
606
|
}
|
|
608
607
|
if (!c.fsm_checked) {
|
|
609
|
-
if (
|
|
608
|
+
if (Ge(c) < 0) return Ie(c), null;
|
|
610
609
|
c.fsm_checked = !0;
|
|
611
610
|
}
|
|
612
611
|
return c;
|
|
613
612
|
}
|
|
614
613
|
function Ie(e) {
|
|
615
614
|
let t;
|
|
616
|
-
if (
|
|
615
|
+
if (Br(e)) t = e;
|
|
617
616
|
else {
|
|
618
|
-
if (!(e instanceof I)) return
|
|
617
|
+
if (!(e instanceof I)) return or("Cannot unregister gclass, type unknown"), -1;
|
|
619
618
|
t = e.gclass_name;
|
|
620
619
|
}
|
|
621
620
|
let n = p[t];
|
|
622
|
-
return n ? n.instances > 0 ? (
|
|
621
|
+
return n ? n.instances > 0 ? (or(`Cannot unregister gclass, instances in use: ${t}`), -1) : (delete p[t], 0) : (or(`Cannot unregister gclass, not found: ${t}`), -1);
|
|
623
622
|
}
|
|
624
623
|
function ke(e, t) {
|
|
625
624
|
const n = e.dl_states.length, r = e.dl_states;
|
|
@@ -638,22 +637,22 @@ function Ce(e, t) {
|
|
|
638
637
|
return null;
|
|
639
638
|
}
|
|
640
639
|
function Le(e, t) {
|
|
641
|
-
return e instanceof I ? ke(e, t) ? (
|
|
640
|
+
return e instanceof I ? ke(e, t) ? (or(`state already exists: ${t}`), -1) : (e.dl_states.push(new G(t)), 0) : (or("Cannot add state, typeof not GClass"), -1);
|
|
642
641
|
}
|
|
643
642
|
function Ue(e, t, n, r, l) {
|
|
644
|
-
if (!(e instanceof I)) return
|
|
645
|
-
if (
|
|
643
|
+
if (!(e instanceof I)) return or("Cannot add state, typeof not GClass"), -1;
|
|
644
|
+
if (el(t)) return or("state_name EMPTY"), -1;
|
|
646
645
|
let o = ke(e, t);
|
|
647
|
-
return o ? Ce(o, n) ? (
|
|
646
|
+
return o ? Ce(o, n) ? (or(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new V(n, r, l)), 0) : (or(`state not found: ${t}`), -1);
|
|
648
647
|
}
|
|
649
648
|
function Pe(e, t, n) {
|
|
650
|
-
|
|
649
|
+
el(t) || e.push(new M(t, n));
|
|
651
650
|
}
|
|
652
651
|
function Fe(e, t, n) {
|
|
653
|
-
return e instanceof I ? Pe(e.dl_events, t, n) : (
|
|
652
|
+
return e instanceof I ? Pe(e.dl_events, t, n) : (or("Cannot add state, typeof not GClass"), -1);
|
|
654
653
|
}
|
|
655
|
-
function
|
|
656
|
-
if (!(e instanceof I)) return
|
|
654
|
+
function Ve(e, t) {
|
|
655
|
+
if (!(e instanceof I)) return or("Cannot add state, typeof not GClass"), 0;
|
|
657
656
|
const n = e.dl_events.length, r = e.dl_events;
|
|
658
657
|
for (let e = 0; e < n; e++) {
|
|
659
658
|
let n = r[e];
|
|
@@ -661,26 +660,26 @@ function Ge(e, t) {
|
|
|
661
660
|
}
|
|
662
661
|
return null;
|
|
663
662
|
}
|
|
664
|
-
function
|
|
665
|
-
if (!(e instanceof I)) return
|
|
663
|
+
function Ge(e) {
|
|
664
|
+
if (!(e instanceof I)) return or("Cannot add state, typeof not GClass"), -1;
|
|
666
665
|
let t = 0;
|
|
667
|
-
|
|
666
|
+
Mr(e.dl_states) || (or(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
668
667
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
669
668
|
let r = e.dl_states[n];
|
|
670
|
-
if (!
|
|
669
|
+
if (!el(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
671
670
|
let l = r.dl_actions[n];
|
|
672
|
-
|
|
671
|
+
el(l.event_name) || (Ve(e, l.event_name) || (or(`SMachine: state's event NOT in input_events: gclass ${e.gclass_name}, state ${r.state_name}, event ${l.event_name}`), t += -1), l.next_state && (ke(e, l.next_state) || (or(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${l.next_state}`), t += -1)));
|
|
673
672
|
}
|
|
674
673
|
}
|
|
675
674
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
676
675
|
let r = e.dl_events[n];
|
|
677
|
-
if (!
|
|
676
|
+
if (!el(r.event_name) && (Jr(r.event_flag) || (or(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & P.EVF_OUTPUT_EVENT))) {
|
|
678
677
|
let n = !1;
|
|
679
678
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
680
679
|
let l = e.dl_states[t];
|
|
681
|
-
|
|
680
|
+
el(l.state_name) || Ce(l, r.event_name) && (n = !0);
|
|
682
681
|
}
|
|
683
|
-
n || (
|
|
682
|
+
n || (or(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
684
683
|
}
|
|
685
684
|
}
|
|
686
685
|
return t;
|
|
@@ -690,85 +689,85 @@ function Me(e, t) {
|
|
|
690
689
|
try {
|
|
691
690
|
n = p[e];
|
|
692
691
|
} catch (e) {}
|
|
693
|
-
return n || (t &&
|
|
692
|
+
return n || (t && or(`gclass not found: ${e}`), null);
|
|
694
693
|
}
|
|
695
694
|
function We() {
|
|
696
695
|
let e = [];
|
|
697
|
-
for (const t of Object.keys(m))
|
|
696
|
+
for (const t of Object.keys(m)) Pr(e, t);
|
|
698
697
|
return e;
|
|
699
698
|
}
|
|
700
|
-
function
|
|
701
|
-
return !
|
|
699
|
+
function xe() {
|
|
700
|
+
return !E || E.obflag & U.obflag_destroyed ? null : E;
|
|
702
701
|
}
|
|
703
|
-
function
|
|
702
|
+
function Ke(e, t) {
|
|
704
703
|
e = e.toLowerCase();
|
|
705
|
-
return m[e] || (t &&
|
|
704
|
+
return m[e] || (t && or(`gobj service not found: ${e}`), null);
|
|
706
705
|
}
|
|
707
706
|
function Ye(e) {
|
|
708
|
-
let t =
|
|
709
|
-
return t = t.toLowerCase(), m[t] &&
|
|
707
|
+
let t = Rt(e);
|
|
708
|
+
return t = t.toLowerCase(), m[t] && or(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), m[t] = e, 0;
|
|
710
709
|
}
|
|
711
710
|
function Be(e, t) {
|
|
712
|
-
t.parent &&
|
|
711
|
+
t.parent && or(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
713
712
|
}
|
|
714
713
|
function Je(e, t) {
|
|
715
|
-
let n =
|
|
716
|
-
n >= 0 && (
|
|
717
|
-
}
|
|
718
|
-
function qe(e, t) {
|
|
719
|
-
return yt(e) ? u ? u(e, t) : -1 : (rr(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
714
|
+
let n = To(e.dl_children, t);
|
|
715
|
+
n >= 0 && (Fr(e.dl_children, n), t.parent = null);
|
|
720
716
|
}
|
|
721
717
|
function He(e, t) {
|
|
722
|
-
return yt(e) ?
|
|
718
|
+
return yt(e) ? u ? u(e, t) : -1 : (or(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
719
|
+
}
|
|
720
|
+
function qe(e, t) {
|
|
721
|
+
return yt(e) ? _ ? _(e, t) : -1 : (or(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
723
722
|
}
|
|
724
723
|
function Qe(e, t) {
|
|
725
|
-
return yt(e) ? c ? c(e, t) : -1 : (
|
|
724
|
+
return yt(e) ? c ? c(e, t) : -1 : (or(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
726
725
|
}
|
|
727
726
|
function ze(e, t) {
|
|
728
727
|
return f ? f(e, t) : null;
|
|
729
728
|
}
|
|
730
729
|
function Xe(e, t) {
|
|
731
|
-
"__json_config_variables__" !== t &&
|
|
730
|
+
"__json_config_variables__" !== t && or(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`);
|
|
732
731
|
}
|
|
733
732
|
function Ze(e, t, n) {
|
|
734
733
|
let r = t;
|
|
735
734
|
(function(e, t, n, r, l) {
|
|
736
|
-
if (!e || !t) return
|
|
735
|
+
if (!e || !t) return or("hsdata or kw NULL"), -1;
|
|
737
736
|
let o = 0;
|
|
738
737
|
for (const [i, s] of Object.entries(t)) {
|
|
739
738
|
const t = $e(l.gclass, i, !1);
|
|
740
|
-
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED &&
|
|
739
|
+
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && ir(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += Re(l, e, t, s)) : r && (r(l, i), o--);
|
|
741
740
|
}
|
|
742
741
|
return o;
|
|
743
|
-
})(
|
|
742
|
+
})(je(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (or(`${Dt(e)} json2data() FAILED`), Nr(r));
|
|
744
743
|
}
|
|
745
744
|
function et(e, n, r, l, o) {
|
|
746
745
|
if (o & L.gobj_flag_yuno) {
|
|
747
|
-
if (
|
|
746
|
+
if (h) return or("__yuno__ already created"), null;
|
|
748
747
|
o |= L.gobj_flag_service;
|
|
749
748
|
} else {
|
|
750
|
-
if (!l) return
|
|
751
|
-
if (!("string" == typeof l || l instanceof k)) return
|
|
752
|
-
if (
|
|
749
|
+
if (!l) return or("gobj NEEDS a parent!"), null;
|
|
750
|
+
if (!("string" == typeof l || l instanceof k)) return or(`BAD TYPE of parent: ${l}`), null;
|
|
751
|
+
if (Br(l) && !(l = Ke(l))) return ir(`parent service not found: ${l}`), null;
|
|
753
752
|
}
|
|
754
|
-
if (o & L.gobj_flag_service &&
|
|
753
|
+
if (o & L.gobj_flag_service && Ke(e, !1)) return or(`service ALREADY registered: ${n}^${e}`), null;
|
|
755
754
|
if (o & L.gobj_flag_default_service) {
|
|
756
|
-
if (
|
|
755
|
+
if (E) return or(`default service ALREADY registered: ${n}^${e}`), null;
|
|
757
756
|
o |= L.gobj_flag_service;
|
|
758
757
|
}
|
|
759
|
-
if (
|
|
758
|
+
if (el(n)) return or("gclass_name must be a string"), null;
|
|
760
759
|
let i = Me(n, !1);
|
|
761
|
-
if (!i) return
|
|
762
|
-
if (!
|
|
763
|
-
if (!
|
|
764
|
-
if (e.includes("`")) return
|
|
765
|
-
if (e.includes("^")) return
|
|
760
|
+
if (!i) return or(`GClass not registered: ${n}^${e}`), null;
|
|
761
|
+
if (!Br(e)) return or(`gobj_name must be a string: ${n}`), null;
|
|
762
|
+
if (!el(e)) {
|
|
763
|
+
if (e.includes("`")) return or(`gobj_name cannot contain char ': ${n}^${e}`), null;
|
|
764
|
+
if (e.includes("^")) return or(`gobj_name cannot contain char ^: ${n}^${e}`), null;
|
|
766
765
|
}
|
|
767
766
|
let s = new k(e, i, r, l, o);
|
|
768
767
|
s.jn_attrs = Ne(s, i.attrs_table);
|
|
769
768
|
for (const [e, t] of Object.entries(s.jn_attrs)) e in s.priv && (s.priv[e] = t);
|
|
770
769
|
let a = te(s);
|
|
771
|
-
return a && Y(t("💙💙⏩ creating: %s^%s", i.gclass_name, e)), s.gobj_flag & L.gobj_flag_service && Ye(s), s.gobj_flag & L.gobj_flag_yuno && (
|
|
770
|
+
return a && Y(t("💙💙⏩ creating: %s^%s", i.gclass_name, e)), s.gobj_flag & L.gobj_flag_service && Ye(s), s.gobj_flag & L.gobj_flag_yuno && (h = s), s.gobj_flag & L.gobj_flag_default_service && (E = s), s.gobj_flag & L.gobj_flag_yuno || Be(l, s), s.obflag |= U.obflag_created, s.gclass.instances++, Ze(s, r), s.gobj_flag & L.gobj_flag_service && u && u(s, null), s.gclass.gmt.mt_create2 ? s.gclass.gmt.mt_create2(s, r) : s.gclass.gmt.mt_create && s.gclass.gmt.mt_create(s), l && l.gclass.gmt.mt_child_added && (a && Y(t("👦👦🔵 child_added(%s): %s", $t(l), Dt(s))), l.gclass.gmt.mt_child_added(l, s)), a && Y(t("💙💙⏪ created: %s", $t(s))), s;
|
|
772
771
|
}
|
|
773
772
|
function tt(e, t, n) {
|
|
774
773
|
return et(e, t, n, null, L.gobj_flag_yuno);
|
|
@@ -789,8 +788,8 @@ function it(e, t, n, r) {
|
|
|
789
788
|
return et(e, t, n, r, 0);
|
|
790
789
|
}
|
|
791
790
|
function st(e) {
|
|
792
|
-
if (Ct(e)) return void
|
|
793
|
-
e.__refs__ > 0 &&
|
|
791
|
+
if (Ct(e)) return void or("gobj NULL or DESTROYED");
|
|
792
|
+
e.__refs__ > 0 && or(`${Dt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (or(`Destroying a PLAYING gobj: ${$t(e)}`), ht(e)), e.running && (or(`Destroying a RUNNING gobj: ${$t(e)}`), gt(e)), e.obflag |= U.obflag_destroying, function(e) {
|
|
794
793
|
if (0 === pn.length) return;
|
|
795
794
|
for (let t of pn) t.src === e && (t.src = null);
|
|
796
795
|
pn = pn.filter((t) => t.dst !== e);
|
|
@@ -799,9 +798,9 @@ function st(e) {
|
|
|
799
798
|
n && Y(t("💔💔⏩ destroying: %s", $t(e)));
|
|
800
799
|
let r = At(e);
|
|
801
800
|
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s", $t(r), Dt(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & L.gobj_flag_service && function(e) {
|
|
802
|
-
let t =
|
|
803
|
-
t = t.toLowerCase(), m[t] ? delete m[t] :
|
|
804
|
-
}(e),
|
|
801
|
+
let t = Rt(e);
|
|
802
|
+
t = t.toLowerCase(), m[t] ? delete m[t] : or(`"service NOT found in register": ${t}`);
|
|
803
|
+
}(e), In(e, e.dl_subscriptions, !0), In(e, e.dl_subscribings, !0), r && (Je(r, e), It(e) && (Lt(r) !== e || Ct(r) || Ut(r, null))), function(e) {
|
|
805
804
|
let t = e.dl_children.slice();
|
|
806
805
|
for (let e = 0; e < t.length; e++) {
|
|
807
806
|
let n = t[e];
|
|
@@ -810,57 +809,57 @@ function st(e) {
|
|
|
810
809
|
}(e), e.obflag & U.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), n && Y(t("💔💔⏪ destroyed: %s", $t(e))), e.obflag |= U.obflag_destroyed, e.obflag & U.obflag_created && e.gclass.instances--;
|
|
811
810
|
}
|
|
812
811
|
function at(e) {
|
|
813
|
-
if (Ct(e)) return
|
|
814
|
-
if (e.running) return
|
|
815
|
-
if (e.disabled) return
|
|
812
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), -1;
|
|
813
|
+
if (e.running) return or(`${Dt(e)}: GObj ALREADY RUNNING`), -1;
|
|
814
|
+
if (e.disabled) return or(`${Dt(e)}: GObj DISABLED`), -1;
|
|
816
815
|
re(e) && Y(t("⏺ ⏺ start: %s", $t(e))), e.running = !0;
|
|
817
816
|
let n = 0;
|
|
818
817
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
819
818
|
}
|
|
820
819
|
function ut(e, t, n) {
|
|
821
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) ||
|
|
820
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || Et(e) || Tt(e) || at(e), 0;
|
|
822
821
|
}
|
|
823
822
|
function _t(e) {
|
|
824
|
-
return Ct(e) ? (
|
|
823
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, ut, 0, 0);
|
|
825
824
|
}
|
|
826
825
|
function ct(e, t, n) {
|
|
827
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start || Tt(e) ? 1 : (
|
|
826
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || Tt(e) ? 1 : (Et(e) || at(e), 0);
|
|
828
827
|
}
|
|
829
828
|
function ft(e) {
|
|
830
|
-
return Ct(e) ? (
|
|
829
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", $t(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Vt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
831
830
|
}
|
|
832
831
|
function gt(e) {
|
|
833
|
-
if (Ct(e)) return
|
|
834
|
-
if (!e.running) return
|
|
835
|
-
e.playing && (
|
|
832
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), -1;
|
|
833
|
+
if (!e.running) return or(`${Dt(e)}: GObj NOT RUNNING`), -1;
|
|
834
|
+
e.playing && (ir(`${Dt(e)}: GObj stopping without previous pause`), ht(e)), re(e) && Y(t("⏹ ⏹ stop: %s", $t(e))), e.running = !1;
|
|
836
835
|
let n = 0;
|
|
837
836
|
return e.gclass.gmt.mt_stop && (n = e.gclass.gmt.mt_stop(e)), n;
|
|
838
837
|
}
|
|
839
838
|
function dt(e, t, n) {
|
|
840
|
-
return
|
|
839
|
+
return Et(e) && gt(e), 0;
|
|
841
840
|
}
|
|
842
841
|
function bt(e) {
|
|
843
|
-
return Ct(e) ? (
|
|
842
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, dt, 0, 0);
|
|
844
843
|
}
|
|
845
844
|
function pt(e) {
|
|
846
|
-
return Ct(e) ? (
|
|
845
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", $t(e))), Et(e) && gt(e), Vt(e, F.WALK_TOP2BOTTOM, dt, 0, 0));
|
|
847
846
|
}
|
|
848
847
|
function mt(e) {
|
|
849
|
-
if (Ct(e)) return
|
|
850
|
-
if (e.playing) return
|
|
851
|
-
if (e.disabled) return
|
|
852
|
-
if (!
|
|
853
|
-
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return
|
|
854
|
-
|
|
848
|
+
if (Ct(e)) return or(`gobj NULL or DESTROYED: ${Dt(e)}`), -1;
|
|
849
|
+
if (e.playing) return or(`${Dt(e)}: GObj ALREADY PLAYING`), -1;
|
|
850
|
+
if (e.disabled) return or(`${Dt(e)}: GObj DISABLED`), -1;
|
|
851
|
+
if (!Et(e)) {
|
|
852
|
+
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return or(`${Dt(e)}: Cannot play, start not done`), -1;
|
|
853
|
+
ir(`${Dt(e)}: GObj playing without previous start`), at(e);
|
|
855
854
|
}
|
|
856
855
|
re(e) && Y(t("⏯ ⏯ play: %s", $t(e))), e.playing = !0;
|
|
857
856
|
let n = 0;
|
|
858
857
|
return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), (n < 0 || !1 === n) && (e.playing = !1)), n;
|
|
859
858
|
}
|
|
860
|
-
function Et(e) {
|
|
861
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", $t(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (rr(`${Dt(e)}: GObj NOT PLAYING`), -1);
|
|
862
|
-
}
|
|
863
859
|
function ht(e) {
|
|
860
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", $t(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (or(`${Dt(e)}: GObj NOT PLAYING`), -1);
|
|
861
|
+
}
|
|
862
|
+
function Et(e) {
|
|
864
863
|
return !Ct(e) && e.running;
|
|
865
864
|
}
|
|
866
865
|
function Tt(e) {
|
|
@@ -872,77 +871,77 @@ function yt(e) {
|
|
|
872
871
|
function vt(e) {
|
|
873
872
|
return !Ct(e) && e.playing;
|
|
874
873
|
}
|
|
875
|
-
function St() {
|
|
876
|
-
return !E || E.obflag & U.obflag_destroyed ? null : E;
|
|
877
|
-
}
|
|
878
874
|
function Ot() {
|
|
879
|
-
|
|
880
|
-
|
|
875
|
+
return !h || h.obflag & U.obflag_destroyed ? null : h;
|
|
876
|
+
}
|
|
877
|
+
function St() {
|
|
878
|
+
let e = Ot();
|
|
879
|
+
return e ? Rt(e) : "";
|
|
881
880
|
}
|
|
882
881
|
function Nt() {
|
|
883
|
-
let e =
|
|
882
|
+
let e = Ot();
|
|
884
883
|
return e ? tn(e, "yuno_role") : "";
|
|
885
884
|
}
|
|
886
|
-
function
|
|
887
|
-
let e =
|
|
885
|
+
function wt() {
|
|
886
|
+
let e = Ot();
|
|
888
887
|
return e ? tn(e, "yuno_id") : "";
|
|
889
888
|
}
|
|
890
|
-
function
|
|
891
|
-
return
|
|
889
|
+
function Rt(e) {
|
|
890
|
+
return Zr(e) ? e.gobj_name : (or("gobj bad type"), null);
|
|
892
891
|
}
|
|
893
|
-
function
|
|
894
|
-
return
|
|
892
|
+
function jt(e) {
|
|
893
|
+
return Zr(e) ? e.gclass.gclass_name : (or("gobj NULL of bad type"), null);
|
|
895
894
|
}
|
|
896
895
|
function Dt(e) {
|
|
897
|
-
return
|
|
896
|
+
return Zr(e) ? e.gclass.gclass_name + "^" + Rt(e) : (or("gobj bad type"), null);
|
|
898
897
|
}
|
|
899
898
|
function $t(e) {
|
|
900
|
-
if (!
|
|
899
|
+
if (!Zr(e)) return or("gobj NULL of bad type"), null;
|
|
901
900
|
let t = Dt(e), n = At(e);
|
|
902
901
|
for (; n;) t = Dt(n) + "`" + t, n = At(n);
|
|
903
902
|
return t;
|
|
904
903
|
}
|
|
905
904
|
function At(e) {
|
|
906
|
-
return
|
|
905
|
+
return Zr(e) ? e.parent : (or("gobj NULL of bad type"), null);
|
|
907
906
|
}
|
|
908
907
|
function It(e) {
|
|
909
|
-
return
|
|
908
|
+
return Zr(e) ? !!(e.gobj_flag & L.gobj_flag_volatil) : (or("gobj NULL of bad type"), null);
|
|
910
909
|
}
|
|
911
910
|
function kt(e) {
|
|
912
|
-
return
|
|
911
|
+
return Zr(e) ? !!(e.gobj_flag & L.gobj_flag_pure_child) : (or("gobj NULL of bad type"), null);
|
|
913
912
|
}
|
|
914
913
|
function Ct(e) {
|
|
915
|
-
return !
|
|
914
|
+
return !Zr(e) || !!(e.obflag & (U.obflag_destroyed | U.obflag_destroying));
|
|
916
915
|
}
|
|
917
916
|
function Lt(e) {
|
|
918
|
-
return
|
|
917
|
+
return Zr(e) ? e.bottom_gobj : (or("gobj NULL of bad type"), null);
|
|
919
918
|
}
|
|
920
919
|
function Ut(e, t) {
|
|
921
|
-
if (!
|
|
922
|
-
e.bottom_gobj &&
|
|
920
|
+
if (!Zr(e)) return or("gobj NULL of bad type"), null;
|
|
921
|
+
e.bottom_gobj && ir(`${Dt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
923
922
|
}
|
|
924
923
|
function Pt(e, t, n) {
|
|
925
|
-
return
|
|
924
|
+
return Zr(e) ? t ? $e(e.gclass, t, n) : e.gclass.attrs_table : (or("gobj NULL of bad type"), null);
|
|
926
925
|
}
|
|
927
926
|
function Ft(e, t, n, r, l) {
|
|
928
|
-
return Ct(e) ? (
|
|
927
|
+
return Ct(e) ? (or("gobj NULL, destroying, or bad type"), 0) : Mt(e.dl_children, t, n, r, l);
|
|
929
928
|
}
|
|
930
|
-
function
|
|
931
|
-
return Ct(e) ? (
|
|
929
|
+
function Vt(e, t, n, r, l) {
|
|
930
|
+
return Ct(e) ? (or("gobj NULL, destroying, or bad type"), 0) : xt(e.dl_children, t, n, r, l);
|
|
932
931
|
}
|
|
933
|
-
function
|
|
934
|
-
return "number" == typeof e && isFinite(e) ? e : (null == e ||
|
|
932
|
+
function Gt(e) {
|
|
933
|
+
return "number" == typeof e && isFinite(e) ? e : (null == e || or(`walk callback must return a NUMBER (-1 stop, 0 descend, >0 skip children), got ${typeof e}: taken as 0`), 0);
|
|
935
934
|
}
|
|
936
935
|
function Mt(e, t, n, r, l) {
|
|
937
936
|
let o, i = [...e];
|
|
938
937
|
if (t & F.WALK_LAST2FIRST) for (let e = i.length; e > 0; e--) {
|
|
939
938
|
o = i[e - 1];
|
|
940
|
-
let t =
|
|
939
|
+
let t = Gt(n(o, r, l));
|
|
941
940
|
if (t < 0) return t;
|
|
942
941
|
}
|
|
943
942
|
else for (let e = 0; e < i.length; e++) {
|
|
944
943
|
o = i[e];
|
|
945
|
-
let t =
|
|
944
|
+
let t = Gt(n(o, r, l));
|
|
946
945
|
if (t < 0) return t;
|
|
947
946
|
}
|
|
948
947
|
return 0;
|
|
@@ -955,34 +954,34 @@ function Wt(e, t, n, r, l) {
|
|
|
955
954
|
} else for (let s = 0; s < e.length; s++) if (o = e[s], i = Wt([...o.dl_children], t, n, r, l), i < 0) return i;
|
|
956
955
|
return i;
|
|
957
956
|
}
|
|
958
|
-
function
|
|
957
|
+
function xt(e, t, n, r, l) {
|
|
959
958
|
if (t & F.WALK_BYLEVEL) return Wt(e, t, n, r, l);
|
|
960
959
|
let o, i;
|
|
961
960
|
if (t & F.WALK_BOTTOM2TOP) for (let s = e.length; s > 0; s--) {
|
|
962
|
-
if (i = e[s - 1], o =
|
|
963
|
-
if (o =
|
|
961
|
+
if (i = e[s - 1], o = xt([...i.dl_children], t, n, r, l), o < 0) return o;
|
|
962
|
+
if (o = Gt(n(i, r, l)), o < 0) return o;
|
|
964
963
|
}
|
|
965
964
|
else for (let s = 0; s < e.length; s++) {
|
|
966
|
-
if (i = e[s], o =
|
|
967
|
-
if (0 === o && (o =
|
|
965
|
+
if (i = e[s], o = Gt(n(i, r, l)), o < 0) return o;
|
|
966
|
+
if (0 === o && (o = xt([...i.dl_children], t, n, r, l), o < 0)) return o;
|
|
968
967
|
}
|
|
969
968
|
return 0;
|
|
970
969
|
}
|
|
971
|
-
function
|
|
972
|
-
if (
|
|
970
|
+
function Kt(e, t) {
|
|
971
|
+
if (el(t)) return null;
|
|
973
972
|
const n = t.toLowerCase();
|
|
974
|
-
return "__default_service__" === n ?
|
|
973
|
+
return "__default_service__" === n ? E : "__yuno__" === n || "__root__" === n ? h : qt(h, t);
|
|
975
974
|
}
|
|
976
975
|
function Yt(e, t) {
|
|
977
|
-
if (!
|
|
976
|
+
if (!Zr(e)) return or("gobj NULL of bad type"), !1;
|
|
978
977
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
979
978
|
t.__disabled__;
|
|
980
979
|
let o = t.__state__;
|
|
981
|
-
if (n && n !==
|
|
982
|
-
if (r && r !==
|
|
980
|
+
if (n && n !== jt(e)) return !1;
|
|
981
|
+
if (r && r !== Rt(e)) return !1;
|
|
983
982
|
if (l) {
|
|
984
983
|
let t = l.length;
|
|
985
|
-
if (l !==
|
|
984
|
+
if (l !== Rt(e).substring(0, t)) return !1;
|
|
986
985
|
}
|
|
987
986
|
if (o && o !== cn(e)) return !1;
|
|
988
987
|
let i = e.jn_attrs;
|
|
@@ -990,7 +989,7 @@ function Yt(e, t) {
|
|
|
990
989
|
return !0;
|
|
991
990
|
}
|
|
992
991
|
function Bt(e, t) {
|
|
993
|
-
if (Ct(e)) return
|
|
992
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), null;
|
|
994
993
|
const n = e.dl_children;
|
|
995
994
|
for (let e = 0; e < n.length; e++) {
|
|
996
995
|
const r = n[e];
|
|
@@ -999,7 +998,7 @@ function Bt(e, t) {
|
|
|
999
998
|
return null;
|
|
1000
999
|
}
|
|
1001
1000
|
function Jt(e, t) {
|
|
1002
|
-
if (Ct(e)) return
|
|
1001
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), null;
|
|
1003
1002
|
t = t || {};
|
|
1004
1003
|
let n = [];
|
|
1005
1004
|
const r = e.dl_children;
|
|
@@ -1009,7 +1008,7 @@ function Jt(e, t) {
|
|
|
1009
1008
|
}
|
|
1010
1009
|
return n;
|
|
1011
1010
|
}
|
|
1012
|
-
function
|
|
1011
|
+
function Ht(e, t) {
|
|
1013
1012
|
t = t || {};
|
|
1014
1013
|
let n = [];
|
|
1015
1014
|
return function e(n, r) {
|
|
@@ -1020,27 +1019,27 @@ function qt(e, t) {
|
|
|
1020
1019
|
}
|
|
1021
1020
|
}(n, e), n;
|
|
1022
1021
|
}
|
|
1023
|
-
function
|
|
1022
|
+
function qt(e, t) {
|
|
1024
1023
|
if (!t) return null;
|
|
1025
1024
|
let n = t.split("`");
|
|
1026
1025
|
if (!function(e, t) {
|
|
1027
1026
|
let n = t.split("^"), r = null, l = null;
|
|
1028
1027
|
if (2 === n.length) {
|
|
1029
|
-
if (l = n[0], r = n[1], l !==
|
|
1028
|
+
if (l = n[0], r = n[1], l !== jt(e)) return !1;
|
|
1030
1029
|
} else {
|
|
1031
1030
|
if (1 !== n.length) return !1;
|
|
1032
1031
|
r = n[0];
|
|
1033
1032
|
}
|
|
1034
|
-
return r ===
|
|
1033
|
+
return r === Rt(e);
|
|
1035
1034
|
}(e, n[0])) return null;
|
|
1036
1035
|
if (1 === n.length) return e;
|
|
1037
1036
|
let r = n[1].split("^"), l = {};
|
|
1038
1037
|
1 === r.length ? l.__gobj_name__ = r : (l.__gclass_name__ = r[0], l.__gobj_name__ = r[1]);
|
|
1039
1038
|
let o = Bt(e, l);
|
|
1040
|
-
return o ? (n.splice(0, 1), n = n.join("`"),
|
|
1039
|
+
return o ? (n.splice(0, 1), n = n.join("`"), qt(o, n)) : null;
|
|
1041
1040
|
}
|
|
1042
1041
|
function Qt(e, t) {
|
|
1043
|
-
return !
|
|
1042
|
+
return !el(t) && !!$e(e.gclass, t, !1);
|
|
1044
1043
|
}
|
|
1045
1044
|
function zt(e, t, n) {
|
|
1046
1045
|
let r = e.jn_attrs;
|
|
@@ -1048,7 +1047,7 @@ function zt(e, t, n) {
|
|
|
1048
1047
|
let n = r[t];
|
|
1049
1048
|
return e.gclass.gmt.mt_reading ? e.gclass.gmt.mt_reading(e, t, n) : n;
|
|
1050
1049
|
}
|
|
1051
|
-
return
|
|
1050
|
+
return or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), null;
|
|
1052
1051
|
}
|
|
1053
1052
|
function Xt(e, t, n) {
|
|
1054
1053
|
let r = {}, l = e.gclass.attrs_table;
|
|
@@ -1056,41 +1055,41 @@ function Xt(e, t, n) {
|
|
|
1056
1055
|
const o = l[n];
|
|
1057
1056
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
1058
1057
|
let t;
|
|
1059
|
-
!e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? t =
|
|
1058
|
+
!e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? t = Ir(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = Ir(e.jn_attrs, o.name))), Cr(r, o.name, t);
|
|
1060
1059
|
}
|
|
1061
1060
|
}
|
|
1062
1061
|
return r;
|
|
1063
1062
|
}
|
|
1064
1063
|
function Zt(e, t) {
|
|
1065
1064
|
if (t) {
|
|
1066
|
-
if (0 ===
|
|
1067
|
-
if (0 ===
|
|
1068
|
-
if (0 ===
|
|
1069
|
-
if (0 ===
|
|
1065
|
+
if (0 === ll(t, "__disabled__")) return Tt(e);
|
|
1066
|
+
if (0 === ll(t, "__running__")) return Et(e);
|
|
1067
|
+
if (0 === ll(t, "__playing__")) return vt(e);
|
|
1068
|
+
if (0 === ll(t, "__service__")) return yt(e);
|
|
1070
1069
|
}
|
|
1071
1070
|
let n = De(e, t, !1);
|
|
1072
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ?
|
|
1071
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? Ir(n, t) : e.gclass.gmt.mt_reading(e, t) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1073
1072
|
}
|
|
1074
1073
|
function en(e, t) {
|
|
1075
|
-
t &&
|
|
1074
|
+
t && ll(t, "__trace_level__");
|
|
1076
1075
|
let n = De(e, t, !1);
|
|
1077
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ?
|
|
1076
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? Ir(n, t) : e.gclass.gmt.mt_reading(e, t) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1078
1077
|
}
|
|
1079
1078
|
function tn(e, t) {
|
|
1080
|
-
if (t && 0 ===
|
|
1079
|
+
if (t && 0 === ll(t, "__state__")) return cn(e);
|
|
1081
1080
|
let n = De(e, t, !1);
|
|
1082
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ?
|
|
1081
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? Ir(n, t) : e.gclass.gmt.mt_reading(e, t) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1083
1082
|
}
|
|
1084
1083
|
function nn(e, t) {
|
|
1085
1084
|
let n = De(e, t, !1);
|
|
1086
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ?
|
|
1085
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? Ir(n, t) : e.gclass.gmt.mt_reading(e, t) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1087
1086
|
}
|
|
1088
1087
|
function rn(e, n, r, l) {
|
|
1089
|
-
if (!
|
|
1088
|
+
if (!Br(n)) return or(t("gobj_write_attr(%s): path must be a string", Dt(e))), -1;
|
|
1090
1089
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1091
1090
|
if (s.length <= 1) {
|
|
1092
1091
|
let l = n;
|
|
1093
|
-
return l in i && i.hasOwnProperty(l) ? (i[l] = r,
|
|
1092
|
+
return l in i && i.hasOwnProperty(l) ? (i[l] = r, Kr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (or(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), l)), -1);
|
|
1094
1093
|
}
|
|
1095
1094
|
let a = s.length;
|
|
1096
1095
|
for (let t = 0; t < a; t++) {
|
|
@@ -1101,65 +1100,65 @@ function rn(e, n, r, l) {
|
|
|
1101
1100
|
continue;
|
|
1102
1101
|
}
|
|
1103
1102
|
let l = e.jn_attrs;
|
|
1104
|
-
if (o in l && l.hasOwnProperty(o)) return l[o] = r,
|
|
1103
|
+
if (o in l && l.hasOwnProperty(o)) return l[o] = r, Kr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
1105
1104
|
break;
|
|
1106
1105
|
}
|
|
1107
|
-
return
|
|
1106
|
+
return or(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), o)), -1;
|
|
1108
1107
|
}
|
|
1109
1108
|
function ln(e) {
|
|
1110
1109
|
return function(e, t, n) {
|
|
1111
|
-
if (Ct(e)) return
|
|
1110
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), -1;
|
|
1112
1111
|
let r = e.gclass.attrs_table;
|
|
1113
1112
|
for (let l = 0; l < r.length; l++) {
|
|
1114
1113
|
const o = r[l];
|
|
1115
1114
|
if (o.name && !(n && o.flag & n) && (-1 === t || o.flag & t)) {
|
|
1116
|
-
const t =
|
|
1117
|
-
|
|
1115
|
+
const t = we(e, e.jn_attrs, o);
|
|
1116
|
+
Kr(e.priv) && e.priv.hasOwnProperty(o.name) && (e.priv[o.name] = t), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name);
|
|
1118
1117
|
}
|
|
1119
1118
|
}
|
|
1120
1119
|
return 0;
|
|
1121
1120
|
}(e, v.SDF_VOLATIL, 0);
|
|
1122
1121
|
}
|
|
1123
1122
|
function on(e, t, n, r) {
|
|
1124
|
-
let l =
|
|
1123
|
+
let l = je(e), o = 0;
|
|
1125
1124
|
for (const [r, i] of Object.entries(t)) {
|
|
1126
1125
|
let t = Pt(e, r, !0);
|
|
1127
|
-
t && (-1 === n || t.flag & n) && (o +=
|
|
1126
|
+
t && (-1 === n || t.flag & n) && (o += Re(e, l, t, i));
|
|
1128
1127
|
}
|
|
1129
1128
|
return o;
|
|
1130
1129
|
}
|
|
1131
1130
|
function sn(e, t, n) {
|
|
1132
1131
|
let r = De(e, t, !1);
|
|
1133
|
-
return r ? (r[t] =
|
|
1132
|
+
return r ? (r[t] = tl(n), Kr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1134
1133
|
}
|
|
1135
1134
|
function an(e, t, n) {
|
|
1136
1135
|
let r = De(e, t, !1);
|
|
1137
|
-
return r ? (r[t] = parseInt(n),
|
|
1136
|
+
return r ? (r[t] = parseInt(n), Kr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1138
1137
|
}
|
|
1139
1138
|
function un(e, t, n) {
|
|
1140
1139
|
let r = De(e, t, !1);
|
|
1141
|
-
return r ? (r[t] = String(n),
|
|
1140
|
+
return r ? (r[t] = String(n), Kr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (or(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1142
1141
|
}
|
|
1143
1142
|
function _n(e, n) {
|
|
1144
|
-
if (Ct(e)) return
|
|
1143
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), null;
|
|
1145
1144
|
if (e.current_state.state_name === n) return !1;
|
|
1146
1145
|
let r = ke(e.gclass, n);
|
|
1147
|
-
if (!r) return
|
|
1146
|
+
if (!r) return or(`${Dt(e)}: state unknown, state ${n}`), !1;
|
|
1148
1147
|
e.last_state = e.current_state, e.current_state = r;
|
|
1149
1148
|
let l = oe(e, "EV_STATE_CHANGED"), o = !!function(e) {
|
|
1150
1149
|
return Z(e) & B.TRACE_STATES;
|
|
1151
1150
|
}(e);
|
|
1152
|
-
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!",
|
|
1151
|
+
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", jt(e), Rt(e), cn(e), e.last_state.state_name))), !0;
|
|
1153
1152
|
}
|
|
1154
1153
|
function cn(e) {
|
|
1155
|
-
return
|
|
1154
|
+
return Zr(e) ? e.current_state.state_name : (or("hgobj NULL"), "");
|
|
1156
1155
|
}
|
|
1157
1156
|
function fn(e, n) {
|
|
1158
|
-
return Ct(e) ? (
|
|
1157
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.mt_child_added && (te(e) && ar(t("👦👦🔵 child_added(%s): %s", $t(n), Dt(e))), n.mt_child_added(n, e)), 0) : (or(`${Dt(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
1159
1158
|
}
|
|
1160
1159
|
function gn(e, t, n) {
|
|
1161
|
-
if (!
|
|
1162
|
-
let r =
|
|
1160
|
+
if (!Zr(e)) return or("gobj NULL of bad type"), null;
|
|
1161
|
+
let r = Ve(e.gclass, t);
|
|
1163
1162
|
if (r) return r;
|
|
1164
1163
|
if (n) {
|
|
1165
1164
|
const e = b.length, n = b;
|
|
@@ -1179,15 +1178,15 @@ function bn(e, t, n) {
|
|
|
1179
1178
|
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & P.EVF_OUTPUT_EVENT);
|
|
1180
1179
|
}
|
|
1181
1180
|
var pn = [], mn = !1;
|
|
1182
|
-
function
|
|
1183
|
-
return e && e instanceof k ? e.obflag & (U.obflag_destroyed | U.obflag_destroying) ? (
|
|
1181
|
+
function hn(e, n, r, l) {
|
|
1182
|
+
return e && e instanceof k ? e.obflag & (U.obflag_destroyed | U.obflag_destroying) ? (or(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) : el(n) ? (or("gobj_post_event(): event EMPTY"), -1) : dn(e, n, 0) ? pn.length >= 1e4 ? (or(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${n}, pending ${pn.length}`), -1) : (pn.push({
|
|
1184
1183
|
dst: e,
|
|
1185
1184
|
event: n,
|
|
1186
1185
|
kw: r,
|
|
1187
1186
|
src: l
|
|
1188
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (
|
|
1187
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (or(`gobj_post_event(): event NOT DEFINED in gclass ${jt(e)}, event ${n}`), -1) : (or(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1189
1188
|
}
|
|
1190
|
-
function
|
|
1189
|
+
function En() {
|
|
1191
1190
|
return pn.length;
|
|
1192
1191
|
}
|
|
1193
1192
|
function Tn() {
|
|
@@ -1199,33 +1198,46 @@ function Tn() {
|
|
|
1199
1198
|
return pn.length > 0 && !mn && (mn = !0, setTimeout(Tn, 0)), t;
|
|
1200
1199
|
}
|
|
1201
1200
|
function yn(e, n, r, l) {
|
|
1202
|
-
if (!(e && e instanceof k)) return
|
|
1203
|
-
if (e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return
|
|
1201
|
+
if (!(e && e instanceof k)) return or("gobj dst NULL"), -1;
|
|
1202
|
+
if (e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return or("gobj dst DESTROYED"), -1;
|
|
1204
1203
|
let o = e.current_state;
|
|
1205
|
-
if (!o) return
|
|
1204
|
+
if (!o) return or(`${Dt(e)}: current_state NULL`), -1;
|
|
1206
1205
|
let i = oe(e, n) && !ie(l, n);
|
|
1207
1206
|
T++;
|
|
1208
1207
|
let s = Ce(o, n);
|
|
1209
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) &&
|
|
1208
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) && Gr(r) && Nr(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", jt(e), Rt(e), o.state_name, n || "", l && !l.running ? "!!" : "", jt(l), Rt(l))), or(`📛📛 Event NOT DEFINED in state 📛📛: ${Dt(e)}, ${o.state_name}, ${n}`), T--, -1);
|
|
1210
1209
|
if (i) {
|
|
1211
1210
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Dt(e), o.state_name, l && !l.running ? "!!" : "", Dt(l)));
|
|
1212
1211
|
else {
|
|
1213
1212
|
let r = "";
|
|
1214
|
-
s.action && (r =
|
|
1213
|
+
s.action && (r = Oo(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", jt(e), Rt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", jt(l), Rt(l)));
|
|
1215
1214
|
}
|
|
1216
|
-
r && le(e) &&
|
|
1215
|
+
r && le(e) && Gr(r) && Nr(r);
|
|
1217
1216
|
}
|
|
1218
1217
|
s.next_state && _n(e, s.next_state);
|
|
1219
1218
|
let a = -1;
|
|
1220
1219
|
try {
|
|
1221
1220
|
s.action && (a = s.action(e, n, r, l));
|
|
1222
1221
|
} finally {}
|
|
1223
|
-
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!",
|
|
1222
|
+
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", jt(e), Rt(e), e.current_state.state_name, n || "", Jr(a) ? a : 0)), T--, a;
|
|
1224
1223
|
}
|
|
1225
1224
|
var vn = Object.freeze({
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1225
|
+
__rename_event_name__: 1,
|
|
1226
|
+
__hard_subscription__: 2,
|
|
1227
|
+
__own_event__: 4
|
|
1228
|
+
});
|
|
1229
|
+
function On(e) {
|
|
1230
|
+
let t = String(e).toLowerCase();
|
|
1231
|
+
for (let e in p) {
|
|
1232
|
+
let n = p[e].dl_events;
|
|
1233
|
+
for (let e = 0; e < n.length; e++) {
|
|
1234
|
+
let r = n[e];
|
|
1235
|
+
if (r.event_name && r.event_name.toLowerCase() === t) return r;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
return null;
|
|
1239
|
+
}
|
|
1240
|
+
var Sn = [
|
|
1229
1241
|
N(y.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
1230
1242
|
N(y.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
1231
1243
|
N(y.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
@@ -1236,50 +1248,65 @@ var vn = Object.freeze({
|
|
|
1236
1248
|
N(y.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
1237
1249
|
N(y.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
1238
1250
|
N(y.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
1239
|
-
|
|
1251
|
+
S()
|
|
1240
1252
|
];
|
|
1241
|
-
function
|
|
1242
|
-
let
|
|
1243
|
-
if (
|
|
1244
|
-
|
|
1245
|
-
|
|
1253
|
+
function Nn(e, t) {
|
|
1254
|
+
let n = e ? e.__config__ : null;
|
|
1255
|
+
if (!Kr(n) || !_l(n, "__hard_subscription__") && !_l(n, "__own_event__") && !_l(n, "__rename_event_name__")) return {
|
|
1256
|
+
kw: e,
|
|
1257
|
+
renamed_event: ""
|
|
1258
|
+
};
|
|
1259
|
+
let r = Object.assign({}, e), l = Object.assign({}, n);
|
|
1260
|
+
r.__config__ = l;
|
|
1261
|
+
let o = "", i = l.__rename_event_name__, s = "string" != typeof i || el(i) ? null : On(i);
|
|
1262
|
+
return s && (o = s.event_name, delete l.__rename_event_name__, t && Wr(r.__global__) > 0 && (r.__global__ = Object.assign({}, r.__global__, { __original_event_name__: t }))), delete l.__hard_subscription__, delete l.__own_event__, {
|
|
1263
|
+
kw: r,
|
|
1264
|
+
renamed_event: o
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
function wn(e, t, n, r, l, o) {
|
|
1268
|
+
let i = hl(t, l, "__config__", null), s = hl(t, l, "__global__", null), a = hl(t, l, "__local__", null), u = El(t, l, "__filter__", null), _ = !0;
|
|
1269
|
+
if (t && t !== ml(null, e, "publisher", null) && (_ = !1), o && o !== ml(null, e, "subscriber", null) && (_ = !1), n && n !== pl(null, e, "event", "") && (_ = !1), r && r !== pl(null, e, "renamed_event", "") && (_ = !1), Wr(i) > 0) {
|
|
1270
|
+
let t = hl(null, e, "__config__", null);
|
|
1271
|
+
Wr(t) > 0 && jr(t, i) || (_ = !1);
|
|
1246
1272
|
}
|
|
1247
|
-
if (
|
|
1248
|
-
let t =
|
|
1249
|
-
|
|
1273
|
+
if (Wr(s) > 0) {
|
|
1274
|
+
let t = hl(null, e, "__global__", null);
|
|
1275
|
+
Wr(t) > 0 && jr(t, s) || (_ = !1);
|
|
1250
1276
|
}
|
|
1251
|
-
if (
|
|
1252
|
-
let t =
|
|
1253
|
-
|
|
1277
|
+
if (Wr(a) > 0) {
|
|
1278
|
+
let t = hl(null, e, "__local__", null);
|
|
1279
|
+
Wr(t) > 0 && jr(t, a) || (_ = !1);
|
|
1254
1280
|
}
|
|
1255
|
-
if (
|
|
1256
|
-
let t =
|
|
1257
|
-
|
|
1281
|
+
if (Wr(u) > 0) {
|
|
1282
|
+
let t = El(null, e, "__filter__", null);
|
|
1283
|
+
Wr(t) > 0 && jr(t, u) || (_ = !1);
|
|
1258
1284
|
}
|
|
1259
|
-
return
|
|
1285
|
+
return _;
|
|
1260
1286
|
}
|
|
1261
|
-
function
|
|
1262
|
-
let
|
|
1263
|
-
for (let
|
|
1264
|
-
let
|
|
1265
|
-
|
|
1287
|
+
function Rn(e, t, n, r, l, o) {
|
|
1288
|
+
let i = [];
|
|
1289
|
+
for (let s = 0; s < e.length; s++) {
|
|
1290
|
+
let a = e[s];
|
|
1291
|
+
wn(a, t, n, r, l, o) && Ur(i, a);
|
|
1266
1292
|
}
|
|
1267
|
-
return
|
|
1268
|
-
}
|
|
1269
|
-
function Rn(e, t, n, r, l) {
|
|
1270
|
-
for (let o = 0; o < e.length; o++) if (On(e[o], t, n, r, l)) return o;
|
|
1271
|
-
return -1;
|
|
1272
|
-
}
|
|
1273
|
-
function jn(e, n, r, l) {
|
|
1274
|
-
let o = el(e, n, "publisher", null, Pn.KW_REQUIRED), i = el(e, n, "subscriber", null, Pn.KW_REQUIRED), s = Zr(e, n, "event", "", Pn.KW_REQUIRED);
|
|
1275
|
-
if (!!(zr(e, n, "subs_flag", null, Pn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1276
|
-
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag & U.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1277
|
-
let a = Rn(o.dl_subscriptions, o, s, n, i);
|
|
1278
|
-
return a >= 0 ? yr(o.dl_subscriptions, a) : (rr(`${Dt(e)}: subscription in publisher not found`), ar(n)), a = Rn(i.dl_subscribings, o, s, n, i), a >= 0 ? yr(i.dl_subscribings, a) : (rr(`${Dt(e)}: subscription in subscriber not found`), ar(n)), 0;
|
|
1293
|
+
return i;
|
|
1279
1294
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1282
|
-
|
|
1295
|
+
function jn(e, t) {
|
|
1296
|
+
return e.indexOf(t);
|
|
1297
|
+
}
|
|
1298
|
+
function Dn(e, n, r, l) {
|
|
1299
|
+
let o = ml(e, n, "publisher", null, Vn.KW_REQUIRED), i = ml(e, n, "subscriber", null, Vn.KW_REQUIRED), s = pl(e, n, "event", "", Vn.KW_REQUIRED);
|
|
1300
|
+
if (!!(dl(e, n, "subs_flag", null, Vn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1301
|
+
let a = ne(i) || ne(o);
|
|
1302
|
+
if (jn(o.dl_subscriptions, n) < 0) return a && Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", s || "", Dt(o), Dt(i))), 1;
|
|
1303
|
+
a && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), _r(n)), o.obflag & U.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1304
|
+
let u = jn(o.dl_subscriptions, n);
|
|
1305
|
+
return u >= 0 ? Fr(o.dl_subscriptions, u) : (or(`${Dt(e)}: subscription in publisher not found`), _r(n)), u = jn(i.dl_subscribings, n), u >= 0 ? Fr(i.dl_subscribings, u) : (or(`${Dt(e)}: subscription in subscriber not found`), _r(n)), 0;
|
|
1306
|
+
}
|
|
1307
|
+
function $n(e, n, r, l) {
|
|
1308
|
+
if (null == r && (r = {}), !e) return or(`publisher NULL: ev ${n}`), 0;
|
|
1309
|
+
if (!l) return or(`subscriber NULL: ev ${n}`), 0;
|
|
1283
1310
|
const o = /* @__PURE__ */ new Set([
|
|
1284
1311
|
"__config__",
|
|
1285
1312
|
"__global__",
|
|
@@ -1288,42 +1315,57 @@ function wn(e, n, r, l) {
|
|
|
1288
1315
|
"__service__"
|
|
1289
1316
|
]);
|
|
1290
1317
|
if (Object.keys(r).forEach((t) => {
|
|
1291
|
-
o.has(t) ||
|
|
1292
|
-
}),
|
|
1293
|
-
else if (!(bn(e, n, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1294
|
-
let i = Nn(e.dl_subscriptions, e, n,
|
|
1295
|
-
|
|
1296
|
-
|
|
1318
|
+
o.has(t) || or(`${Dt(e)}: key ignored in subscription (key: ${t}, event: ${n})`);
|
|
1319
|
+
}), el(n)) n = "";
|
|
1320
|
+
else if (!(bn(e, n, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return or(`event NOT in output event list: ${Dt(e)}, ${n}`), 0;
|
|
1321
|
+
let i = Nn(r, n), s = Rn(e.dl_subscriptions, e, n, i.renamed_event, i.kw, l), a = null;
|
|
1322
|
+
for (let t = 0; t < s.length; t++) if (dl(e, s[t], "subs_flag", 0, Vn.KW_REQUIRED) & vn.__hard_subscription__) {
|
|
1323
|
+
a = s[t];
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
if (a) return ir(`${Dt(e)}: Hard subscription REPEATED, the one there is kept and returned (event: ${n}, subscriber: ${Dt(l)})`), a;
|
|
1327
|
+
Mr(s) > 0 && (or(`${Dt(e)}: ${Mr(s)} subscription(s) REPEATED, will be deleted and override`), _r(s, "subscription REPEATED"), In(e, s, !1));
|
|
1328
|
+
let u = function(e, t, n, r) {
|
|
1297
1329
|
let l = Ne(e, Sn);
|
|
1298
|
-
|
|
1330
|
+
Lr(l, "event", t), Lr(l, "subscriber", r), Lr(l, "publisher", e);
|
|
1299
1331
|
let o = 0;
|
|
1300
1332
|
if (n) {
|
|
1301
|
-
let
|
|
1302
|
-
if (
|
|
1303
|
-
let n =
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1333
|
+
let r = hl(e, n, "__config__", null), i = hl(e, n, "__global__", null), s = hl(e, n, "__local__", null), a = El(e, n, "__filter__", null), u = pl(e, n, "__service__", "");
|
|
1334
|
+
if (Wr(i) > 0 && Lr(l, "__global__", wr(i)), Wr(r) > 0) {
|
|
1335
|
+
let n = wr(r);
|
|
1336
|
+
Lr(l, "__config__", n);
|
|
1337
|
+
let i = pl(e, n, "__rename_event_name__", "");
|
|
1338
|
+
if (!el(i)) {
|
|
1339
|
+
let r = On(i);
|
|
1340
|
+
if (r) {
|
|
1341
|
+
Lr(l, "renamed_event", r.event_name), delete n.__rename_event_name__, o |= vn.__rename_event_name__;
|
|
1342
|
+
let i = hl(e, l, "__global__", null);
|
|
1343
|
+
Kr(i) || (i = {}, Lr(l, "__global__", i)), i.__original_event_name__ = t;
|
|
1344
|
+
} else or(`${Dt(e)}: EVENT NOT FOUND (__rename_event_name__: ${i})`);
|
|
1345
|
+
}
|
|
1346
|
+
if (_l(n, "__hard_subscription__")) {
|
|
1347
|
+
let t = gl(e, n, "__hard_subscription__", !1);
|
|
1348
|
+
kr(n, "__hard_subscription__"), t && (o |= vn.__hard_subscription__);
|
|
1307
1349
|
}
|
|
1308
|
-
if (
|
|
1309
|
-
let t =
|
|
1310
|
-
|
|
1350
|
+
if (_l(n, "__own_event__")) {
|
|
1351
|
+
let t = gl(e, n, "__own_event__", !1);
|
|
1352
|
+
kr(n, "__own_event__"), t && (o |= vn.__own_event__);
|
|
1311
1353
|
}
|
|
1312
1354
|
}
|
|
1313
|
-
|
|
1355
|
+
Wr(s) > 0 && Lr(l, "__local__", wr(s)), Wr(a) > 0 && Lr(l, "__filter__", wr(a)), el(u) || Lr(l, "__service__", u);
|
|
1314
1356
|
}
|
|
1315
|
-
return
|
|
1357
|
+
return Lr(l, "subs_flag", o), l;
|
|
1316
1358
|
}(e, n, r, l);
|
|
1317
|
-
if (!
|
|
1318
|
-
if (
|
|
1319
|
-
let t = e.gclass.gmt.mt_subscription_added(e,
|
|
1320
|
-
(t < 0 || !1 === t) && (
|
|
1359
|
+
if (!u) return or(`${Dt(e)}: _create_subscription() FAILED`), 0;
|
|
1360
|
+
if (Ur(e.dl_subscriptions, u), Ur(l.dl_subscribings, u), (ne(l) || ne(e)) && (Y(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Dt(e), Dt(l))), r && (le(l) || le(e)) && Nr(r)), e.gclass.gmt.mt_subscription_added) {
|
|
1361
|
+
let t = e.gclass.gmt.mt_subscription_added(e, u);
|
|
1362
|
+
(t < 0 || !1 === t) && (Dn(e, u, !0, !0), u = 0);
|
|
1321
1363
|
}
|
|
1322
|
-
return
|
|
1364
|
+
return u;
|
|
1323
1365
|
}
|
|
1324
|
-
function
|
|
1325
|
-
if (null == n && (n = {}), !e) return
|
|
1326
|
-
if (!r) return
|
|
1366
|
+
function An(e, t, n, r) {
|
|
1367
|
+
if (null == n && (n = {}), !e) return or(`publisher NULL: ev ${t}`), 0;
|
|
1368
|
+
if (!r) return or(`subscriber NULL: ev ${t}`), 0;
|
|
1327
1369
|
const l = /* @__PURE__ */ new Set([
|
|
1328
1370
|
"__config__",
|
|
1329
1371
|
"__global__",
|
|
@@ -1332,52 +1374,52 @@ function Dn(e, t, n, r) {
|
|
|
1332
1374
|
"__service__"
|
|
1333
1375
|
]);
|
|
1334
1376
|
if (Object.keys(n).forEach((n) => {
|
|
1335
|
-
l.has(n) ||
|
|
1336
|
-
}),
|
|
1337
|
-
else if (!(bn(e, t, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1338
|
-
let o = Nn(e.dl_subscriptions, e, t,
|
|
1339
|
-
for (let t = 0; t <
|
|
1340
|
-
let n =
|
|
1341
|
-
|
|
1342
|
-
}
|
|
1343
|
-
return
|
|
1344
|
-
}
|
|
1345
|
-
function $n(e, t, n) {
|
|
1346
|
-
let r = [...t];
|
|
1347
|
-
for (let t = 0; t < r.length; t++) jn(e, r[t], n, !1);
|
|
1348
|
-
return 0;
|
|
1377
|
+
l.has(n) || or(`${Dt(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1378
|
+
}), el(t)) t = "";
|
|
1379
|
+
else if (!(bn(e, t, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return or(`event NOT in output event list: ${Dt(e)}, ev ${t}`), 0;
|
|
1380
|
+
let o = Nn(n, t), i = Rn(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), s = 0, a = 0, u = 0;
|
|
1381
|
+
for (let t = 0; t < i.length; t++) {
|
|
1382
|
+
let n = i[t], r = Dn(e, n, !1, !1);
|
|
1383
|
+
0 === r ? s++ : r < 0 ? a++ : u++;
|
|
1384
|
+
}
|
|
1385
|
+
return a ? ir(`${Dt(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${a})`) : s || u || (ir(`${Dt(e)}: No subscription found`), Nr(n, "No subscription found")), 0;
|
|
1349
1386
|
}
|
|
1350
|
-
function
|
|
1351
|
-
|
|
1387
|
+
function In(e, t, n) {
|
|
1388
|
+
let r = [...t], l = 0;
|
|
1389
|
+
for (let t = 0; t < r.length; t++) Dn(e, r[t], n, !1) > 0 && l++;
|
|
1390
|
+
return l && ir(`${Dt(e)}: Subscription(s) already removed, nothing to remove (count: ${l})`), 0;
|
|
1352
1391
|
}
|
|
1353
|
-
function
|
|
1354
|
-
|
|
1392
|
+
function kn(e, t, n, r) {
|
|
1393
|
+
return null == n && (n = {}), Rn(e.dl_subscriptions, e, t, null, n, r);
|
|
1394
|
+
}
|
|
1395
|
+
function Cn(e) {
|
|
1396
|
+
let t = kn(e, null, null, null);
|
|
1355
1397
|
for (let n = 0; n < t.length; n++) {
|
|
1356
|
-
let r = t[n], l =
|
|
1357
|
-
|
|
1398
|
+
let r = t[n], l = ml(e, r, "publisher", null, Vn.KW_REQUIRED), o = ml(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1399
|
+
Lr(r, "s_event", pl(e, r, "event", "", Vn.KW_REQUIRED)), Lr(r, "s_publisher", Dt(l)), Lr(r, "s_subscriber", Dt(o));
|
|
1358
1400
|
}
|
|
1359
|
-
let n =
|
|
1401
|
+
let n = Ln(e, 0, null, 0);
|
|
1360
1402
|
for (let t = 0; t < n.length; t++) {
|
|
1361
|
-
let r = n[t], l =
|
|
1362
|
-
|
|
1403
|
+
let r = n[t], l = ml(e, r, "publisher", null, Vn.KW_REQUIRED), o = ml(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1404
|
+
Lr(r, "s_event", pl(e, r, "event", "", Vn.KW_REQUIRED)), Lr(r, "s_publisher", Dt(l)), Lr(r, "s_subscriber", Dt(o));
|
|
1363
1405
|
}
|
|
1364
1406
|
return {
|
|
1365
1407
|
subscriptions: t,
|
|
1366
1408
|
subscribings: n,
|
|
1367
|
-
"total subscriptions":
|
|
1368
|
-
total_subscribings:
|
|
1409
|
+
"total subscriptions": Mr(t),
|
|
1410
|
+
total_subscribings: Mr(n)
|
|
1369
1411
|
};
|
|
1370
1412
|
}
|
|
1371
|
-
function
|
|
1372
|
-
return
|
|
1413
|
+
function Ln(e, t, n, r) {
|
|
1414
|
+
return Rn(e.dl_subscribings, r, t, null, n, e);
|
|
1373
1415
|
}
|
|
1374
|
-
function
|
|
1375
|
-
if (
|
|
1376
|
-
if (
|
|
1416
|
+
function Un(e, n, r) {
|
|
1417
|
+
if (Kr(r) || (r = {}), !e || e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return or("gobj NULL or DESTROYED"), -1;
|
|
1418
|
+
if (el(n)) return or(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1419
|
let l = gn(e, n, !0);
|
|
1378
|
-
if (!(l && l.event_flag & (P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1420
|
+
if (!(l && l.event_flag & (P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return or(`event NOT in output event list: ${Dt(e)}, ev ${n}`), -1;
|
|
1379
1421
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1380
|
-
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!",
|
|
1422
|
+
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", jt(e), Rt(e), e.current_state.state_name, "", n || "", "")), le(e) && Gr(r) && Nr(r)), e.gclass.gmt.mt_publish_event) {
|
|
1381
1423
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
1382
1424
|
if (t <= 0) return t;
|
|
1383
1425
|
}
|
|
@@ -1389,37 +1431,44 @@ function Cn(e, n, r) {
|
|
|
1389
1431
|
if (t < 0) break;
|
|
1390
1432
|
if (!t) continue;
|
|
1391
1433
|
}
|
|
1392
|
-
let _ =
|
|
1434
|
+
let _ = ml(e, u, "subscriber", null, Vn.KW_REQUIRED);
|
|
1393
1435
|
if (!_ || Ct(_)) continue;
|
|
1394
|
-
let c =
|
|
1395
|
-
if (
|
|
1396
|
-
|
|
1397
|
-
let l =
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
if (
|
|
1402
|
-
let b =
|
|
1403
|
-
|
|
1404
|
-
let p =
|
|
1405
|
-
|
|
1436
|
+
let c = dl(e, u, "subs_flag", 0, Vn.KW_REQUIRED), f = pl(e, u, "event", "", Vn.KW_REQUIRED);
|
|
1437
|
+
if (el(f) || 0 === ll(f, n)) {
|
|
1438
|
+
hl(e, u, "__config__", null, 0);
|
|
1439
|
+
let l = hl(e, u, "__global__", null, 0), i = hl(e, u, "__local__", null, 0), f = El(e, u, "__filter__", null, 0), g = u.renamed_event;
|
|
1440
|
+
el(g) && (g = n);
|
|
1441
|
+
let d = 1;
|
|
1442
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) : Wr(f) > 0 && (d = Sl(r, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Dt(_), Dt(e))), _r(f))), d < 0) break;
|
|
1443
|
+
if (!d) continue;
|
|
1444
|
+
let b = gn(_, n, !0);
|
|
1445
|
+
if (b && b.event_flag & P.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1446
|
+
let p = r;
|
|
1447
|
+
(Wr(i) > 0 || Wr(l) > 0) && (p = Object.assign({}, r)), Wr(i) > 0 && ul(p, i), Wr(l) > 0 && Dr(p, wr(l)), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", g || "", _.running ? "" : "!!", Dt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", _.running ? "" : "!!", Dt(_), cn(_), n || "", g || "", e && !e.running ? "!!" : "", Dt(e))), le(e) && Gr(p) && Nr(p));
|
|
1448
|
+
let m = yn(_, g, p, e);
|
|
1449
|
+
if (m < 0 && c & vn.__own_event__) {
|
|
1406
1450
|
s = -1;
|
|
1407
1451
|
break;
|
|
1408
1452
|
}
|
|
1409
|
-
if (a +=
|
|
1453
|
+
if (a += m, s++, Ct(e)) break;
|
|
1410
1454
|
}
|
|
1411
1455
|
}
|
|
1412
|
-
return s || l && l.event_flag & P.EVF_NO_WARN_SUBS ||
|
|
1456
|
+
return s || l && l.event_flag & P.EVF_NO_WARN_SUBS || ir(`${Dt(e)}: Publish event WITHOUT subscribers, ev ${n}`), a;
|
|
1413
1457
|
}
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1458
|
+
function Pn(e, n, r, l) {
|
|
1459
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), -1;
|
|
1460
|
+
if (function(e) {
|
|
1416
1461
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1417
|
-
}(e) || oe(e, null) && !ie(l, null))
|
|
1462
|
+
}(e) || oe(e, null) && !ie(l, null)) {
|
|
1463
|
+
let o = Er(n);
|
|
1464
|
+
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", Dt(e), null !== o ? o : n, Dt(l))), le(e) && Nr(r);
|
|
1465
|
+
}
|
|
1466
|
+
return e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, n, r, l) : e.gclass.command_table ? g ? g(e, n, r, l) : o(0, -1, t("%s: global command parser not available", Dt(e)), 0, 0) : o(0, -1, t("%s: command table not available", Dt(e)), 0, 0);
|
|
1418
1467
|
}
|
|
1419
|
-
function
|
|
1420
|
-
return Ct(e) ? (
|
|
1468
|
+
function Fn(e, n, r, l) {
|
|
1469
|
+
return Ct(e) ? (or("gobj NULL or DESTROYED"), -1) : e.gclass.gmt.mt_stats ? e.gclass.gmt.mt_stats(e, n, r, l) : d ? d(e, n, r, l) : s(0, -1, t("%s, stats parser not available", Dt(e)), 0, 0);
|
|
1421
1470
|
}
|
|
1422
|
-
var
|
|
1471
|
+
var Vn = Object.freeze({
|
|
1423
1472
|
KW_REQUIRED: 1,
|
|
1424
1473
|
KW_CREATE: 2,
|
|
1425
1474
|
KW_WILD_NUMBER: 4,
|
|
@@ -1439,68 +1488,68 @@ Object.freeze({
|
|
|
1439
1488
|
JSON_FALSE: 7,
|
|
1440
1489
|
JSON_NULL: 8
|
|
1441
1490
|
});
|
|
1442
|
-
var
|
|
1443
|
-
function
|
|
1444
|
-
if ((e = "function" == typeof e ? e : null) && e !==
|
|
1445
|
-
|
|
1446
|
-
for (const [e, t, n] of
|
|
1491
|
+
var Gn = "undefined" != typeof window ? window.console : console, Mn = Gn.error, Wn = Gn.warn, xn = Gn.info, Kn = Gn.debug, Yn = null, Bn = 600, Jn = [];
|
|
1492
|
+
function Hn(e) {
|
|
1493
|
+
if ((e = "function" == typeof e ? e : null) && e !== Yn) {
|
|
1494
|
+
Yn = e;
|
|
1495
|
+
for (const [e, t, n] of Jn.slice()) {
|
|
1447
1496
|
let r = t;
|
|
1448
1497
|
if ("json" === e) try {
|
|
1449
1498
|
r = JSON.parse(t);
|
|
1450
1499
|
} catch (e) {
|
|
1451
1500
|
r = t;
|
|
1452
1501
|
}
|
|
1453
|
-
|
|
1502
|
+
nr(e, r, n);
|
|
1454
1503
|
}
|
|
1455
|
-
} else
|
|
1456
|
-
}
|
|
1457
|
-
var Jn = !0;
|
|
1458
|
-
function qn(e) {
|
|
1459
|
-
Jn = !!e;
|
|
1504
|
+
} else Yn = e;
|
|
1460
1505
|
}
|
|
1461
|
-
var
|
|
1506
|
+
var qn = !0;
|
|
1462
1507
|
function Qn(e) {
|
|
1463
|
-
|
|
1508
|
+
qn = !!e;
|
|
1509
|
+
}
|
|
1510
|
+
var zn = null;
|
|
1511
|
+
function Xn(e) {
|
|
1512
|
+
zn = "function" == typeof e ? e : null;
|
|
1464
1513
|
}
|
|
1465
|
-
function
|
|
1466
|
-
if (!
|
|
1467
|
-
if (!
|
|
1514
|
+
function Zn(e, t) {
|
|
1515
|
+
if (!qn) return !1;
|
|
1516
|
+
if (!zn) return !0;
|
|
1468
1517
|
try {
|
|
1469
|
-
return !!
|
|
1518
|
+
return !!zn(e, t);
|
|
1470
1519
|
} catch (e) {
|
|
1471
1520
|
return !0;
|
|
1472
1521
|
}
|
|
1473
1522
|
}
|
|
1474
|
-
var
|
|
1475
|
-
function
|
|
1476
|
-
|
|
1523
|
+
var er = !1;
|
|
1524
|
+
function tr(e, t, n) {
|
|
1525
|
+
er || (function(e, t, n) {
|
|
1477
1526
|
let r = t;
|
|
1478
1527
|
if ("json" === e) try {
|
|
1479
1528
|
r = JSON.stringify(t);
|
|
1480
1529
|
} catch (e) {
|
|
1481
1530
|
r = String(t);
|
|
1482
1531
|
}
|
|
1483
|
-
|
|
1532
|
+
Jn.push([
|
|
1484
1533
|
e,
|
|
1485
1534
|
r,
|
|
1486
1535
|
n
|
|
1487
|
-
]),
|
|
1488
|
-
}(e, t, n),
|
|
1536
|
+
]), Jn.length > Bn && Jn.shift();
|
|
1537
|
+
}(e, t, n), nr(e, t, n));
|
|
1489
1538
|
}
|
|
1490
|
-
function
|
|
1491
|
-
if (
|
|
1492
|
-
|
|
1539
|
+
function nr(e, t, n) {
|
|
1540
|
+
if (Yn && !er) {
|
|
1541
|
+
er = !0;
|
|
1493
1542
|
try {
|
|
1494
|
-
|
|
1543
|
+
Yn(e, t, n);
|
|
1495
1544
|
} catch (e) {} finally {
|
|
1496
|
-
|
|
1545
|
+
er = !1;
|
|
1497
1546
|
}
|
|
1498
1547
|
}
|
|
1499
1548
|
}
|
|
1500
|
-
function
|
|
1501
|
-
e ? (
|
|
1549
|
+
function rr(e) {
|
|
1550
|
+
e ? (Mn = e, Wn = e) : (Mn = Gn.error, Wn = Gn.warn);
|
|
1502
1551
|
}
|
|
1503
|
-
function
|
|
1552
|
+
function lr(e) {
|
|
1504
1553
|
const t = Array.prototype.slice.call(arguments);
|
|
1505
1554
|
let n = "";
|
|
1506
1555
|
if ("string" == typeof e) {
|
|
@@ -1522,33 +1571,203 @@ function nr(e) {
|
|
|
1522
1571
|
} else n = t.map((e) => "object" == typeof e ? JSON.stringify(e) : String(e)).join(" ");
|
|
1523
1572
|
return n;
|
|
1524
1573
|
}
|
|
1525
|
-
function rr(e) {
|
|
1526
|
-
let t = nr(e), n = eo();
|
|
1527
|
-
Gn && (Gn === Fn.error ? zn("error", t) && Gn("%c" + n + " ERROR: " + String(t), "color:red") : (zn("error", t) && Fn.error("%c" + n + " ERROR: " + String(t), "color:red"), Gn(`${n} ERROR: ${String(t)}`))), Zn("error", t, n);
|
|
1528
|
-
}
|
|
1529
|
-
function lr(e) {
|
|
1530
|
-
let t = nr(e), n = eo();
|
|
1531
|
-
Vn && (Vn === Fn.warn ? zn("warning", t) && Vn("%c" + n + " WARNING: " + String(t), "color:yellow") : (zn("warning", t) && Fn.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Vn(`${n} WARNING: ${String(t)}`))), Zn("warning", t, n);
|
|
1532
|
-
}
|
|
1533
1574
|
function or(e) {
|
|
1534
|
-
let t =
|
|
1535
|
-
Mn &&
|
|
1575
|
+
let t = lr(e), n = ho();
|
|
1576
|
+
Mn && (Mn === Gn.error ? Zn("error", t) && Mn("%c" + n + " ERROR: " + String(t), "color:red") : (Zn("error", t) && Gn.error("%c" + n + " ERROR: " + String(t), "color:red"), Mn(`${n} ERROR: ${String(t)}`))), tr("error", t, n);
|
|
1536
1577
|
}
|
|
1537
1578
|
function ir(e) {
|
|
1538
|
-
let t =
|
|
1539
|
-
Wn &&
|
|
1579
|
+
let t = lr(e), n = ho();
|
|
1580
|
+
Wn && (Wn === Gn.warn ? Zn("warning", t) && Wn("%c" + n + " WARNING: " + String(t), "color:yellow") : (Zn("warning", t) && Gn.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Wn(`${n} WARNING: ${String(t)}`))), tr("warning", t, n);
|
|
1540
1581
|
}
|
|
1541
1582
|
function sr(e) {
|
|
1542
|
-
let t =
|
|
1543
|
-
|
|
1583
|
+
let t = lr(e), n = ho();
|
|
1584
|
+
xn && Zn("info", t) && xn("%c" + n + " INFO: " + String(t), "color:cyan"), tr("info", t, n);
|
|
1544
1585
|
}
|
|
1545
|
-
function ar(e
|
|
1546
|
-
|
|
1586
|
+
function ar(e) {
|
|
1587
|
+
let t = lr(e), n = ho();
|
|
1588
|
+
Kn && Zn("debug", t) && Kn("%c" + n + " DEBUG: " + String(t), "color:silver"), tr("debug", t, n);
|
|
1547
1589
|
}
|
|
1548
1590
|
function ur(e) {
|
|
1591
|
+
let t = lr(e), n = ho();
|
|
1592
|
+
Kn && Zn("msg", t) && Kn("%c" + n + " MSG: " + String(t), "color:cyan"), tr("msg", t, n);
|
|
1593
|
+
}
|
|
1594
|
+
function _r(e, t) {
|
|
1595
|
+
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e, ho());
|
|
1596
|
+
}
|
|
1597
|
+
var cr = [
|
|
1598
|
+
"passw",
|
|
1599
|
+
"pwd",
|
|
1600
|
+
"passphrase",
|
|
1601
|
+
"secret",
|
|
1602
|
+
"token",
|
|
1603
|
+
"jwt",
|
|
1604
|
+
"bearer",
|
|
1605
|
+
"authorization",
|
|
1606
|
+
"cookie",
|
|
1607
|
+
"credential",
|
|
1608
|
+
"salt"
|
|
1609
|
+
], fr = [
|
|
1610
|
+
"apikey",
|
|
1611
|
+
"sessionid",
|
|
1612
|
+
"sessionkey",
|
|
1613
|
+
"authdata"
|
|
1614
|
+
], gr = /* @__PURE__ */ new Set([
|
|
1615
|
+
"endpoint",
|
|
1616
|
+
"url",
|
|
1617
|
+
"uri",
|
|
1618
|
+
"domain",
|
|
1619
|
+
"path",
|
|
1620
|
+
"file",
|
|
1621
|
+
"public",
|
|
1622
|
+
"pub",
|
|
1623
|
+
"count",
|
|
1624
|
+
"counts",
|
|
1625
|
+
"type",
|
|
1626
|
+
"name",
|
|
1627
|
+
"len",
|
|
1628
|
+
"length",
|
|
1629
|
+
"size",
|
|
1630
|
+
"max",
|
|
1631
|
+
"min",
|
|
1632
|
+
"ttl",
|
|
1633
|
+
"timeout",
|
|
1634
|
+
"expiry",
|
|
1635
|
+
"expires",
|
|
1636
|
+
"mode"
|
|
1637
|
+
]);
|
|
1638
|
+
function dr(e) {
|
|
1639
|
+
if ("string" != typeof e || e.length < 3) return !1;
|
|
1640
|
+
let t = e.toLowerCase(), n = !1;
|
|
1641
|
+
for (const e of cr) if (t.indexOf(e) >= 0) {
|
|
1642
|
+
n = !0;
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
if (!n) {
|
|
1646
|
+
let e = t.replace(/[_\-. \t]/g, "");
|
|
1647
|
+
for (const t of fr) if (e.indexOf(t) >= 0) {
|
|
1648
|
+
n = !0;
|
|
1649
|
+
break;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
if (n || (n = t.indexOf("priv") >= 0 && t.indexOf("key") >= 0), !n) return !1;
|
|
1653
|
+
for (const e of t.split(/[_\-. \t]/)) if (gr.has(e)) return !1;
|
|
1654
|
+
return !0;
|
|
1655
|
+
}
|
|
1656
|
+
function br(e, t, n) {
|
|
1657
|
+
const r = (e) => " " === e || " " === e, l = (t) => n && e[t] === n && (t + 1 >= e.length || r(e[t + 1]));
|
|
1658
|
+
let o = t;
|
|
1659
|
+
for (;;) {
|
|
1660
|
+
for (; o < e.length && !r(e[o]);) {
|
|
1661
|
+
if (l(o)) return o;
|
|
1662
|
+
o++;
|
|
1663
|
+
}
|
|
1664
|
+
if (o >= e.length) return o;
|
|
1665
|
+
let t = o;
|
|
1666
|
+
for (; t < e.length && r(e[t]);) t++;
|
|
1667
|
+
if (t >= e.length || l(t)) return o;
|
|
1668
|
+
for (let n = t; n < e.length && !r(e[n]) && !l(n); n++) if ("=" === e[n] && n > t) return o;
|
|
1669
|
+
o = t;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
var pr = 128, mr = 4194304, hr = "<not shown: too large to mask>";
|
|
1673
|
+
function Er(e) {
|
|
1674
|
+
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1675
|
+
if (e.length > mr) return hr;
|
|
1676
|
+
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
1677
|
+
for (; null !== (t = r.exec(e));) dr(t[2].slice(-128)) && (n = !0);
|
|
1678
|
+
let l = [], o = 0, i = !1, s = "", a = 0, u = 0;
|
|
1679
|
+
const _ = (t) => t >= e.length || " " === e[t] || " " === e[t];
|
|
1680
|
+
for (; u < e.length;) {
|
|
1681
|
+
let t = e[u];
|
|
1682
|
+
if (" " === t || " " === t) {
|
|
1683
|
+
u++, a = u;
|
|
1684
|
+
continue;
|
|
1685
|
+
}
|
|
1686
|
+
if ("\"" !== t && "'" !== t || (s || 0 !== u && " " !== e[u - 1] && " " !== e[u - 1] && "=" !== e[u - 1] ? t === s && _(u + 1) && (s = "") : s = t), "=" !== t) {
|
|
1687
|
+
u++;
|
|
1688
|
+
continue;
|
|
1689
|
+
}
|
|
1690
|
+
let r = e.substring(Math.max(a, u - pr), u);
|
|
1691
|
+
if (a = u + 1, !(dr(r) || n && "value" === r.toLowerCase())) {
|
|
1692
|
+
u++;
|
|
1693
|
+
continue;
|
|
1694
|
+
}
|
|
1695
|
+
u++;
|
|
1696
|
+
let c, f = "\"" === e[u] || "'" === e[u] ? e[u] : "";
|
|
1697
|
+
if (f) {
|
|
1698
|
+
for (c = u + 1; c < e.length && e[c] !== f;) c++;
|
|
1699
|
+
e[c] === f && c++;
|
|
1700
|
+
} else c = br(e, u, s);
|
|
1701
|
+
c > u && (l.push(e.substring(o, u)), l.push("********"), o = c, i = !0), u = c, a = u;
|
|
1702
|
+
}
|
|
1703
|
+
return i ? (l.push(e.substring(o)), l.join("")) : null;
|
|
1704
|
+
}
|
|
1705
|
+
var Tr = 64, yr = "<not shown: the masking failed>";
|
|
1706
|
+
var vr = Symbol("mask-in-progress");
|
|
1707
|
+
function Or(e, t, n, r) {
|
|
1708
|
+
if ("string" == typeof e) {
|
|
1709
|
+
if (e.length > r.left) return r.left = 0, hr;
|
|
1710
|
+
r.left -= e.length;
|
|
1711
|
+
let t = Er(e);
|
|
1712
|
+
return null !== t ? t : e;
|
|
1713
|
+
}
|
|
1714
|
+
let l = Array.isArray(e);
|
|
1715
|
+
if (!l && !function(e) {
|
|
1716
|
+
if (null === e || "object" != typeof e) return !1;
|
|
1717
|
+
let t = Object.getPrototypeOf(e);
|
|
1718
|
+
return t === Object.prototype || null === t;
|
|
1719
|
+
}(e)) return e;
|
|
1720
|
+
if (r.left <= 0) return hr;
|
|
1721
|
+
if (t.has(e)) {
|
|
1722
|
+
let n = t.get(e);
|
|
1723
|
+
return n === vr ? "<cycle>" : n;
|
|
1724
|
+
}
|
|
1725
|
+
if (n >= Tr) return "<deeper not shown>";
|
|
1726
|
+
r.left -= 1, t.set(e, vr);
|
|
1727
|
+
let o, i = !1, s = !1;
|
|
1728
|
+
if (l) {
|
|
1729
|
+
o = [];
|
|
1730
|
+
for (let l = 0; l < e.length; l++) {
|
|
1731
|
+
if (r.left <= 0) {
|
|
1732
|
+
s = !0;
|
|
1733
|
+
break;
|
|
1734
|
+
}
|
|
1735
|
+
r.left -= 1;
|
|
1736
|
+
let a = Or(e[l], t, n + 1, r);
|
|
1737
|
+
a !== e[l] && (i = !0), o.push(a);
|
|
1738
|
+
}
|
|
1739
|
+
s && o.push(hr);
|
|
1740
|
+
} else {
|
|
1741
|
+
o = Object.create(Object.getPrototypeOf(e));
|
|
1742
|
+
let l = "string" == typeof e.attribute && dr(e.attribute.slice(-128));
|
|
1743
|
+
for (const a in e) {
|
|
1744
|
+
if (!Object.prototype.hasOwnProperty.call(e, a)) continue;
|
|
1745
|
+
if (r.left <= 0) {
|
|
1746
|
+
s = !0;
|
|
1747
|
+
break;
|
|
1748
|
+
}
|
|
1749
|
+
r.left -= 1 + a.length;
|
|
1750
|
+
let u, _ = e[a];
|
|
1751
|
+
u = (dr(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" : Or(_, t, n + 1, r), u !== _ && (i = !0), o[a] = u;
|
|
1752
|
+
}
|
|
1753
|
+
s && (o["<more>"] = hr);
|
|
1754
|
+
}
|
|
1755
|
+
return i || s || (o = e), t.set(e, o), o;
|
|
1756
|
+
}
|
|
1757
|
+
function Sr(e) {
|
|
1758
|
+
try {
|
|
1759
|
+
return Or(e, /* @__PURE__ */ new WeakMap(), 0, { left: mr });
|
|
1760
|
+
} catch (e) {
|
|
1761
|
+
return yr;
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
function Nr(e, t) {
|
|
1765
|
+
_r(Sr(e), t);
|
|
1766
|
+
}
|
|
1767
|
+
function wr(e) {
|
|
1549
1768
|
return structuredClone(e);
|
|
1550
1769
|
}
|
|
1551
|
-
function
|
|
1770
|
+
function Rr(...e) {
|
|
1552
1771
|
const t = {};
|
|
1553
1772
|
for (const n of e) {
|
|
1554
1773
|
const e = structuredClone(n);
|
|
@@ -1556,14 +1775,14 @@ function _r(...e) {
|
|
|
1556
1775
|
}
|
|
1557
1776
|
return t;
|
|
1558
1777
|
}
|
|
1559
|
-
function
|
|
1778
|
+
function jr(e, t) {
|
|
1560
1779
|
if (e === t) return !0;
|
|
1561
1780
|
if (null === e || null === t) return e === t;
|
|
1562
1781
|
if (typeof e != typeof t) return !1;
|
|
1563
1782
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1564
1783
|
if (Array.isArray(e)) {
|
|
1565
1784
|
if (e.length !== t.length) return !1;
|
|
1566
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
1785
|
+
for (let n = 0; n < e.length; n++) if (!jr(e[n], t[n])) return !1;
|
|
1567
1786
|
return !0;
|
|
1568
1787
|
}
|
|
1569
1788
|
if ("object" == typeof e) {
|
|
@@ -1571,297 +1790,297 @@ function cr(e, t) {
|
|
|
1571
1790
|
if (n.length !== r.length) return !1;
|
|
1572
1791
|
for (let l = 0; l < n.length; l++) {
|
|
1573
1792
|
if (n[l] !== r[l]) return !1;
|
|
1574
|
-
if (!
|
|
1793
|
+
if (!jr(e[n[l]], t[r[l]])) return !1;
|
|
1575
1794
|
}
|
|
1576
1795
|
return !0;
|
|
1577
1796
|
}
|
|
1578
1797
|
return e === t;
|
|
1579
1798
|
}
|
|
1580
|
-
function
|
|
1799
|
+
function Dr(e, t) {
|
|
1581
1800
|
if (!t) return e;
|
|
1582
1801
|
for (let n of Object.keys(t)) e[n] = t[n];
|
|
1583
1802
|
return e;
|
|
1584
1803
|
}
|
|
1585
|
-
function
|
|
1804
|
+
function $r(e, t) {
|
|
1586
1805
|
if (!t) return e;
|
|
1587
1806
|
for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1588
1807
|
return e;
|
|
1589
1808
|
}
|
|
1590
|
-
function
|
|
1809
|
+
function Ar(e, t) {
|
|
1591
1810
|
if (!t) return e;
|
|
1592
1811
|
for (let n in t) t.hasOwnProperty(n) && !e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1593
1812
|
return e;
|
|
1594
1813
|
}
|
|
1595
|
-
function
|
|
1814
|
+
function Ir(e, t) {
|
|
1596
1815
|
if (e && e.hasOwnProperty(t)) return e[t];
|
|
1597
1816
|
}
|
|
1598
|
-
function
|
|
1817
|
+
function kr(e, t) {
|
|
1599
1818
|
e && e.hasOwnProperty(t) && delete e[t];
|
|
1600
1819
|
}
|
|
1601
|
-
function
|
|
1820
|
+
function Cr(e, t, n) {
|
|
1602
1821
|
e[t] = n;
|
|
1603
1822
|
}
|
|
1604
|
-
function
|
|
1823
|
+
function Lr(e, t, n) {
|
|
1605
1824
|
e[t] = n;
|
|
1606
1825
|
}
|
|
1607
|
-
function
|
|
1826
|
+
function Ur(e, t) {
|
|
1608
1827
|
e.push(t);
|
|
1609
1828
|
}
|
|
1610
|
-
function
|
|
1829
|
+
function Pr(e, t) {
|
|
1611
1830
|
e.push(t);
|
|
1612
1831
|
}
|
|
1613
|
-
function
|
|
1832
|
+
function Fr(e, t) {
|
|
1614
1833
|
e.splice(t, 1);
|
|
1615
1834
|
}
|
|
1616
|
-
function
|
|
1835
|
+
function Vr(e, t) {
|
|
1617
1836
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1618
1837
|
}
|
|
1619
|
-
function
|
|
1620
|
-
return
|
|
1838
|
+
function Gr(e) {
|
|
1839
|
+
return Kr(e) ? Object.keys(e).length : 0;
|
|
1621
1840
|
}
|
|
1622
|
-
function
|
|
1623
|
-
return
|
|
1841
|
+
function Mr(e) {
|
|
1842
|
+
return Yr(e) ? e.length : 0;
|
|
1624
1843
|
}
|
|
1625
|
-
function
|
|
1626
|
-
return
|
|
1844
|
+
function Wr(e) {
|
|
1845
|
+
return Kr(e) ? Object.keys(e).length : Yr(e) ? e.length : Br(e) && e.length > 0 ? 1 : 0;
|
|
1627
1846
|
}
|
|
1628
|
-
function
|
|
1629
|
-
return 0 ===
|
|
1847
|
+
function xr(e) {
|
|
1848
|
+
return 0 === Wr(e);
|
|
1630
1849
|
}
|
|
1631
|
-
function
|
|
1850
|
+
function Kr(e) {
|
|
1632
1851
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1633
1852
|
}
|
|
1634
|
-
function
|
|
1853
|
+
function Yr(e) {
|
|
1635
1854
|
return Array.isArray(e);
|
|
1636
1855
|
}
|
|
1637
|
-
function
|
|
1856
|
+
function Br(e) {
|
|
1638
1857
|
return "string" == typeof e;
|
|
1639
1858
|
}
|
|
1640
|
-
function
|
|
1859
|
+
function Jr(e) {
|
|
1641
1860
|
return "number" == typeof e && Number.isFinite(e);
|
|
1642
1861
|
}
|
|
1643
|
-
function
|
|
1862
|
+
function Hr(e) {
|
|
1644
1863
|
return "boolean" == typeof e;
|
|
1645
1864
|
}
|
|
1646
|
-
function
|
|
1865
|
+
function qr(e) {
|
|
1647
1866
|
return null == e;
|
|
1648
1867
|
}
|
|
1649
|
-
function
|
|
1650
|
-
if (
|
|
1651
|
-
if (!
|
|
1868
|
+
function Qr(e) {
|
|
1869
|
+
if (Jr(e)) return !0;
|
|
1870
|
+
if (!Br(e)) return !1;
|
|
1652
1871
|
const t = Number(e);
|
|
1653
1872
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1654
1873
|
}
|
|
1655
|
-
function
|
|
1874
|
+
function zr(e) {
|
|
1656
1875
|
return e instanceof Date && !isNaN(e);
|
|
1657
1876
|
}
|
|
1658
|
-
function
|
|
1877
|
+
function Xr(e) {
|
|
1659
1878
|
return "function" == typeof e;
|
|
1660
1879
|
}
|
|
1661
|
-
function
|
|
1880
|
+
function Zr(e) {
|
|
1662
1881
|
return e instanceof k;
|
|
1663
1882
|
}
|
|
1664
|
-
function
|
|
1665
|
-
return !
|
|
1883
|
+
function el(e) {
|
|
1884
|
+
return !Br(e) || 0 === e.length;
|
|
1666
1885
|
}
|
|
1667
|
-
function
|
|
1668
|
-
return
|
|
1886
|
+
function tl(e) {
|
|
1887
|
+
return Jr(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1669
1888
|
}
|
|
1670
|
-
function
|
|
1889
|
+
function nl(e, t, n) {
|
|
1671
1890
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1672
1891
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1673
1892
|
}
|
|
1674
|
-
function
|
|
1893
|
+
function rl(e, t) {
|
|
1675
1894
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1676
1895
|
}
|
|
1677
|
-
function
|
|
1896
|
+
function ll(e, t) {
|
|
1678
1897
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1679
1898
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1680
1899
|
}
|
|
1681
|
-
function
|
|
1682
|
-
if (
|
|
1683
|
-
if (
|
|
1900
|
+
function ol(e, t) {
|
|
1901
|
+
if (Kr(e) || Kr(t) || Yr(e) || Yr(t)) return 0;
|
|
1902
|
+
if (Jr(e) || Jr(t)) {
|
|
1684
1903
|
let n = Number(e), r = Number(t);
|
|
1685
1904
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1686
1905
|
}
|
|
1687
|
-
if (
|
|
1906
|
+
if (Hr(e) || Hr(t)) {
|
|
1688
1907
|
let n = Number(e), r = Number(t);
|
|
1689
1908
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1690
1909
|
}
|
|
1691
|
-
return
|
|
1910
|
+
return rl(String(e), String(t));
|
|
1692
1911
|
}
|
|
1693
|
-
function
|
|
1912
|
+
function il(e, t, n) {
|
|
1694
1913
|
var r;
|
|
1695
1914
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
1696
1915
|
}
|
|
1697
|
-
function
|
|
1698
|
-
if (!
|
|
1699
|
-
let t;
|
|
1700
|
-
for (
|
|
1916
|
+
function sl(e) {
|
|
1917
|
+
if (!Br(e)) return !1;
|
|
1918
|
+
let t = 0;
|
|
1919
|
+
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1701
1920
|
return 2 === t;
|
|
1702
1921
|
}
|
|
1703
|
-
function
|
|
1704
|
-
if (!
|
|
1705
|
-
let t;
|
|
1706
|
-
for (
|
|
1922
|
+
function al(e) {
|
|
1923
|
+
if (!Br(e)) return !1;
|
|
1924
|
+
let t = 0;
|
|
1925
|
+
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1707
1926
|
return 1 === t;
|
|
1708
1927
|
}
|
|
1709
|
-
function
|
|
1710
|
-
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t)
|
|
1928
|
+
function ul(e, t) {
|
|
1929
|
+
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t) ul(e, n);
|
|
1711
1930
|
else "string" == typeof t && delete e[t];
|
|
1712
1931
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1713
1932
|
}
|
|
1714
|
-
function
|
|
1933
|
+
function _l(e, t) {
|
|
1715
1934
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1716
1935
|
}
|
|
1717
|
-
function
|
|
1718
|
-
e && !
|
|
1936
|
+
function cl(e, t, n, r) {
|
|
1937
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1719
1938
|
const l = e ? `${Dt(e)}: ` : "";
|
|
1720
|
-
if (!
|
|
1721
|
-
if (!
|
|
1939
|
+
if (!Kr(t) && !Yr(t)) return void or(`${l}kw must be list or dict: '${String(n)}'`);
|
|
1940
|
+
if (!Br(n)) return void or(`${l}path must be a string: ${String(n)}`);
|
|
1722
1941
|
let o = n.split("`"), i = o.length;
|
|
1723
1942
|
for (let e = 0; e < i - 1; e++) {
|
|
1724
|
-
if (null == (t = t[o[e]])) return void (r &&
|
|
1725
|
-
if (!
|
|
1943
|
+
if (null == (t = t[o[e]])) return void (r && or(`${l}path not found: '${n}'`));
|
|
1944
|
+
if (!Kr(t) && !Yr(t)) return void or(`${l}kw must be list or dict: '${n}'`);
|
|
1726
1945
|
}
|
|
1727
1946
|
let s = t[o[i - 1]];
|
|
1728
|
-
return void 0 === s && r &&
|
|
1947
|
+
return void 0 === s && r && or(`${l}path not found: '${n}'`), s;
|
|
1729
1948
|
}
|
|
1730
|
-
function
|
|
1731
|
-
e && !
|
|
1949
|
+
function fl(e, t, n) {
|
|
1950
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1732
1951
|
let [r, l] = function(e, t) {
|
|
1733
1952
|
let n = e.lastIndexOf(t);
|
|
1734
1953
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
1735
1954
|
}(n, "`");
|
|
1736
|
-
return
|
|
1955
|
+
return el(l) ? kr(t, n) : kr(cl(e, t, r, !0), l), 0;
|
|
1737
1956
|
}
|
|
1738
|
-
function
|
|
1739
|
-
e && !
|
|
1740
|
-
let o =
|
|
1741
|
-
const i = l && l &
|
|
1957
|
+
function gl(e, t, n, r, l) {
|
|
1958
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1959
|
+
let o = cl(e, t, n, !1);
|
|
1960
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
1742
1961
|
if (void 0 === o) {
|
|
1743
1962
|
if (s && t) {
|
|
1744
1963
|
let l = Boolean(r);
|
|
1745
|
-
return
|
|
1964
|
+
return yl(e, t, n, l), l;
|
|
1746
1965
|
}
|
|
1747
|
-
return i && (
|
|
1966
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), Boolean(r);
|
|
1748
1967
|
}
|
|
1749
1968
|
let _;
|
|
1750
|
-
if (
|
|
1751
|
-
else if (u &&
|
|
1752
|
-
else if (u &&
|
|
1969
|
+
if (Hr(o)) _ = o;
|
|
1970
|
+
else if (u && Jr(o)) _ = 0 !== o;
|
|
1971
|
+
else if (u && Br(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o, 10) || 0);
|
|
1753
1972
|
else {
|
|
1754
|
-
if (!u || null !== o) return u ? (
|
|
1973
|
+
if (!u || null !== o) return u ? (or(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Nr(t), !1) : (or(`${e ? Dt(e) + ": " : ""}path MUST BE a json boolean: '${n}'`), Nr(t), Boolean(r));
|
|
1755
1974
|
_ = !1;
|
|
1756
1975
|
}
|
|
1757
|
-
return a &&
|
|
1976
|
+
return a && fl(e, t, n), _;
|
|
1758
1977
|
}
|
|
1759
|
-
function
|
|
1760
|
-
e && !
|
|
1761
|
-
let o =
|
|
1762
|
-
const i = l && l &
|
|
1978
|
+
function dl(e, t, n, r, l) {
|
|
1979
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1980
|
+
let o = cl(e, t, n, !1);
|
|
1981
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
1763
1982
|
if (void 0 === o) {
|
|
1764
1983
|
if (s && t) {
|
|
1765
1984
|
let l = parseInt(r);
|
|
1766
|
-
return
|
|
1985
|
+
return yl(e, t, n, l), l;
|
|
1767
1986
|
}
|
|
1768
|
-
return i && (
|
|
1987
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), parseInt(r);
|
|
1769
1988
|
}
|
|
1770
1989
|
let _;
|
|
1771
|
-
if (
|
|
1990
|
+
if (Jr(o)) _ = Math.trunc(o);
|
|
1772
1991
|
else {
|
|
1773
|
-
if (!u) return
|
|
1774
|
-
if (
|
|
1775
|
-
else if (
|
|
1992
|
+
if (!u) return or(`${e ? Dt(e) + ": " : ""}path MUST BE a json integer: '${n}'`), Nr(t), parseInt(r);
|
|
1993
|
+
if (Hr(o)) _ = o ? 1 : 0;
|
|
1994
|
+
else if (Br(o)) _ = function(e) {
|
|
1776
1995
|
const t = /^\s*([+-]?)(0[xX][0-9a-fA-F]+|0[0-7]*|[1-9][0-9]*)/.exec(e);
|
|
1777
1996
|
if (!t) return 0;
|
|
1778
1997
|
let n, r = t[2];
|
|
1779
1998
|
return n = r.length > 1 && ("x" === r[1] || "X" === r[1]) ? parseInt(r.substring(2), 16) : "0" === r[0] ? parseInt(r, 8) : parseInt(r, 10), "-" === t[1] ? -n : n;
|
|
1780
1999
|
}(o);
|
|
1781
2000
|
else {
|
|
1782
|
-
if (null !== o) return
|
|
2001
|
+
if (null !== o) return or(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Nr(t), 0;
|
|
1783
2002
|
_ = 0;
|
|
1784
2003
|
}
|
|
1785
2004
|
}
|
|
1786
|
-
return a &&
|
|
2005
|
+
return a && fl(e, t, n), _;
|
|
1787
2006
|
}
|
|
1788
|
-
function
|
|
1789
|
-
e && !
|
|
1790
|
-
let o =
|
|
1791
|
-
const i = l && l &
|
|
2007
|
+
function bl(e, t, n, r, l) {
|
|
2008
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2009
|
+
let o = cl(e, t, n, !1);
|
|
2010
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
1792
2011
|
if (void 0 === o) {
|
|
1793
2012
|
if (s && t) {
|
|
1794
2013
|
let l = Number(r);
|
|
1795
|
-
return
|
|
2014
|
+
return yl(e, t, n, l), l;
|
|
1796
2015
|
}
|
|
1797
|
-
return i && (
|
|
2016
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), Number(r);
|
|
1798
2017
|
}
|
|
1799
2018
|
let _;
|
|
1800
|
-
if (
|
|
2019
|
+
if (Jr(o)) _ = o;
|
|
1801
2020
|
else {
|
|
1802
|
-
if (!u) return
|
|
1803
|
-
if (
|
|
1804
|
-
else if (
|
|
2021
|
+
if (!u) return or(`${e ? Dt(e) + ": " : ""}path MUST BE a json real: '${n}'`), Nr(t), Number(r);
|
|
2022
|
+
if (Hr(o)) _ = o ? 1 : 0;
|
|
2023
|
+
else if (Br(o)) _ = parseFloat(o), Number.isNaN(_) && (_ = 0);
|
|
1805
2024
|
else {
|
|
1806
|
-
if (null !== o) return
|
|
2025
|
+
if (null !== o) return or(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Nr(t), 0;
|
|
1807
2026
|
_ = 0;
|
|
1808
2027
|
}
|
|
1809
2028
|
}
|
|
1810
|
-
return a &&
|
|
2029
|
+
return a && fl(e, t, n), _;
|
|
1811
2030
|
}
|
|
1812
|
-
function
|
|
1813
|
-
e && !
|
|
1814
|
-
let o =
|
|
1815
|
-
const i = l && l &
|
|
1816
|
-
return void 0 === o ? s && t ? (
|
|
1817
|
-
let n =
|
|
2031
|
+
function pl(e, t, n, r, l) {
|
|
2032
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2033
|
+
let o = cl(e, t, n, !1);
|
|
2034
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2035
|
+
return void 0 === o ? s && t ? (yl(e, t, n, Br(r) ? r : null), r) : (i && !function(e, t) {
|
|
2036
|
+
let n = Br(t) ? t.split("`") : [], r = e;
|
|
1818
2037
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1819
|
-
if (!
|
|
2038
|
+
if (!Kr(r) && !Yr(r)) return !1;
|
|
1820
2039
|
r = r[n[e]];
|
|
1821
2040
|
}
|
|
1822
|
-
return !(!
|
|
1823
|
-
}(t, n) && (
|
|
2041
|
+
return !(!Kr(r) && !Yr(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
2042
|
+
}(t, n) && (or(`path not found: '${n}'`), Nr(t)), r) : Br(o) ? (a && fl(e, t, n), o) : (null !== o && (or(`${e ? Dt(e) + ": " : ""}path MUST BE a json str: '${n}'`), Nr(t)), r);
|
|
1824
2043
|
}
|
|
1825
|
-
function
|
|
1826
|
-
e && !
|
|
1827
|
-
let o =
|
|
1828
|
-
const i = l && l &
|
|
2044
|
+
function ml(e, t, n, r, l) {
|
|
2045
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2046
|
+
let o = cl(e, t, n, !1);
|
|
2047
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
1829
2048
|
if (void 0 === o) {
|
|
1830
2049
|
if (s) {
|
|
1831
2050
|
let l = r;
|
|
1832
|
-
return
|
|
2051
|
+
return yl(e, t, n, l), l;
|
|
1833
2052
|
}
|
|
1834
|
-
return i && (
|
|
2053
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), r;
|
|
1835
2054
|
}
|
|
1836
|
-
return a &&
|
|
2055
|
+
return a && fl(e, t, n), o;
|
|
1837
2056
|
}
|
|
1838
|
-
function
|
|
1839
|
-
e && !
|
|
1840
|
-
let o =
|
|
1841
|
-
const i = l && l &
|
|
1842
|
-
return void 0 === o ? s &&
|
|
2057
|
+
function hl(e, t, n, r, l) {
|
|
2058
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2059
|
+
let o = cl(e, t, n, !1);
|
|
2060
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2061
|
+
return void 0 === o ? s && Kr(r) && t ? (yl(e, t, n, r), r) : (i && (or(`path not found: '${n}'`), Nr(t)), r) : Kr(o) ? (a && fl(e, t, n), o) : (i && (or(`${e ? Dt(e) + ": " : ""}path MUST BE a json dict: '${n}'`), Nr(t)), r);
|
|
1843
2062
|
}
|
|
1844
|
-
function
|
|
1845
|
-
e && !
|
|
1846
|
-
let o =
|
|
1847
|
-
const i = l && l &
|
|
2063
|
+
function El(e, t, n, r, l) {
|
|
2064
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2065
|
+
let o = cl(e, t, n, !1);
|
|
2066
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
1848
2067
|
if (void 0 === o) {
|
|
1849
2068
|
if (s) {
|
|
1850
2069
|
let l = r;
|
|
1851
|
-
return
|
|
2070
|
+
return yl(e, t, n, l), l;
|
|
1852
2071
|
}
|
|
1853
|
-
return i && (
|
|
2072
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), r;
|
|
1854
2073
|
}
|
|
1855
|
-
return a &&
|
|
2074
|
+
return a && fl(e, t, n), o;
|
|
1856
2075
|
}
|
|
1857
|
-
function
|
|
1858
|
-
e && !
|
|
1859
|
-
let o =
|
|
1860
|
-
const i = l && l &
|
|
1861
|
-
return void 0 === o ? s &&
|
|
2076
|
+
function Tl(e, t, n, r, l) {
|
|
2077
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2078
|
+
let o = cl(e, t, n, !1);
|
|
2079
|
+
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2080
|
+
return void 0 === o ? s && Yr(r) && t ? (yl(e, t, n, r), r) : (i && (or(`path not found: '${n}'`), Nr(t)), r) : Yr(o) ? (a && fl(e, t, n), o) : (i && (or(`${e ? Dt(e) + ": " : ""}path MUST BE a json list: '${n}'`), Nr(t)), r);
|
|
1862
2081
|
}
|
|
1863
|
-
function
|
|
1864
|
-
if (e && !
|
|
2082
|
+
function yl(e, t, n, r) {
|
|
2083
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !Kr(t)) return or("kw is not an object"), -1;
|
|
1865
2084
|
let l = n.split("`");
|
|
1866
2085
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1867
2086
|
let o = l.length;
|
|
@@ -1871,40 +2090,40 @@ function ll(e, t, n, r) {
|
|
|
1871
2090
|
else {
|
|
1872
2091
|
let r = t[s];
|
|
1873
2092
|
if (void 0 === r) t[s] = {};
|
|
1874
|
-
else if (!
|
|
2093
|
+
else if (!Kr(r) && !Yr(r)) return or(`${e ? Dt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not a dict or a list: '${n}'`), -1;
|
|
1875
2094
|
t = t[s];
|
|
1876
2095
|
}
|
|
1877
2096
|
}
|
|
1878
2097
|
return 0;
|
|
1879
2098
|
}
|
|
1880
|
-
function
|
|
1881
|
-
if (e && !
|
|
1882
|
-
let o =
|
|
1883
|
-
return
|
|
2099
|
+
function vl(e, t, n, r, l) {
|
|
2100
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !Kr(t)) return or("kw is not an object"), -1;
|
|
2101
|
+
let o = hl(e, t, n, {}, Vn.KW_CREATE);
|
|
2102
|
+
return Kr(o) ? (o[r] = l, 0) : (or("subdict is not an object"), -1);
|
|
1884
2103
|
}
|
|
1885
|
-
function
|
|
2104
|
+
function Ol(e, n, r) {
|
|
1886
2105
|
let l = "", o = !1;
|
|
1887
|
-
if (
|
|
2106
|
+
if (Yr(n)) {
|
|
1888
2107
|
o = !1;
|
|
1889
2108
|
for (let i = 0; i < n.length; i++) {
|
|
1890
2109
|
let s = n[i];
|
|
1891
|
-
if (l =
|
|
2110
|
+
if (l = el(r) ? t("%s", r) : t("%s`%d", r, i), o = Ol(e, s, l), o) break;
|
|
1892
2111
|
}
|
|
1893
|
-
} else if (
|
|
2112
|
+
} else if (Kr(n)) {
|
|
1894
2113
|
o = !0;
|
|
1895
2114
|
let i = Object.keys(n);
|
|
1896
2115
|
for (let s = 0; s < i.length; s++) {
|
|
1897
2116
|
let a = i[s], u = n[a];
|
|
1898
|
-
if (l =
|
|
1899
|
-
if (o =
|
|
2117
|
+
if (l = el(r) ? t("%s", a) : t("%s`%s", r, a), Yr(u) || Kr(u)) {
|
|
2118
|
+
if (o = Ol(e, u, l), !o) break;
|
|
1900
2119
|
continue;
|
|
1901
2120
|
}
|
|
1902
|
-
let _ =
|
|
1903
|
-
if (_ || (_ =
|
|
2121
|
+
let _ = El(0, e, l, 0, 0);
|
|
2122
|
+
if (_ || (_ = Ir(e, l)), !_) {
|
|
1904
2123
|
o = !1;
|
|
1905
2124
|
break;
|
|
1906
2125
|
}
|
|
1907
|
-
if (0 !==
|
|
2126
|
+
if (0 !== ol(_, u)) {
|
|
1908
2127
|
o = !1;
|
|
1909
2128
|
break;
|
|
1910
2129
|
}
|
|
@@ -1912,91 +2131,91 @@ function il(e, n, r) {
|
|
|
1912
2131
|
}
|
|
1913
2132
|
return o;
|
|
1914
2133
|
}
|
|
1915
|
-
function
|
|
1916
|
-
return 0 ===
|
|
2134
|
+
function Sl(e, t) {
|
|
2135
|
+
return 0 === Wr(t) || Ol(e, t, "");
|
|
1917
2136
|
}
|
|
1918
|
-
function
|
|
1919
|
-
if (!n || !
|
|
1920
|
-
for (let e = 0; e < t.length; e++) if (
|
|
1921
|
-
return r &&
|
|
2137
|
+
function Nl(e, t, n, r) {
|
|
2138
|
+
if (!n || !Yr(t)) return r && or("item NULL or kw_list is not a list"), -1;
|
|
2139
|
+
for (let e = 0; e < t.length; e++) if (jr(n, t[e])) return e;
|
|
2140
|
+
return r && or("item not found in this list"), -1;
|
|
1922
2141
|
}
|
|
1923
|
-
function
|
|
1924
|
-
if (e && !
|
|
1925
|
-
r || (r =
|
|
2142
|
+
function wl(e, t, n, r) {
|
|
2143
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !t) return null;
|
|
2144
|
+
r || (r = Sl);
|
|
1926
2145
|
let l = [];
|
|
1927
|
-
if (
|
|
2146
|
+
if (Yr(t)) for (let e = 0; e < t.length; e++) {
|
|
1928
2147
|
let o = t[e];
|
|
1929
|
-
r(o, n) && l.push(
|
|
2148
|
+
r(o, n) && l.push(wr(o));
|
|
1930
2149
|
}
|
|
1931
2150
|
else {
|
|
1932
|
-
if (!
|
|
1933
|
-
r(t, n) && l.push(
|
|
2151
|
+
if (!Kr(t)) return or("kw_select() BAD kw parameter"), null;
|
|
2152
|
+
r(t, n) && l.push(wr(t));
|
|
1934
2153
|
}
|
|
1935
2154
|
return l;
|
|
1936
2155
|
}
|
|
1937
|
-
function
|
|
1938
|
-
if (e && !
|
|
1939
|
-
r || (r =
|
|
2156
|
+
function Rl(e, t, n, r) {
|
|
2157
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !t) return null;
|
|
2158
|
+
r || (r = Sl);
|
|
1940
2159
|
let l = [];
|
|
1941
|
-
if (
|
|
2160
|
+
if (Yr(t)) for (let e = 0; e < t.length; e++) {
|
|
1942
2161
|
let o = t[e];
|
|
1943
2162
|
r(o, n) && l.push(o);
|
|
1944
2163
|
}
|
|
1945
2164
|
else {
|
|
1946
|
-
if (!
|
|
2165
|
+
if (!Kr(t)) return or("kw_select() BAD kw parameter"), null;
|
|
1947
2166
|
r(t, n) && l.push(t);
|
|
1948
2167
|
}
|
|
1949
2168
|
return l;
|
|
1950
2169
|
}
|
|
1951
|
-
function
|
|
1952
|
-
e && !
|
|
2170
|
+
function jl(e, t, n, r) {
|
|
2171
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1953
2172
|
let l = {};
|
|
1954
|
-
if (
|
|
2173
|
+
if (Br(n) && !el(n)) {
|
|
1955
2174
|
let o = n;
|
|
1956
|
-
t.hasOwnProperty(o) ? l[o] = t[o] : r &&
|
|
1957
|
-
} else if (
|
|
2175
|
+
t.hasOwnProperty(o) ? l[o] = t[o] : r && or(`${Dt(e)}: key not found: ${o}`);
|
|
2176
|
+
} else if (Kr(n) && Gr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? l[o] = t[o] : r && or(`${Dt(e)}: key not found: ${o}`);
|
|
1958
2177
|
else {
|
|
1959
|
-
if (!(
|
|
2178
|
+
if (!(Yr(n) && Mr(n) > 0)) return t;
|
|
1960
2179
|
for (let o = 0; o < n.length; o++) {
|
|
1961
2180
|
let i = n[o];
|
|
1962
|
-
t.hasOwnProperty(i) ? l[i] = t[i] : r &&
|
|
2181
|
+
t.hasOwnProperty(i) ? l[i] = t[i] : r && or(`${Dt(e)}: key not found: ${i}`);
|
|
1963
2182
|
}
|
|
1964
2183
|
}
|
|
1965
2184
|
return l;
|
|
1966
2185
|
}
|
|
1967
|
-
function
|
|
2186
|
+
function Dl(e, t, n, r) {
|
|
1968
2187
|
let l = {};
|
|
1969
|
-
if (
|
|
2188
|
+
if (Dr(l, t), Br(n) && !el(n)) {
|
|
1970
2189
|
let o = n;
|
|
1971
|
-
|
|
1972
|
-
} else if (
|
|
2190
|
+
El(e, t, o, 0, 0) ? kr(l, o) : r && or(`${Dt(e)}: key not found: ${o}`);
|
|
2191
|
+
} else if (Kr(n) && Gr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? kr(l, o) : r && or(`${Dt(e)}: key not found: ${o}`);
|
|
1973
2192
|
else {
|
|
1974
|
-
if (!(
|
|
2193
|
+
if (!(Yr(n) && Mr(n) > 0)) return {};
|
|
1975
2194
|
for (let o = 0; o < n.length; o++) {
|
|
1976
2195
|
let i = n[o];
|
|
1977
|
-
t.hasOwnProperty(i) ?
|
|
2196
|
+
t.hasOwnProperty(i) ? kr(l, i) : r && or(`${Dt(e)}: key not found: ${i}`);
|
|
1978
2197
|
}
|
|
1979
2198
|
}
|
|
1980
2199
|
return l;
|
|
1981
2200
|
}
|
|
1982
|
-
function
|
|
2201
|
+
function $l(e, t, n = !1) {
|
|
1983
2202
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
1984
2203
|
let r = window.localStorage.getItem(e);
|
|
1985
|
-
return null === r ? (n &&
|
|
2204
|
+
return null === r ? (n && Al(e, t), t) : JSON.parse(r);
|
|
1986
2205
|
} catch (n) {
|
|
1987
2206
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
1988
2207
|
}
|
|
1989
2208
|
}
|
|
1990
|
-
function
|
|
2209
|
+
function Al(e, t) {
|
|
1991
2210
|
if ("undefined" == typeof window || !window.localStorage) return 0;
|
|
1992
|
-
if (!e || void 0 === t) return
|
|
2211
|
+
if (!e || void 0 === t) return or(`kw_set_local_storage_value(): invalid key or value: key=${e}`), -1;
|
|
1993
2212
|
try {
|
|
1994
2213
|
return window.localStorage.setItem(e, JSON.stringify(t)), 0;
|
|
1995
2214
|
} catch (t) {
|
|
1996
|
-
return
|
|
2215
|
+
return or(`kw_set_local_storage_value(): cannot save "${e}" (storage full or blocked?): ${t && t.message ? t.message : t}`), -1;
|
|
1997
2216
|
}
|
|
1998
2217
|
}
|
|
1999
|
-
function
|
|
2218
|
+
function Il(e) {
|
|
2000
2219
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
2001
2220
|
window.localStorage.removeItem(e);
|
|
2002
2221
|
} catch (t) {
|
|
@@ -2004,125 +2223,125 @@ function bl(e) {
|
|
|
2004
2223
|
}
|
|
2005
2224
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
2006
2225
|
}
|
|
2007
|
-
function
|
|
2008
|
-
if (
|
|
2009
|
-
if (
|
|
2226
|
+
function kl(e, t) {
|
|
2227
|
+
if (qr(e) || qr(t)) return !0;
|
|
2228
|
+
if (Yr(e)) {
|
|
2010
2229
|
if (0 === e.length) return !0;
|
|
2011
2230
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2012
|
-
} else if (
|
|
2231
|
+
} else if (Kr(e)) {
|
|
2013
2232
|
if (0 === Object.keys(e).length) return !0;
|
|
2014
2233
|
for (let n in e) if (n === t) return !0;
|
|
2015
|
-
} else if (
|
|
2234
|
+
} else if (Br(e) && e === t) return !0;
|
|
2016
2235
|
return !1;
|
|
2017
2236
|
}
|
|
2018
|
-
function
|
|
2019
|
-
if (e && !
|
|
2020
|
-
l || (l =
|
|
2237
|
+
function Cl(e, t, n, r, l) {
|
|
2238
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !t) return null;
|
|
2239
|
+
l || (l = Sl);
|
|
2021
2240
|
let o = [];
|
|
2022
|
-
if (
|
|
2241
|
+
if (Yr(t)) for (let i = 0; i < t.length; i++) {
|
|
2023
2242
|
let s, a = t[i];
|
|
2024
|
-
if (
|
|
2243
|
+
if (Kr(a)) s = pl(e, a, "id", "", 0);
|
|
2025
2244
|
else {
|
|
2026
|
-
if (!
|
|
2245
|
+
if (!Br(a)) continue;
|
|
2027
2246
|
s = a;
|
|
2028
2247
|
}
|
|
2029
|
-
|
|
2248
|
+
kl(n, s) && l(a, r) && o.push(a);
|
|
2030
2249
|
}
|
|
2031
2250
|
else {
|
|
2032
|
-
if (!
|
|
2251
|
+
if (!Kr(t)) return or("kw_collect() BAD kw parameter"), null;
|
|
2033
2252
|
for (let e of Object.keys(t)) {
|
|
2034
2253
|
let i = t[e];
|
|
2035
|
-
|
|
2254
|
+
kl(n, e) && l(i, r) && o.push(i);
|
|
2036
2255
|
}
|
|
2037
2256
|
}
|
|
2038
2257
|
return o;
|
|
2039
2258
|
}
|
|
2040
|
-
function
|
|
2041
|
-
e && !
|
|
2259
|
+
function Ll(e, t, n) {
|
|
2260
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2042
2261
|
let r = {};
|
|
2043
|
-
if (
|
|
2044
|
-
else if (
|
|
2045
|
-
let l = t[n], o =
|
|
2046
|
-
|
|
2262
|
+
if (el(n) || (t = cl(e, t, n)), Kr(t)) r = t;
|
|
2263
|
+
else if (Yr(t)) for (let n = 0; n < t.length; n++) {
|
|
2264
|
+
let l = t[n], o = pl(e, l, "id", "", Vn.KW_REQUIRED);
|
|
2265
|
+
el(o) || (r[o] = l);
|
|
2047
2266
|
}
|
|
2048
|
-
else
|
|
2267
|
+
else or(`${Dt(e)} kwid_new_dict: data type unknown`);
|
|
2049
2268
|
return r;
|
|
2050
2269
|
}
|
|
2051
|
-
function
|
|
2052
|
-
if (e && !
|
|
2053
|
-
if (
|
|
2270
|
+
function Ul(e, t, n) {
|
|
2271
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), el(n) || (t = cl(e, t, n)), Yr(t)) return t;
|
|
2272
|
+
if (Kr(t)) {
|
|
2054
2273
|
let n = [];
|
|
2055
2274
|
for (let r of Object.keys(t)) {
|
|
2056
2275
|
let l = t[r];
|
|
2057
|
-
|
|
2276
|
+
Kr(l) ? (l.id = r, n.push(l)) : or(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2058
2277
|
}
|
|
2059
2278
|
return n;
|
|
2060
2279
|
}
|
|
2061
|
-
return
|
|
2280
|
+
return or(`${Dt(e)} kwid_new_list: wrong type for list`), [];
|
|
2062
2281
|
}
|
|
2063
|
-
function
|
|
2064
|
-
e && !
|
|
2065
|
-
let o =
|
|
2282
|
+
function Pl(e, t, n, r, l) {
|
|
2283
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2284
|
+
let o = Cl(e, t, n, r, l);
|
|
2066
2285
|
return o && 0 !== o.length ? o[0] : null;
|
|
2067
2286
|
}
|
|
2068
|
-
function
|
|
2069
|
-
if (e && !
|
|
2287
|
+
function Fl(e, t) {
|
|
2288
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !t) return [];
|
|
2070
2289
|
let n = [];
|
|
2071
|
-
if (
|
|
2072
|
-
else if (
|
|
2073
|
-
else
|
|
2074
|
-
if (
|
|
2075
|
-
else if (
|
|
2076
|
-
let r =
|
|
2290
|
+
if (Br(t)) n.push(t);
|
|
2291
|
+
else if (Kr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2292
|
+
else Yr(t) && t.forEach(function(t) {
|
|
2293
|
+
if (Br(t)) el(t) || n.push(t);
|
|
2294
|
+
else if (Kr(t)) {
|
|
2295
|
+
let r = pl(e, t, "id", 0, 0);
|
|
2077
2296
|
r && n.push(r);
|
|
2078
2297
|
}
|
|
2079
2298
|
});
|
|
2080
2299
|
return n;
|
|
2081
2300
|
}
|
|
2082
|
-
function
|
|
2301
|
+
function Vl(e, t, n) {
|
|
2083
2302
|
t = t || "id", n = n || "value";
|
|
2084
2303
|
let r = [];
|
|
2085
|
-
if (
|
|
2304
|
+
if (Yr(e)) for (let l = 0; l < e.length; l++) {
|
|
2086
2305
|
let o = e[l];
|
|
2087
|
-
if (
|
|
2306
|
+
if (Br(o)) r.push({
|
|
2088
2307
|
id: e[l],
|
|
2089
2308
|
value: e[l]
|
|
2090
2309
|
});
|
|
2091
|
-
else if (
|
|
2310
|
+
else if (Kr(o)) {
|
|
2092
2311
|
let e = {};
|
|
2093
|
-
if (
|
|
2094
|
-
if (!
|
|
2095
|
-
if (!(
|
|
2096
|
-
|
|
2312
|
+
if (_l(o, t)) {
|
|
2313
|
+
if (!_l(o, n)) {
|
|
2314
|
+
if (!(Wr(o) > 0)) {
|
|
2315
|
+
or("list2options(): object without field value: " + n);
|
|
2097
2316
|
continue;
|
|
2098
2317
|
}
|
|
2099
2318
|
n = Object.keys(o)[0];
|
|
2100
2319
|
}
|
|
2101
2320
|
e.id = o[t], e.value = o[n];
|
|
2102
2321
|
} else {
|
|
2103
|
-
if (!(
|
|
2104
|
-
|
|
2322
|
+
if (!(Wr(o) > 0)) {
|
|
2323
|
+
or("list2options(): object without field id: " + t);
|
|
2105
2324
|
continue;
|
|
2106
2325
|
}
|
|
2107
2326
|
t = Object.keys(o)[0], e.id = t, e.value = o[t];
|
|
2108
2327
|
}
|
|
2109
2328
|
r.push(e);
|
|
2110
|
-
} else
|
|
2329
|
+
} else or("list2options(): case1 not implemented");
|
|
2111
2330
|
}
|
|
2112
|
-
else if (
|
|
2331
|
+
else if (Kr(e)) for (let t of Object.keys(e)) r.push({
|
|
2113
2332
|
id: t,
|
|
2114
2333
|
value: t
|
|
2115
2334
|
});
|
|
2116
|
-
else
|
|
2335
|
+
else or("list2options(): case2 not implemented");
|
|
2117
2336
|
return r;
|
|
2118
2337
|
}
|
|
2119
|
-
function
|
|
2338
|
+
function Gl(e, t) {
|
|
2120
2339
|
if (!e) return -1;
|
|
2121
2340
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2122
2341
|
return -1;
|
|
2123
2342
|
}
|
|
2124
|
-
function
|
|
2125
|
-
if (!e || !t) return
|
|
2343
|
+
function Ml(e, t, n) {
|
|
2344
|
+
if (!e || !t) return or("ERROR: str_in_list() list or str empty"), !1;
|
|
2126
2345
|
let r = e.length;
|
|
2127
2346
|
if (n) {
|
|
2128
2347
|
t = t.toLowerCase();
|
|
@@ -2133,17 +2352,17 @@ function Ol(e, t, n) {
|
|
|
2133
2352
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2134
2353
|
return !1;
|
|
2135
2354
|
}
|
|
2136
|
-
function
|
|
2137
|
-
if (!e) return
|
|
2138
|
-
if (!t) return
|
|
2139
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2355
|
+
function Wl(e, t, n) {
|
|
2356
|
+
if (!e) return or("ERROR: strs_in_list() list empty"), !1;
|
|
2357
|
+
if (!t) return or("ERROR: strs_in_list() str empty"), !1;
|
|
2358
|
+
for (let r = 0; r < t.length; r++) if (Ml(e, t[r], n)) return !0;
|
|
2140
2359
|
return !1;
|
|
2141
2360
|
}
|
|
2142
|
-
function
|
|
2361
|
+
function xl(e, t) {
|
|
2143
2362
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2144
2363
|
return !1;
|
|
2145
2364
|
}
|
|
2146
|
-
function
|
|
2365
|
+
function Kl(e, t) {
|
|
2147
2366
|
try {
|
|
2148
2367
|
let n = e.__md_iev__;
|
|
2149
2368
|
if (n) return n[t];
|
|
@@ -2151,53 +2370,53 @@ function jl(e, t) {
|
|
|
2151
2370
|
return;
|
|
2152
2371
|
}
|
|
2153
2372
|
}
|
|
2154
|
-
function
|
|
2373
|
+
function Yl(e, t, n) {
|
|
2155
2374
|
let r = e.__md_iev__;
|
|
2156
2375
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2157
2376
|
}
|
|
2158
|
-
function
|
|
2159
|
-
if (!
|
|
2377
|
+
function Bl(e, t, n, r) {
|
|
2378
|
+
if (!Zr(e)) return or("gobj is not a GObj"), null;
|
|
2160
2379
|
if (!t) return;
|
|
2161
|
-
let l =
|
|
2162
|
-
l || (l = [],
|
|
2380
|
+
let l = Kl(t, n);
|
|
2381
|
+
l || (l = [], Yl(t, n, l));
|
|
2163
2382
|
try {
|
|
2164
|
-
|
|
2383
|
+
Yr(l) && l.unshift(r);
|
|
2165
2384
|
} catch (e) {
|
|
2166
|
-
|
|
2385
|
+
or(e);
|
|
2167
2386
|
}
|
|
2168
2387
|
}
|
|
2169
|
-
function
|
|
2170
|
-
if (!
|
|
2171
|
-
if (!
|
|
2172
|
-
let l =
|
|
2173
|
-
return l ? 0 === l.length ? (r &&
|
|
2388
|
+
function Jl(e, t, n, r) {
|
|
2389
|
+
if (!Zr(e)) return or("gobj is not a GObj"), null;
|
|
2390
|
+
if (!Kr(t)) return or("kw is not a dict"), null;
|
|
2391
|
+
let l = Kl(t, n);
|
|
2392
|
+
return l ? 0 === l.length ? (r && or(`stack empty: ${n}`), null) : l[0] : (r && or(`stack NOT FOUND: ${n}`), null);
|
|
2174
2393
|
}
|
|
2175
|
-
function
|
|
2176
|
-
return
|
|
2394
|
+
function Hl(e, t, n) {
|
|
2395
|
+
return el(n) ? fl(e, t, "__md_iev__`__msg_type__") : vl(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2177
2396
|
}
|
|
2178
|
-
function
|
|
2179
|
-
return
|
|
2397
|
+
function ql(e, t) {
|
|
2398
|
+
return pl(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2180
2399
|
}
|
|
2181
|
-
function
|
|
2400
|
+
function Ql(e, t, n) {
|
|
2182
2401
|
let r = new XMLHttpRequest();
|
|
2183
2402
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2184
2403
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
2185
2404
|
t(JSON.parse(r.responseText));
|
|
2186
2405
|
} catch (e) {
|
|
2187
|
-
n && (
|
|
2406
|
+
n && (or(`JSON parse status ${r.status}, error: ${e.message}`), n(r.status));
|
|
2188
2407
|
}
|
|
2189
2408
|
else n && n(r.status);
|
|
2190
2409
|
var e;
|
|
2191
2410
|
}, r.send();
|
|
2192
2411
|
}
|
|
2193
|
-
function
|
|
2412
|
+
function zl(e, t, n) {
|
|
2194
2413
|
let r = new XMLHttpRequest();
|
|
2195
2414
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2196
2415
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2197
2416
|
}, r.send(t);
|
|
2198
2417
|
}
|
|
2199
|
-
function
|
|
2200
|
-
void 0 !== n &&
|
|
2418
|
+
function Xl(e, t, n) {
|
|
2419
|
+
void 0 !== n && Br(n) || (n = "");
|
|
2201
2420
|
for (let r of Object.keys(e)) {
|
|
2202
2421
|
if (!e.hasOwnProperty(r)) continue;
|
|
2203
2422
|
let l = (n.length ? "`" : "") + r;
|
|
@@ -2206,61 +2425,61 @@ function Ll(e, t, n) {
|
|
|
2206
2425
|
r,
|
|
2207
2426
|
e[r],
|
|
2208
2427
|
n
|
|
2209
|
-
]),
|
|
2428
|
+
]), Kr(e[r]) && Xl(e[r], t, n), n = n.slice(0, -l.length);
|
|
2210
2429
|
}
|
|
2211
2430
|
}
|
|
2212
|
-
function
|
|
2213
|
-
n && (e =
|
|
2214
|
-
let r =
|
|
2215
|
-
|
|
2216
|
-
let l =
|
|
2217
|
-
return
|
|
2218
|
-
"__" !== t.substring(0, 2) &&
|
|
2431
|
+
function Zl(e, t, n) {
|
|
2432
|
+
n && (e = wr(e));
|
|
2433
|
+
let r = El(null, e, "type", [], 1);
|
|
2434
|
+
pl(null, e, "hook", "data", 1);
|
|
2435
|
+
let l = El(null, e, "schema", {}, 1), o = El(null, e, "topics", {}, 1);
|
|
2436
|
+
return Xl(l, function(e, t, n, l) {
|
|
2437
|
+
"__" !== t.substring(0, 2) && El(null, o, l, wr(r), 1);
|
|
2219
2438
|
}, t), e;
|
|
2220
2439
|
}
|
|
2221
|
-
function
|
|
2222
|
-
let l =
|
|
2223
|
-
if (!l) return
|
|
2224
|
-
if (
|
|
2440
|
+
function eo(e, t, n, r) {
|
|
2441
|
+
let l = El(null, El(null, e, "topics", null, 0), t, null, 0);
|
|
2442
|
+
if (!l) return or("jdb_update: topic not found: " + t), null;
|
|
2443
|
+
if (el(r.id)) return or("jdb_update: record without id: " + r), ur(r), null;
|
|
2225
2444
|
let o, i = n.split("`"), s = l;
|
|
2226
|
-
for (; (o = i.shift()) && !
|
|
2227
|
-
if (0 === i.length && s) if (
|
|
2445
|
+
for (; (o = i.shift()) && !el(o) && s;) Kr(s) && (s = El(null, s, e.hook, [], 1)), s = oo(s, null, o, !1);
|
|
2446
|
+
if (0 === i.length && s) if (Yr(s)) s.push(r);
|
|
2228
2447
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2229
2448
|
else {
|
|
2230
|
-
let t =
|
|
2449
|
+
let t = El(null, s, e.hook, [], 1), n = oo(t, e.hook, r.id, !1);
|
|
2231
2450
|
n ? Object.assign(n, r) : t.push(r);
|
|
2232
2451
|
}
|
|
2233
2452
|
return l;
|
|
2234
2453
|
}
|
|
2235
|
-
function
|
|
2236
|
-
let l =
|
|
2237
|
-
if (!l) return
|
|
2238
|
-
if (
|
|
2454
|
+
function to(e, t, n, r) {
|
|
2455
|
+
let l = El(null, El(null, e, "topics", null, 0), t, null, 0);
|
|
2456
|
+
if (!l) return or("jdb_delete: topic not found: " + t), null;
|
|
2457
|
+
if (el(r.id)) return or("jdb_delete: record without id: " + r), ur(r), null;
|
|
2239
2458
|
let o, i = n.split("`"), s = l;
|
|
2240
|
-
for (; (o = i.shift()) && !
|
|
2241
|
-
if (0 === i.length && s) if (
|
|
2242
|
-
let e =
|
|
2459
|
+
for (; (o = i.shift()) && !el(o) && s;) Kr(s) && (s = El(null, s, e.hook, null, 0)), s = oo(s, null, o, !1);
|
|
2460
|
+
if (0 === i.length && s) if (Yr(s)) {
|
|
2461
|
+
let e = Gl(s, r.id);
|
|
2243
2462
|
e >= 0 && s.splice(e, 1);
|
|
2244
2463
|
} else {
|
|
2245
|
-
let t =
|
|
2464
|
+
let t = El(null, s, e.hook, null, 0), n = Gl(t, r.id);
|
|
2246
2465
|
n >= 0 && t.splice(n, 1);
|
|
2247
2466
|
}
|
|
2248
2467
|
return l;
|
|
2249
2468
|
}
|
|
2250
|
-
function
|
|
2251
|
-
let n =
|
|
2252
|
-
if (!n) return
|
|
2253
|
-
return
|
|
2469
|
+
function no(e, t) {
|
|
2470
|
+
let n = El(null, e, "topics", null, 0);
|
|
2471
|
+
if (!n) return or("jdb topics section not found"), ur(e), null;
|
|
2472
|
+
return El(null, n, t, null, 0) || (or("jdb topic not found: " + t), ur(n), null);
|
|
2254
2473
|
}
|
|
2255
|
-
function
|
|
2256
|
-
let l =
|
|
2257
|
-
return l ? (void 0 === r && (r = !0),
|
|
2474
|
+
function ro(e, t, n, r) {
|
|
2475
|
+
let l = El(null, El(null, e, "topics", null, 0), t, null, 0);
|
|
2476
|
+
return l ? (void 0 === r && (r = !0), oo(l, e.hook, n, r)) : (or("jdb_get: topic not found: " + t), null);
|
|
2258
2477
|
}
|
|
2259
|
-
function
|
|
2260
|
-
let r =
|
|
2261
|
-
return r ? n < r.length ? r[n] : {} : (
|
|
2478
|
+
function lo(e, t, n) {
|
|
2479
|
+
let r = El(null, El(null, e, "topics", null, 0), t, null, 0);
|
|
2480
|
+
return r ? n < r.length ? r[n] : {} : (or("jdb_get_by_idx: topic not found: " + t), null);
|
|
2262
2481
|
}
|
|
2263
|
-
function
|
|
2482
|
+
function oo(e, t, n, r) {
|
|
2264
2483
|
if (!e) return null;
|
|
2265
2484
|
let l, o = e.length;
|
|
2266
2485
|
for (l = 0; l < o; l++) {
|
|
@@ -2268,19 +2487,19 @@ function Wl(e, t, n, r) {
|
|
|
2268
2487
|
if (o) {
|
|
2269
2488
|
let e = o.id;
|
|
2270
2489
|
if (e && e === n) return o;
|
|
2271
|
-
if (r &&
|
|
2272
|
-
let e =
|
|
2490
|
+
if (r && _l(o, t)) {
|
|
2491
|
+
let e = oo(o[t], t, n, r);
|
|
2273
2492
|
if (e) return e;
|
|
2274
2493
|
}
|
|
2275
2494
|
}
|
|
2276
2495
|
}
|
|
2277
2496
|
return null;
|
|
2278
2497
|
}
|
|
2279
|
-
function
|
|
2280
|
-
let n =
|
|
2281
|
-
return
|
|
2498
|
+
function io(e, t) {
|
|
2499
|
+
let n = wr(e);
|
|
2500
|
+
return $r(n, t), n;
|
|
2282
2501
|
}
|
|
2283
|
-
function
|
|
2502
|
+
function so(e) {
|
|
2284
2503
|
function t(e) {
|
|
2285
2504
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2286
2505
|
switch (t.length % 4) {
|
|
@@ -2311,9 +2530,9 @@ function xl(e) {
|
|
|
2311
2530
|
signature: t(n[2])
|
|
2312
2531
|
};
|
|
2313
2532
|
}
|
|
2314
|
-
function
|
|
2533
|
+
function ao(e, t) {
|
|
2315
2534
|
try {
|
|
2316
|
-
let n =
|
|
2535
|
+
let n = so(e);
|
|
2317
2536
|
switch (t) {
|
|
2318
2537
|
case "header": return JSON.parse(n.header);
|
|
2319
2538
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2323,38 +2542,38 @@ function Yl(e, t) {
|
|
|
2323
2542
|
return null;
|
|
2324
2543
|
}
|
|
2325
2544
|
}
|
|
2326
|
-
function
|
|
2545
|
+
function uo(e) {
|
|
2327
2546
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2328
2547
|
}
|
|
2329
|
-
function
|
|
2548
|
+
function _o(e) {
|
|
2330
2549
|
if (!e) return "";
|
|
2331
2550
|
const t = String(e).trim();
|
|
2332
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2551
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : uo(t);
|
|
2333
2552
|
}
|
|
2334
|
-
function
|
|
2553
|
+
function co(e) {
|
|
2335
2554
|
const t = document.createElement("template");
|
|
2336
2555
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2337
2556
|
}
|
|
2338
|
-
function
|
|
2557
|
+
function fo(e, t) {
|
|
2339
2558
|
let [n, r, l, o] = e;
|
|
2340
|
-
if (!n) return void
|
|
2559
|
+
if (!n) return void or("Tag must be a valid HTML element.");
|
|
2341
2560
|
let i = document.createElement(n), s = "";
|
|
2342
2561
|
if (r && "object" == typeof r) for (let e of Object.keys(r)) if ("style" === e && "object" == typeof r[e]) {
|
|
2343
2562
|
let t = "";
|
|
2344
2563
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2345
2564
|
i.style.cssText = t;
|
|
2346
2565
|
} else "style" === e ? i.style.cssText = r[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== r[e] && void 0 !== r[e] && (s = r[e], i.setAttribute("data-i18n", s)) : i.setAttribute(e, r[e]);
|
|
2347
|
-
if (
|
|
2566
|
+
if (Br(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(co(l));
|
|
2348
2567
|
else if (t && s) i.textContent = t(s) || l;
|
|
2349
2568
|
else i.textContent = l;
|
|
2350
|
-
else if (
|
|
2351
|
-
if (l.length > 0) if (
|
|
2352
|
-
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(
|
|
2353
|
-
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (
|
|
2569
|
+
else if (Yr(l)) {
|
|
2570
|
+
if (l.length > 0) if (Br(l[0])) i.appendChild(fo(l, t));
|
|
2571
|
+
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(fo(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2572
|
+
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (or("content ignored"), _r(l));
|
|
2354
2573
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2355
2574
|
return i;
|
|
2356
2575
|
}
|
|
2357
|
-
function
|
|
2576
|
+
function go(e) {
|
|
2358
2577
|
if (!e) return {
|
|
2359
2578
|
top: 0,
|
|
2360
2579
|
left: 0,
|
|
@@ -2374,11 +2593,11 @@ function Ql(e) {
|
|
|
2374
2593
|
bottom: t + i + l
|
|
2375
2594
|
};
|
|
2376
2595
|
}
|
|
2377
|
-
function
|
|
2596
|
+
function bo(e) {
|
|
2378
2597
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2379
2598
|
}
|
|
2380
|
-
function
|
|
2381
|
-
if (!
|
|
2599
|
+
function po(e, t) {
|
|
2600
|
+
if (!Xr(t)) return void or("You must supply a translation function");
|
|
2382
2601
|
e || (e = document);
|
|
2383
2602
|
const n = (t) => {
|
|
2384
2603
|
let n = [];
|
|
@@ -2401,41 +2620,41 @@ function Xl(e, t) {
|
|
|
2401
2620
|
n && e.setAttribute("placeholder", t(n));
|
|
2402
2621
|
});
|
|
2403
2622
|
}
|
|
2404
|
-
function
|
|
2623
|
+
function mo(e = "Time Tracker", t = !1) {
|
|
2405
2624
|
const n = e, r = performance.now();
|
|
2406
2625
|
let l = r;
|
|
2407
|
-
return t &&
|
|
2626
|
+
return t && ir(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
2408
2627
|
const i = performance.now(), s = (i - l) / 1e3, a = (i - r) / 1e3;
|
|
2409
|
-
return t &&
|
|
2628
|
+
return t && ir(`--\x3e ${n} ${e} - partial: ${s} sec, total: ${a} sec, ${o}`), l = i, {
|
|
2410
2629
|
partial: s,
|
|
2411
2630
|
total: a
|
|
2412
2631
|
};
|
|
2413
2632
|
} };
|
|
2414
2633
|
}
|
|
2415
|
-
function
|
|
2634
|
+
function ho(e) {
|
|
2416
2635
|
const t = (e, t) => String(e).padStart(t, "0"), n = `${(e = e || /* @__PURE__ */ new Date()).getFullYear()}-${t(e.getMonth() + 1, 2)}-${t(e.getDate(), 2)}T${t(e.getHours(), 2)}:${t(e.getMinutes(), 2)}:${t(e.getSeconds(), 2)}`, r = t(e.getMilliseconds(), 3), l = e.getTimezoneOffset();
|
|
2417
2636
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2418
2637
|
}
|
|
2419
|
-
function
|
|
2638
|
+
function Eo() {
|
|
2420
2639
|
return Math.floor(Date.now() / 1e3);
|
|
2421
2640
|
}
|
|
2422
|
-
function
|
|
2641
|
+
function To(e, t) {
|
|
2423
2642
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2424
2643
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2425
2644
|
return -1;
|
|
2426
2645
|
}
|
|
2427
|
-
function
|
|
2646
|
+
function yo() {
|
|
2428
2647
|
let e = "";
|
|
2429
2648
|
return "undefined" != typeof window && window.localStorage ? (e = window.localStorage.getItem("host_uuid"), !e && window.crypto?.randomUUID && (e = window.crypto.randomUUID(), window.localStorage.setItem("host_uuid", e))) : e = "undefined" != typeof globalThis && globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : "00000000-0000-0000-0000-000000000000", e;
|
|
2430
2649
|
}
|
|
2431
|
-
function
|
|
2650
|
+
function vo(e) {
|
|
2432
2651
|
return e.replace(/[?# ^:]/g, "_");
|
|
2433
2652
|
}
|
|
2434
|
-
function
|
|
2653
|
+
function Oo(e) {
|
|
2435
2654
|
let t = null;
|
|
2436
2655
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2437
2656
|
}
|
|
2438
|
-
function
|
|
2657
|
+
function So(e, t = 0, n = !1) {
|
|
2439
2658
|
let r = null, l = null, o = null;
|
|
2440
2659
|
const i = (...i) => {
|
|
2441
2660
|
o = this, l = i;
|
|
@@ -2450,20 +2669,20 @@ function io(e, t = 0, n = !1) {
|
|
|
2450
2669
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2451
2670
|
}, i;
|
|
2452
2671
|
}
|
|
2453
|
-
function
|
|
2672
|
+
function No(...e) {
|
|
2454
2673
|
let t = "", n = 0;
|
|
2455
2674
|
for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
|
|
2456
2675
|
return t;
|
|
2457
2676
|
}
|
|
2458
|
-
var
|
|
2459
|
-
function
|
|
2677
|
+
var wo = 256, Ro = 1e5;
|
|
2678
|
+
function jo(e) {
|
|
2460
2679
|
const t = String(e).replace(/`/g, "``");
|
|
2461
2680
|
return "[" === t[0] ? "[" + t : t;
|
|
2462
2681
|
}
|
|
2463
|
-
function
|
|
2464
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
2682
|
+
function Do(e) {
|
|
2683
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : jo(e)).join("`") : "";
|
|
2465
2684
|
}
|
|
2466
|
-
function
|
|
2685
|
+
function $o(e) {
|
|
2467
2686
|
if ("string" != typeof e) return null;
|
|
2468
2687
|
let t = [], n = "";
|
|
2469
2688
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2484,9 +2703,9 @@ function fo(e) {
|
|
|
2484
2703
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2485
2704
|
});
|
|
2486
2705
|
}
|
|
2487
|
-
function
|
|
2706
|
+
function Ao(e) {
|
|
2488
2707
|
const t = {}, n = (e, r, l) => {
|
|
2489
|
-
if (l >
|
|
2708
|
+
if (l > wo) throw new Error("json2flat: deeper than 256");
|
|
2490
2709
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2491
2710
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2492
2711
|
const o = `[${t}]`;
|
|
@@ -2496,7 +2715,7 @@ function go(e) {
|
|
|
2496
2715
|
const t = Object.keys(e);
|
|
2497
2716
|
if (t.length > 0) {
|
|
2498
2717
|
for (const o of t) {
|
|
2499
|
-
const t =
|
|
2718
|
+
const t = jo(o);
|
|
2500
2719
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2501
2720
|
}
|
|
2502
2721
|
return;
|
|
@@ -2506,20 +2725,20 @@ function go(e) {
|
|
|
2506
2725
|
};
|
|
2507
2726
|
return null == e || n(e, "", 0), t;
|
|
2508
2727
|
}
|
|
2509
|
-
function
|
|
2728
|
+
function Io(e) {
|
|
2510
2729
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2511
2730
|
let t = null;
|
|
2512
2731
|
for (const n of Object.keys(e)) {
|
|
2513
|
-
const r =
|
|
2732
|
+
const r = $o(n);
|
|
2514
2733
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2515
|
-
if (r.length >
|
|
2734
|
+
if (r.length > wo) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2516
2735
|
const l = "number" == typeof r[0];
|
|
2517
2736
|
if (null === t) t = l ? [] : {};
|
|
2518
2737
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2519
2738
|
let o = t;
|
|
2520
2739
|
for (let t = 0; t < r.length; t++) {
|
|
2521
2740
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2522
|
-
if (i && l >
|
|
2741
|
+
if (i && l > Ro) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2523
2742
|
if (i !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2524
2743
|
if (s) {
|
|
2525
2744
|
if (Array.isArray(o)) {
|
|
@@ -2543,23 +2762,23 @@ function bo(e) {
|
|
|
2543
2762
|
}
|
|
2544
2763
|
return null === t ? {} : t;
|
|
2545
2764
|
}
|
|
2546
|
-
function
|
|
2765
|
+
function ko(e, t) {
|
|
2547
2766
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2548
2767
|
}
|
|
2549
|
-
function
|
|
2768
|
+
function Co(e, t) {
|
|
2550
2769
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2551
2770
|
added: {},
|
|
2552
2771
|
removed: {},
|
|
2553
2772
|
changed: {}
|
|
2554
2773
|
};
|
|
2555
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2774
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? ko(n[e], r[e]) || (l.changed[e] = {
|
|
2556
2775
|
from: n[e],
|
|
2557
2776
|
to: r[e]
|
|
2558
2777
|
}) : l.removed[e] = n[e];
|
|
2559
2778
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || (l.added[e] = r[e]);
|
|
2560
2779
|
return l;
|
|
2561
2780
|
}
|
|
2562
|
-
function
|
|
2781
|
+
function Lo(e, t) {
|
|
2563
2782
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2564
2783
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2565
2784
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -2571,40 +2790,40 @@ function Eo(e, t) {
|
|
|
2571
2790
|
}
|
|
2572
2791
|
return e;
|
|
2573
2792
|
}
|
|
2574
|
-
function
|
|
2793
|
+
function Uo(e) {
|
|
2575
2794
|
return "persistent-attrs-" + Dt(e);
|
|
2576
2795
|
}
|
|
2577
|
-
function
|
|
2578
|
-
let n = Xt(e, v.SDF_PERSIST), r =
|
|
2579
|
-
if (r &&
|
|
2580
|
-
let l =
|
|
2581
|
-
l =
|
|
2796
|
+
function Po(e, t) {
|
|
2797
|
+
let n = Xt(e, v.SDF_PERSIST), r = $l(Uo(e), null, !1);
|
|
2798
|
+
if (r && Kr(r)) {
|
|
2799
|
+
let l = jl(e, r, t, !1);
|
|
2800
|
+
l = jl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2582
2801
|
}
|
|
2583
2802
|
}
|
|
2584
|
-
function
|
|
2585
|
-
let n =
|
|
2586
|
-
return r &&
|
|
2803
|
+
function Fo(e, t) {
|
|
2804
|
+
let n = jl(e, Xt(e, v.SDF_PERSIST), t, !1), r = $l(Uo(e), null, !1);
|
|
2805
|
+
return r && Kr(r) && Ar(n, r), Al(Uo(e), n);
|
|
2587
2806
|
}
|
|
2588
|
-
function
|
|
2589
|
-
let n =
|
|
2590
|
-
0 ===
|
|
2807
|
+
function Vo(e, t) {
|
|
2808
|
+
let n = Dl(e, $l(Uo(e), null, !1), t, !1);
|
|
2809
|
+
0 === Gr(n) ? Il(Uo(e)) : Al(Uo(e), n);
|
|
2591
2810
|
}
|
|
2592
|
-
function
|
|
2593
|
-
let n =
|
|
2594
|
-
return n &&
|
|
2811
|
+
function Go(e, t) {
|
|
2812
|
+
let n = $l(Uo(e), null, !1), r = {};
|
|
2813
|
+
return n && Kr(n) && (r = jl(e, n, t, !1)), r;
|
|
2595
2814
|
}
|
|
2596
|
-
function
|
|
2597
|
-
if (
|
|
2815
|
+
function Mo(e) {
|
|
2816
|
+
if (Yr(e) && 1 === Wr(e)) {
|
|
2598
2817
|
let t = e[0];
|
|
2599
|
-
return
|
|
2818
|
+
return _l(t, "size") ? t.size : 1;
|
|
2600
2819
|
}
|
|
2601
|
-
return
|
|
2820
|
+
return Wr(e);
|
|
2602
2821
|
}
|
|
2603
|
-
function
|
|
2604
|
-
if (
|
|
2822
|
+
function Wo(e, t) {
|
|
2823
|
+
if (Br(t)) {
|
|
2605
2824
|
if (-1 === t.indexOf("^")) {
|
|
2606
2825
|
let n, r, l = e.fkey;
|
|
2607
|
-
if (1 !==
|
|
2826
|
+
if (1 !== Gr(l)) return or("bad fkey 1"), or(e), or(t), null;
|
|
2608
2827
|
for (const e of Object.keys(l)) {
|
|
2609
2828
|
n = e, r = l[e];
|
|
2610
2829
|
break;
|
|
@@ -2617,28 +2836,28 @@ function No(e, t) {
|
|
|
2617
2836
|
}
|
|
2618
2837
|
{
|
|
2619
2838
|
let n = t.split("^");
|
|
2620
|
-
return 3 !== n.length ? (
|
|
2839
|
+
return 3 !== n.length ? (or("bad fkey 2"), or(e), or(t), null) : {
|
|
2621
2840
|
topic_name: n[0],
|
|
2622
2841
|
id: n[1],
|
|
2623
2842
|
hook_name: n[2]
|
|
2624
2843
|
};
|
|
2625
2844
|
}
|
|
2626
2845
|
}
|
|
2627
|
-
return
|
|
2846
|
+
return Kr(t) ? {
|
|
2628
2847
|
topic_name: t.topic_name,
|
|
2629
2848
|
id: t.id,
|
|
2630
2849
|
hook_name: t.hook_name
|
|
2631
|
-
} : (
|
|
2850
|
+
} : (or("bad fkey 3"), or(e), or(t), null);
|
|
2632
2851
|
}
|
|
2633
|
-
function
|
|
2634
|
-
let n =
|
|
2852
|
+
function xo(e, t) {
|
|
2853
|
+
let n = Wo(e, t);
|
|
2635
2854
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2636
2855
|
}
|
|
2637
|
-
function
|
|
2638
|
-
if (
|
|
2856
|
+
function Ko(e, t) {
|
|
2857
|
+
if (Br(t)) {
|
|
2639
2858
|
if (-1 === t.indexOf("^")) {
|
|
2640
2859
|
let n, r = e.hook;
|
|
2641
|
-
if (1 !==
|
|
2860
|
+
if (1 !== Gr(r)) return or("bad hook 1"), or(e), or(t), null;
|
|
2642
2861
|
for (let e of Object.keys(r)) {
|
|
2643
2862
|
n = e, r[e];
|
|
2644
2863
|
break;
|
|
@@ -2650,18 +2869,18 @@ function jo(e, t) {
|
|
|
2650
2869
|
}
|
|
2651
2870
|
{
|
|
2652
2871
|
let n = t.split("^");
|
|
2653
|
-
return 2 !== n.length ? (
|
|
2872
|
+
return 2 !== n.length ? (or("bad hook 2"), or(e), or(t), null) : {
|
|
2654
2873
|
topic_name: n[0],
|
|
2655
2874
|
id: n[1]
|
|
2656
2875
|
};
|
|
2657
2876
|
}
|
|
2658
2877
|
}
|
|
2659
|
-
return
|
|
2878
|
+
return Kr(t) ? {
|
|
2660
2879
|
topic_name: t.topic_name,
|
|
2661
2880
|
id: t.id
|
|
2662
|
-
} : (
|
|
2881
|
+
} : (or("bad hook 3"), or(e), or(t), null);
|
|
2663
2882
|
}
|
|
2664
|
-
var
|
|
2883
|
+
var Yo = [
|
|
2665
2884
|
"string",
|
|
2666
2885
|
"integer",
|
|
2667
2886
|
"object",
|
|
@@ -2671,7 +2890,7 @@ var wo = [
|
|
|
2671
2890
|
"real",
|
|
2672
2891
|
"boolean",
|
|
2673
2892
|
"blob"
|
|
2674
|
-
],
|
|
2893
|
+
], Bo = [
|
|
2675
2894
|
"persistent",
|
|
2676
2895
|
"required",
|
|
2677
2896
|
"notnull",
|
|
@@ -2683,7 +2902,7 @@ var wo = [
|
|
|
2683
2902
|
"stats",
|
|
2684
2903
|
"rstats",
|
|
2685
2904
|
"pstats"
|
|
2686
|
-
],
|
|
2905
|
+
], Jo = [
|
|
2687
2906
|
"hook",
|
|
2688
2907
|
"fkey",
|
|
2689
2908
|
"enum",
|
|
@@ -2712,7 +2931,7 @@ var wo = [
|
|
|
2712
2931
|
"coordinates",
|
|
2713
2932
|
"gbuffer"
|
|
2714
2933
|
];
|
|
2715
|
-
function
|
|
2934
|
+
function Ho(e) {
|
|
2716
2935
|
let t = {
|
|
2717
2936
|
name: e.id,
|
|
2718
2937
|
header: e.header,
|
|
@@ -2731,7 +2950,7 @@ function Ao(e) {
|
|
|
2731
2950
|
if (!e.flag) return t;
|
|
2732
2951
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2733
2952
|
let r = e.flag[n];
|
|
2734
|
-
if (
|
|
2953
|
+
if (Ml(Jo, r)) {
|
|
2735
2954
|
switch (r) {
|
|
2736
2955
|
case "enum":
|
|
2737
2956
|
t.enum_list = e.enum;
|
|
@@ -2745,7 +2964,7 @@ function Ao(e) {
|
|
|
2745
2964
|
case "file": t.is_file = !0;
|
|
2746
2965
|
}
|
|
2747
2966
|
t.type = r;
|
|
2748
|
-
} else if (
|
|
2967
|
+
} else if (Ml(Bo, r)) switch (r) {
|
|
2749
2968
|
case "writable":
|
|
2750
2969
|
t.is_writable = !0;
|
|
2751
2970
|
break;
|
|
@@ -2758,7 +2977,7 @@ function Ao(e) {
|
|
|
2758
2977
|
}
|
|
2759
2978
|
return t.is_file && (t.type = "file"), t;
|
|
2760
2979
|
}
|
|
2761
|
-
function
|
|
2980
|
+
function qo(e, t) {
|
|
2762
2981
|
let n = {
|
|
2763
2982
|
name: e,
|
|
2764
2983
|
header: e,
|
|
@@ -2772,13 +2991,13 @@ function Io(e, t) {
|
|
|
2772
2991
|
placeholder: void 0,
|
|
2773
2992
|
fkey: null
|
|
2774
2993
|
};
|
|
2775
|
-
if (
|
|
2994
|
+
if (Br(t)) {
|
|
2776
2995
|
let e = t.split(".");
|
|
2777
2996
|
for (let t = 0; t < e.length; t++) {
|
|
2778
2997
|
let r = e[t];
|
|
2779
|
-
if (
|
|
2780
|
-
else if (
|
|
2781
|
-
else if (
|
|
2998
|
+
if (Ml(Yo, r)) n.real_type || (n.real_type = r);
|
|
2999
|
+
else if (Ml(Jo, r)) n.type || (n.type = r);
|
|
3000
|
+
else if (Ml(Bo, r)) switch (r) {
|
|
2782
3001
|
case "writable":
|
|
2783
3002
|
n.is_writable = !0;
|
|
2784
3003
|
break;
|
|
@@ -2790,39 +3009,39 @@ function Io(e, t) {
|
|
|
2790
3009
|
}
|
|
2791
3010
|
}
|
|
2792
3011
|
n.real_type || (n.real_type = "string");
|
|
2793
|
-
} else
|
|
3012
|
+
} else Kr(t) ? (n = Ho(t), n.name || (n.name = e), n.header || (n.header = e)) : Yr(t) && (n.real_type = "array", n.enum_list = t);
|
|
2794
3013
|
return n.type || (n.type = n.real_type), n;
|
|
2795
3014
|
}
|
|
2796
|
-
function
|
|
3015
|
+
function Qo(e, t) {
|
|
2797
3016
|
let n = {};
|
|
2798
3017
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2799
3018
|
let l;
|
|
2800
|
-
|
|
2801
|
-
let o =
|
|
3019
|
+
Kr(r) && (l = r.default);
|
|
3020
|
+
let o = El(null, t, e, l);
|
|
2802
3021
|
n[e] = o;
|
|
2803
3022
|
}), n;
|
|
2804
3023
|
}
|
|
2805
|
-
var
|
|
3024
|
+
var zo = [
|
|
2806
3025
|
N(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2807
3026
|
N(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2808
3027
|
N(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2809
|
-
|
|
2810
|
-
],
|
|
3028
|
+
S()
|
|
3029
|
+
], Xo = {
|
|
2811
3030
|
periodic: !1,
|
|
2812
3031
|
msec: 0,
|
|
2813
3032
|
timer_id: -1
|
|
2814
|
-
},
|
|
2815
|
-
function
|
|
3033
|
+
}, Zo = null;
|
|
3034
|
+
function ei(e, t, n, r) {
|
|
2816
3035
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2817
3036
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2818
3037
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2819
|
-
}, l.msec) : l.timer_id = -1, kt(e) ? yn(At(e), o, {}, e) :
|
|
3038
|
+
}, l.msec) : l.timer_id = -1, kt(e) ? yn(At(e), o, {}, e) : Un(e, o, {}), l.periodic || -1 !== l.timer_id || Et(e) && gt(e), 0;
|
|
2820
3039
|
}
|
|
2821
|
-
var
|
|
3040
|
+
var ti = {
|
|
2822
3041
|
mt_create: function(e) {
|
|
2823
3042
|
let t = e.priv;
|
|
2824
3043
|
const n = nn(e, "subscriber");
|
|
2825
|
-
n &&
|
|
3044
|
+
n && $n(e, null, {}, n), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
2826
3045
|
},
|
|
2827
3046
|
mt_writing: function(e, t) {
|
|
2828
3047
|
let n = e.priv;
|
|
@@ -2832,7 +3051,7 @@ var Fo = {
|
|
|
2832
3051
|
break;
|
|
2833
3052
|
case "msec": n.msec = en(e, "msec"), -1 !== n.timer_id && (clearTimeout(n.timer_id), n.timer_id = -1), n.msec > 0 && (n.timer_id = setTimeout(function() {
|
|
2834
3053
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2835
|
-
}, n.msec)), n.msec > 0 ?
|
|
3054
|
+
}, n.msec)), n.msec > 0 ? Et(e) || at(e) : Et(e) && gt(e);
|
|
2836
3055
|
}
|
|
2837
3056
|
},
|
|
2838
3057
|
mt_start: function(e) {
|
|
@@ -2843,31 +3062,31 @@ var Fo = {
|
|
|
2843
3062
|
},
|
|
2844
3063
|
mt_destroy: function(e) {}
|
|
2845
3064
|
};
|
|
2846
|
-
function
|
|
3065
|
+
function ni() {
|
|
2847
3066
|
return function(e) {
|
|
2848
|
-
if (
|
|
3067
|
+
if (Zo) return or(`GClass ALREADY created: ${e}`), -1;
|
|
2849
3068
|
const t = [["ST_IDLE", [[
|
|
2850
3069
|
"EV_TIMEOUT",
|
|
2851
|
-
|
|
3070
|
+
ei,
|
|
2852
3071
|
null
|
|
2853
3072
|
]]]];
|
|
2854
|
-
return (
|
|
3073
|
+
return (Zo = Ae(e, [
|
|
2855
3074
|
["EV_TIMEOUT", P.EVF_OUTPUT_EVENT],
|
|
2856
3075
|
["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT],
|
|
2857
3076
|
[0, 0]
|
|
2858
|
-
], t,
|
|
3077
|
+
], t, ti, 0, zo, Xo, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
2859
3078
|
}("C_TIMER");
|
|
2860
3079
|
}
|
|
2861
|
-
function
|
|
2862
|
-
return e instanceof k ? "C_TIMER" !==
|
|
3080
|
+
function ri(e, t) {
|
|
3081
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (or("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (or("not GObj TYPE"), -1);
|
|
2863
3082
|
}
|
|
2864
|
-
function
|
|
2865
|
-
return e instanceof k ? "C_TIMER" !==
|
|
3083
|
+
function li(e, t) {
|
|
3084
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (or("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (or("not GObj TYPE"), -1);
|
|
2866
3085
|
}
|
|
2867
|
-
function
|
|
2868
|
-
return e instanceof k ? "C_TIMER" !==
|
|
3086
|
+
function oi(e) {
|
|
3087
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (or("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (or("not GObj TYPE"), -1);
|
|
2869
3088
|
}
|
|
2870
|
-
var
|
|
3089
|
+
var ii = [
|
|
2871
3090
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2872
3091
|
N(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2873
3092
|
N(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2886,72 +3105,72 @@ var Ko = [
|
|
|
2886
3105
|
N(y.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
2887
3106
|
N(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2888
3107
|
N(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2889
|
-
|
|
2890
|
-
],
|
|
2891
|
-
function
|
|
3108
|
+
S()
|
|
3109
|
+
], si = { gobj_timer: null }, ai = null;
|
|
3110
|
+
function ui(e, t, n, r) {
|
|
2892
3111
|
let l = zt(e, t);
|
|
2893
|
-
return
|
|
3112
|
+
return Kr(l) || (l = {}), l[n] = r, rn(e, t, l), qe(e, t);
|
|
2894
3113
|
}
|
|
2895
|
-
function
|
|
3114
|
+
function _i(e) {
|
|
2896
3115
|
if (!0 === e || !1 === e) return e;
|
|
2897
3116
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2898
3117
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2899
3118
|
}
|
|
2900
|
-
function
|
|
2901
|
-
return `${Nt()}^${
|
|
3119
|
+
function ci() {
|
|
3120
|
+
return `${Nt()}^${St()}`;
|
|
2902
3121
|
}
|
|
2903
|
-
function
|
|
2904
|
-
return
|
|
3122
|
+
function fi(e, t, n, r) {
|
|
3123
|
+
return Un(e, t, n), 0;
|
|
2905
3124
|
}
|
|
2906
|
-
var
|
|
3125
|
+
var gi = {
|
|
2907
3126
|
mt_create: function(e) {
|
|
2908
3127
|
let t = e.priv;
|
|
2909
|
-
un(e, "start_date",
|
|
3128
|
+
un(e, "start_date", ho()), un(e, "node_uuid", yo()), e.priv.gobj_timer = ot(Rt(e), "C_TIMER", {}, e), t.periodic_timeout = zt(e, "periodic_timeout"), function(e) {
|
|
2910
3129
|
let t = zt(e, "trace_levels");
|
|
2911
|
-
if (!
|
|
3130
|
+
if (!Kr(t)) return 0;
|
|
2912
3131
|
let n = t.__global_trace__;
|
|
2913
|
-
if (
|
|
3132
|
+
if (Yr(n)) {
|
|
2914
3133
|
ce(4294967295, !1);
|
|
2915
3134
|
for (let e of n) se(e, !0);
|
|
2916
3135
|
}
|
|
2917
3136
|
for (const [n, r] of Object.entries(t)) {
|
|
2918
3137
|
let t = Me(n);
|
|
2919
|
-
if (t) if (
|
|
2920
|
-
|
|
2921
|
-
for (let e of r)
|
|
2922
|
-
} else
|
|
3138
|
+
if (t) if (Yr(r)) {
|
|
3139
|
+
Ee(t, null, !1);
|
|
3140
|
+
for (let e of r) Ee(t, e, !0);
|
|
3141
|
+
} else or(`${Rt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2923
3142
|
}
|
|
2924
3143
|
}(e), function(e) {
|
|
2925
3144
|
let t = zt(e, "no_trace_levels");
|
|
2926
|
-
if (!
|
|
3145
|
+
if (!Kr(t)) return 0;
|
|
2927
3146
|
let n = t.__global_no_trace__;
|
|
2928
|
-
if (
|
|
3147
|
+
if (Yr(n)) {
|
|
2929
3148
|
fe(4294967295, !1);
|
|
2930
3149
|
for (let e of n) ae(e, !0);
|
|
2931
3150
|
}
|
|
2932
3151
|
for (const [n, r] of Object.entries(t)) {
|
|
2933
3152
|
let t = Me(n);
|
|
2934
|
-
if (t) if (
|
|
3153
|
+
if (t) if (Yr(r)) {
|
|
2935
3154
|
ye(t, null, !1);
|
|
2936
3155
|
for (let e of r) ye(t, e, !0);
|
|
2937
|
-
} else
|
|
3156
|
+
} else or(`${Rt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2938
3157
|
}
|
|
2939
3158
|
}(e);
|
|
2940
3159
|
},
|
|
2941
3160
|
mt_writing: function(e, t) {},
|
|
2942
3161
|
mt_start: function(e) {
|
|
2943
|
-
return
|
|
3162
|
+
return li(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2944
3163
|
},
|
|
2945
3164
|
mt_stop: function(e) {
|
|
2946
|
-
return
|
|
3165
|
+
return oi(e.priv.gobj_timer), bt(e), 0;
|
|
2947
3166
|
},
|
|
2948
3167
|
mt_destroy: function(e) {},
|
|
2949
3168
|
mt_play: function(e) {
|
|
2950
|
-
let t =
|
|
2951
|
-
return
|
|
3169
|
+
let t = xe();
|
|
3170
|
+
return Et(t) || at(t), vt(t) || mt(t), 0;
|
|
2952
3171
|
},
|
|
2953
3172
|
mt_pause: function(e) {
|
|
2954
|
-
return
|
|
3173
|
+
return ht(xe()), 0;
|
|
2955
3174
|
},
|
|
2956
3175
|
mt_command_parser: function(e, t, n, r) {
|
|
2957
3176
|
switch (n = n || {}, t) {
|
|
@@ -2959,35 +3178,35 @@ var Qo = {
|
|
|
2959
3178
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
2960
3179
|
case "set-global-trace":
|
|
2961
3180
|
case "set-global-no-trace": {
|
|
2962
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
2963
|
-
return l ? null === i ? o(0, -1, `${
|
|
3181
|
+
let r = "set-global-no-trace" === t, l = n.level, i = _i(n.set);
|
|
3182
|
+
return l ? null === i ? o(0, -1, `${ci()}: bitmask set or re-set?`, null, null) : (r ? ae(l, i) : se(l, i)) < 0 ? o(0, -1, `${ci()}: global trace level not found: ${l}`, null, null) : r ? (ui(e, "no_trace_levels", "__global_no_trace__", de()), o(0, 0, null, null, de())) : (ui(e, "trace_levels", "__global_trace__", ge()), o(0, 0, null, null, ge())) : o(0, -1, `${ci()}: what level?`, null, null);
|
|
2964
3183
|
}
|
|
2965
3184
|
case "get-gclass-trace":
|
|
2966
3185
|
case "get-gclass-no-trace":
|
|
2967
3186
|
case "set-gclass-trace":
|
|
2968
3187
|
case "set-gclass-no-trace": {
|
|
2969
3188
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
2970
|
-
if (!i) return o(0, -1, `${
|
|
3189
|
+
if (!i) return o(0, -1, `${ci()}: what gclass is '${l}'?`, null, null);
|
|
2971
3190
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
2972
|
-
let s = n.level, a =
|
|
2973
|
-
return s ? null === a ? o(0, -1, `${
|
|
3191
|
+
let s = n.level, a = _i(n.set);
|
|
3192
|
+
return s ? null === a ? o(0, -1, `${ci()}: bitmask set or re-set?`, null, null) : (r ? ye(i, s, a) : Ee(i, s, a)) < 0 ? o(0, -1, `${ci()}: trace level of ${l} not found: ${s}`, null, null) : r ? (ui(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (ui(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${ci()}: what level?`, null, null);
|
|
2974
3193
|
}
|
|
2975
|
-
default: return o(0, -1, `${
|
|
3194
|
+
default: return o(0, -1, `${ci()}: command not available: ${t}`, null, null);
|
|
2976
3195
|
}
|
|
2977
3196
|
}
|
|
2978
3197
|
};
|
|
2979
|
-
function
|
|
3198
|
+
function di() {
|
|
2980
3199
|
return function(e) {
|
|
2981
|
-
if (
|
|
3200
|
+
if (ai) return or(`GClass ALREADY created: ${e}`), -1;
|
|
2982
3201
|
const t = [["ST_IDLE", [[
|
|
2983
3202
|
"EV_TIMEOUT_PERIODIC",
|
|
2984
|
-
|
|
3203
|
+
fi,
|
|
2985
3204
|
null
|
|
2986
3205
|
]]]];
|
|
2987
|
-
return (
|
|
3206
|
+
return (ai = Ae(e, [["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS], [0, 0]], t, gi, 0, ii, si, 0, 0, 0, 0)) ? 0 : -1;
|
|
2988
3207
|
}("C_YUNO");
|
|
2989
3208
|
}
|
|
2990
|
-
var
|
|
3209
|
+
var bi = "ievent_gate_stack", pi = [
|
|
2991
3210
|
N(y.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
2992
3211
|
N(y.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
2993
3212
|
N(y.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3003,16 +3222,16 @@ var Xo = "ievent_gate_stack", Zo = [
|
|
|
3003
3222
|
N(y.DTP_INTEGER, "timeout_retry_max", v.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
|
|
3004
3223
|
N(y.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3005
3224
|
N(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3006
|
-
|
|
3007
|
-
],
|
|
3225
|
+
S()
|
|
3226
|
+
], mi = [
|
|
3008
3227
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3009
3228
|
["ievents2", "Trace inter-events with full kw"],
|
|
3010
3229
|
["identity-card", "Trace identity_card messages"]
|
|
3011
3230
|
];
|
|
3012
|
-
function
|
|
3231
|
+
function hi(e) {
|
|
3013
3232
|
return !!(3 & Z(e));
|
|
3014
3233
|
}
|
|
3015
|
-
var
|
|
3234
|
+
var Ei = {
|
|
3016
3235
|
url: null,
|
|
3017
3236
|
remote_yuno_name: null,
|
|
3018
3237
|
remote_yuno_role: null,
|
|
@@ -3022,16 +3241,16 @@ var ni = {
|
|
|
3022
3241
|
websocket: null,
|
|
3023
3242
|
inside_on_open: !1,
|
|
3024
3243
|
retry_ms: 0
|
|
3025
|
-
},
|
|
3026
|
-
function
|
|
3027
|
-
e.priv.websocket &&
|
|
3244
|
+
}, Ti = null;
|
|
3245
|
+
function yi(e) {
|
|
3246
|
+
e.priv.websocket && or("Websocket ALREADY setup");
|
|
3028
3247
|
const t = tn(e, "url");
|
|
3029
3248
|
let n;
|
|
3030
|
-
|
|
3249
|
+
ar(`====> Starting WebSocket to '${t}' (${Dt(e)})`);
|
|
3031
3250
|
try {
|
|
3032
3251
|
n = new WebSocket(t);
|
|
3033
3252
|
} catch (n) {
|
|
3034
|
-
return
|
|
3253
|
+
return or(`${Dt(e)}: Cannot open WebSocket to '${t}', Error: ${n.message}`), null;
|
|
3035
3254
|
}
|
|
3036
3255
|
return n ? (n.onopen = () => {
|
|
3037
3256
|
yn(e, "EV_ON_OPEN", { url: t }, e);
|
|
@@ -3041,72 +3260,72 @@ function li(e) {
|
|
|
3041
3260
|
data: n.data
|
|
3042
3261
|
}, e);
|
|
3043
3262
|
}, n.onclose = (n) => {
|
|
3044
|
-
Ct(e) || (Zt(
|
|
3263
|
+
Ct(e) || (Zt(Ot(), "browser_beforeunload") ? ir("Close websocket by unload page") : yn(e, "EV_ON_CLOSE", {
|
|
3045
3264
|
url: t,
|
|
3046
3265
|
e: n
|
|
3047
3266
|
}, e));
|
|
3048
|
-
}, n) : (
|
|
3267
|
+
}, n) : (or(`${Dt(e)}: Failed to initialize WebSocket.`), null);
|
|
3049
3268
|
}
|
|
3050
|
-
function
|
|
3269
|
+
function vi(e, t = 1e3, n = "") {
|
|
3051
3270
|
let r = e.priv, l = r.websocket;
|
|
3052
3271
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3053
|
-
|
|
3272
|
+
ar(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
3054
3273
|
try {
|
|
3055
3274
|
l.close(t, n);
|
|
3056
3275
|
} catch (e) {
|
|
3057
|
-
|
|
3276
|
+
or("Error closing WebSocket:", e.message);
|
|
3058
3277
|
}
|
|
3059
|
-
} else
|
|
3278
|
+
} else ir("WebSocket is already closed or in the process of closing.");
|
|
3060
3279
|
}
|
|
3061
|
-
function
|
|
3062
|
-
let r =
|
|
3280
|
+
function Oi(e, t, n) {
|
|
3281
|
+
let r = ho();
|
|
3063
3282
|
try {
|
|
3064
|
-
|
|
3283
|
+
ar("\n" + r + " " + t + "\n"), Nr(n);
|
|
3065
3284
|
} catch (e) {
|
|
3066
|
-
|
|
3285
|
+
ar("ERROR in trace_inter_event: " + e);
|
|
3067
3286
|
}
|
|
3068
3287
|
}
|
|
3069
|
-
var
|
|
3288
|
+
var Si = class {
|
|
3070
3289
|
constructor(e, t) {
|
|
3071
3290
|
this.event = e, this.kw = t || {};
|
|
3072
3291
|
}
|
|
3073
3292
|
};
|
|
3074
|
-
function
|
|
3293
|
+
function Ni(e, t, n, r) {
|
|
3075
3294
|
return function(e, t) {
|
|
3076
3295
|
let n = e.priv, r = JSON.stringify(t);
|
|
3077
|
-
if (
|
|
3078
|
-
let n = tn(e, "url"), l =
|
|
3079
|
-
o ? o(l, t, 1, r.length) :
|
|
3296
|
+
if (hi(e)) {
|
|
3297
|
+
let n = tn(e, "url"), l = Rt(Ot()) + " ==> " + n, o = zt(Ot(), "trace_ievent_callback");
|
|
3298
|
+
o ? o(l, t, 1, r.length) : Oi(0, l, t);
|
|
3080
3299
|
}
|
|
3081
|
-
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return
|
|
3300
|
+
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return ir(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3082
3301
|
try {
|
|
3083
3302
|
n.websocket.send(r);
|
|
3084
3303
|
} catch (t) {
|
|
3085
|
-
|
|
3304
|
+
or(`${Dt(e)}: send_iev(): ${t}`);
|
|
3086
3305
|
}
|
|
3087
3306
|
return 0;
|
|
3088
3307
|
}(e, function(e, t) {
|
|
3089
|
-
return
|
|
3308
|
+
return el(e) ? (or("iev_create() event NULL"), null) : new Si(e, t);
|
|
3090
3309
|
}(t, n));
|
|
3091
3310
|
}
|
|
3092
|
-
function
|
|
3093
|
-
return
|
|
3311
|
+
function wi(e, t, n) {
|
|
3312
|
+
return el(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3094
3313
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3095
3314
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3096
3315
|
dst_service: n,
|
|
3097
|
-
src_yuno:
|
|
3316
|
+
src_yuno: St(),
|
|
3098
3317
|
src_role: Nt(),
|
|
3099
3318
|
src_service: t,
|
|
3100
|
-
host:
|
|
3319
|
+
host: yo()
|
|
3101
3320
|
};
|
|
3102
3321
|
}
|
|
3103
|
-
function
|
|
3104
|
-
let t = e.priv, n = vt(
|
|
3105
|
-
i && i.length || (i = zt(
|
|
3322
|
+
function Ri(e) {
|
|
3323
|
+
let t = e.priv, n = vt(Ot()), r = tn(Ot(), "yuno_version"), l = tn(Ot(), "yuno_release"), o = tn(Ot(), "yuno_tag"), i = zt(e, "required_services");
|
|
3324
|
+
i && i.length || (i = zt(Ot(), "required_services"));
|
|
3106
3325
|
let s = {
|
|
3107
3326
|
yuno_role: Nt(),
|
|
3108
|
-
yuno_id:
|
|
3109
|
-
yuno_name:
|
|
3327
|
+
yuno_id: wt(),
|
|
3328
|
+
yuno_name: St(),
|
|
3110
3329
|
yuno_tag: o,
|
|
3111
3330
|
yuno_version: r,
|
|
3112
3331
|
yuno_release: l,
|
|
@@ -3115,37 +3334,37 @@ function _i(e) {
|
|
|
3115
3334
|
pid: 0,
|
|
3116
3335
|
watcher_pid: 0,
|
|
3117
3336
|
jwt: tn(e, "jwt"),
|
|
3118
|
-
username: tn(
|
|
3337
|
+
username: tn(Ot(), "__username__"),
|
|
3119
3338
|
launch_id: 0,
|
|
3120
|
-
yuno_startdate: tn(
|
|
3121
|
-
id:
|
|
3339
|
+
yuno_startdate: tn(Ot(), "start_date"),
|
|
3340
|
+
id: yo(),
|
|
3122
3341
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3123
3342
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3124
3343
|
required_services: i
|
|
3125
3344
|
};
|
|
3126
|
-
return
|
|
3345
|
+
return Bl(e, s, bi, wi(e, Rt(At(e)), null)), Hl(e, s, "__identity__"), ri(t.gobj_timer, en(e, "timeout_idack")), Ni(e, "EV_IDENTITY_CARD", s);
|
|
3127
3346
|
}
|
|
3128
|
-
function
|
|
3129
|
-
if (
|
|
3347
|
+
function ji(e, t) {
|
|
3348
|
+
if (el(t.event)) return -1;
|
|
3130
3349
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3131
3350
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3132
|
-
return
|
|
3351
|
+
return Bl(e, n, bi, wi(e, Rt(s), i)), Hl(e, n, "__subscribing__"), Ni(e, t.event, n);
|
|
3133
3352
|
}
|
|
3134
|
-
function
|
|
3353
|
+
function Di(e, t, n, r) {
|
|
3135
3354
|
let l = e.priv;
|
|
3136
|
-
return
|
|
3355
|
+
return Et(e) && (l.websocket = yi(e)), 0;
|
|
3137
3356
|
}
|
|
3138
|
-
function
|
|
3139
|
-
return
|
|
3357
|
+
function $i(e, t, n, r) {
|
|
3358
|
+
return ar("Websocket opened: " + e.priv.url), Ri(e), 0;
|
|
3140
3359
|
}
|
|
3141
|
-
function
|
|
3360
|
+
function Ai(e, t, n, r) {
|
|
3142
3361
|
let l = e.priv, o = n.e, i = n.url;
|
|
3143
|
-
return
|
|
3362
|
+
return rr(), ir(`${Dt(e)}: WebSocket closed ${i} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), l.websocket && (l.websocket.onopen = null, l.websocket.onmessage = null, l.websocket.onerror = null, l.websocket.onclose = null, l.websocket = null), l.inform_on_close ? (l.inform_on_close = !1, Un(e, "EV_ON_CLOSE", {
|
|
3144
3363
|
url: i,
|
|
3145
3364
|
remote_yuno_name: l.remote_yuno_name,
|
|
3146
3365
|
remote_yuno_role: l.remote_yuno_role,
|
|
3147
3366
|
remote_yuno_service: l.remote_yuno_service
|
|
3148
|
-
})) : (
|
|
3367
|
+
})) : (ir(`${Dt(e)}: EV_ON_OPEN_ERROR cannot open ${i} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), Un(e, "EV_ON_OPEN_ERROR", {
|
|
3149
3368
|
url: i,
|
|
3150
3369
|
remote_yuno_name: l.remote_yuno_name,
|
|
3151
3370
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -3153,7 +3372,7 @@ function di(e, t, n, r) {
|
|
|
3153
3372
|
code: o.code,
|
|
3154
3373
|
reason: o.reason,
|
|
3155
3374
|
was_clean: o.wasClean
|
|
3156
|
-
})),
|
|
3375
|
+
})), Et(e) && ri(l.gobj_timer, function(e) {
|
|
3157
3376
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3158
3377
|
r < n && (r = n);
|
|
3159
3378
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
@@ -3161,17 +3380,17 @@ function di(e, t, n, r) {
|
|
|
3161
3380
|
return Math.max(1, Math.round(o));
|
|
3162
3381
|
}(e)), 0;
|
|
3163
3382
|
}
|
|
3164
|
-
function
|
|
3165
|
-
return
|
|
3383
|
+
function Ii(e, t, n, r) {
|
|
3384
|
+
return Ri(e), 0;
|
|
3166
3385
|
}
|
|
3167
|
-
function
|
|
3386
|
+
function ki(e, t, n, r) {
|
|
3168
3387
|
let l = e.priv;
|
|
3169
|
-
|
|
3170
|
-
let o =
|
|
3388
|
+
oi(l.gobj_timer);
|
|
3389
|
+
let o = Jl(e, n, bi, !0), i = pl(e, o, "src_yuno", ""), s = pl(e, o, "src_role", ""), a = pl(e, o, "src_service", "");
|
|
3171
3390
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3172
|
-
let u =
|
|
3391
|
+
let u = dl(e, n, "result", -1, 0), _ = pl(e, n, "comment", "", 0), c = pl(e, n, "username", "", 0), f = El(e, n, "services_roles", {});
|
|
3173
3392
|
if (u < 0) {
|
|
3174
|
-
|
|
3393
|
+
vi(e);
|
|
3175
3394
|
let t = {
|
|
3176
3395
|
url: tn(e, "url"),
|
|
3177
3396
|
result: u,
|
|
@@ -3181,7 +3400,7 @@ function pi(e, t, n, r) {
|
|
|
3181
3400
|
remote_yuno_role: s,
|
|
3182
3401
|
remote_yuno_service: a
|
|
3183
3402
|
};
|
|
3184
|
-
kt(e) ? yn(At(e), "EV_ON_ID_NAK", t, e) :
|
|
3403
|
+
kt(e) ? yn(At(e), "EV_ON_ID_NAK", t, e) : Un(e, "EV_ON_ID_NAK", t);
|
|
3185
3404
|
} else {
|
|
3186
3405
|
if (_n(e, "ST_SESSION"), l.inside_on_open = !0, l.retry_ms = 0, !l.inform_on_close) {
|
|
3187
3406
|
l.inform_on_close = !0;
|
|
@@ -3192,69 +3411,69 @@ function pi(e, t, n, r) {
|
|
|
3192
3411
|
remote_yuno_service: a,
|
|
3193
3412
|
services_roles: f
|
|
3194
3413
|
};
|
|
3195
|
-
kt(e) ? yn(At(e), "EV_ON_OPEN", t, e) :
|
|
3414
|
+
kt(e) ? yn(At(e), "EV_ON_OPEN", t, e) : Un(e, "EV_ON_OPEN", t);
|
|
3196
3415
|
}
|
|
3197
3416
|
l.inside_on_open = !1, function(e) {
|
|
3198
|
-
let t =
|
|
3199
|
-
for (let n = 0; n < t.length; n++)
|
|
3417
|
+
let t = kn(e, null, null, null);
|
|
3418
|
+
for (let n = 0; n < t.length; n++) ji(e, t[n]);
|
|
3200
3419
|
}(e);
|
|
3201
3420
|
}
|
|
3202
3421
|
return 0;
|
|
3203
3422
|
}
|
|
3204
|
-
function
|
|
3423
|
+
function Ci(e, t, n, r) {
|
|
3205
3424
|
let l = e.priv.url, o = function(e, t) {
|
|
3206
3425
|
let n;
|
|
3207
3426
|
try {
|
|
3208
3427
|
n = JSON.parse(t);
|
|
3209
3428
|
} catch (e) {
|
|
3210
|
-
return
|
|
3429
|
+
return or("parsing inter_event json: " + e), null;
|
|
3211
3430
|
}
|
|
3212
|
-
if (!(n instanceof Object)) return
|
|
3431
|
+
if (!(n instanceof Object)) return or("parsing inter_event: websocket data not a json object"), null;
|
|
3213
3432
|
let r = n.event;
|
|
3214
|
-
if (!r) return
|
|
3215
|
-
if ("string" != typeof r) return
|
|
3433
|
+
if (!r) return or("parsing inter_event: no event"), null;
|
|
3434
|
+
if ("string" != typeof r) return or("parsing inter_event: event not a string"), null;
|
|
3216
3435
|
let l = n.kw;
|
|
3217
3436
|
return l ? l instanceof Object ? {
|
|
3218
3437
|
event: r,
|
|
3219
3438
|
kw: l || {}
|
|
3220
|
-
} : (
|
|
3439
|
+
} : (or("parsing inter_event: kw not a json object"), null) : (or("parsing inter_kw: no kw"), null);
|
|
3221
3440
|
}(0, n.data);
|
|
3222
|
-
if (
|
|
3223
|
-
let e =
|
|
3224
|
-
r ? r(e, o, 2, t) :
|
|
3441
|
+
if (hi(e)) {
|
|
3442
|
+
let e = Rt(Ot()) + " <== " + l, t = n.data.length, r = zt(Ot(), "trace_ievent_callback");
|
|
3443
|
+
r ? r(e, o, 2, t) : Oi(0, e, o);
|
|
3225
3444
|
}
|
|
3226
3445
|
let i = o.event, s = o.kw;
|
|
3227
3446
|
if ("ST_SESSION" !== cn(e)) {
|
|
3228
3447
|
if (dn(e, i, P.EVF_PUBLIC_EVENT)) {
|
|
3229
3448
|
if (!(yn(e, i, s, e) < 0)) return 0;
|
|
3230
|
-
} else
|
|
3231
|
-
return
|
|
3449
|
+
} else or(`${Dt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3450
|
+
return vi(e), -1;
|
|
3232
3451
|
}
|
|
3233
3452
|
o = null;
|
|
3234
|
-
let a =
|
|
3235
|
-
if (_.toLowerCase() !== Nt().toLowerCase()) return
|
|
3236
|
-
let c =
|
|
3453
|
+
let a = ql(e, s), u = Jl(e, s, bi), _ = pl(e, u, "dst_role", "");
|
|
3454
|
+
if (_.toLowerCase() !== Nt().toLowerCase()) return or(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3455
|
+
let c = pl(e, u, "dst_service", "");
|
|
3237
3456
|
if ("__subscribing__" === a) return -1;
|
|
3238
3457
|
if ("__unsubscribing__" === a) return -1;
|
|
3239
3458
|
if (dn(e, i, P.EVF_PUBLIC_EVENT)) return yn(e, i, s, e), 0;
|
|
3240
|
-
if (!
|
|
3241
|
-
let t =
|
|
3242
|
-
return t ? dn(t, i, P.EVF_PUBLIC_EVENT) ? (yn(t, i, s, e), 0) : (
|
|
3459
|
+
if (!el(c)) {
|
|
3460
|
+
let t = Ke(c, !1);
|
|
3461
|
+
return t ? dn(t, i, P.EVF_PUBLIC_EVENT) ? (yn(t, i, s, e), 0) : (or(`${Dt(e)}: Service found but no event or not public, service '${Dt(t)}', ev '${i}'`), -1) : (ir(`${Dt(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3243
3462
|
}
|
|
3244
|
-
return kt(e) ? yn(At(e), i, s, e) :
|
|
3463
|
+
return kt(e) ? yn(At(e), i, s, e) : Un(e, i, s), 0;
|
|
3245
3464
|
}
|
|
3246
|
-
function
|
|
3465
|
+
function Li(e, t, n, r) {
|
|
3247
3466
|
return 0;
|
|
3248
3467
|
}
|
|
3249
|
-
function
|
|
3468
|
+
function Ui(e, t, n, r) {
|
|
3250
3469
|
return 0;
|
|
3251
3470
|
}
|
|
3252
|
-
var
|
|
3471
|
+
var Pi = {
|
|
3253
3472
|
mt_create: function(e) {
|
|
3254
3473
|
let t = e.priv;
|
|
3255
|
-
t.gobj_timer = ot(
|
|
3474
|
+
t.gobj_timer = ot(Rt(e), "C_TIMER", {}, e), t.url = tn(e, "url"), t.remote_yuno_name = tn(e, "remote_yuno_name"), t.remote_yuno_role = tn(e, "remote_yuno_role"), t.remote_yuno_service = tn(e, "remote_yuno_service"), un(e, "wanted_yuno_name", t.remote_yuno_name), un(e, "wanted_yuno_role", t.remote_yuno_role), un(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
3256
3475
|
const n = nn(e, "subscriber");
|
|
3257
|
-
n &&
|
|
3476
|
+
n && $n(e, null, {}, n);
|
|
3258
3477
|
},
|
|
3259
3478
|
mt_writing: function(e, t) {
|
|
3260
3479
|
let n = e.priv;
|
|
@@ -3273,72 +3492,72 @@ var Ti = {
|
|
|
3273
3492
|
},
|
|
3274
3493
|
mt_start: function(e) {
|
|
3275
3494
|
let t = e.priv;
|
|
3276
|
-
return t.retry_ms = 0, t.websocket =
|
|
3495
|
+
return t.retry_ms = 0, t.websocket = yi(e), 0;
|
|
3277
3496
|
},
|
|
3278
3497
|
mt_stop: function(e) {
|
|
3279
3498
|
let t = e.priv;
|
|
3280
|
-
return
|
|
3499
|
+
return oi(t.gobj_timer), t.websocket && vi(e), 0;
|
|
3281
3500
|
},
|
|
3282
3501
|
mt_destroy: function(e) {},
|
|
3283
3502
|
mt_stats: function(e, t, n, r) {
|
|
3284
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3503
|
+
if ("ST_SESSION" !== cn(e)) return or("Not in session"), null;
|
|
3285
3504
|
n || (n = {});
|
|
3286
|
-
let l =
|
|
3287
|
-
return o || (o = {}),
|
|
3505
|
+
let l = wi(e, Rt(r), pl(e, n, "service", null, 0)), o = El(e, n, "__md_stats__", null, Vn.KW_EXTRACT);
|
|
3506
|
+
return o || (o = {}), Bl(e, n, "stats_stack", {
|
|
3288
3507
|
stats: t,
|
|
3289
3508
|
kw: o
|
|
3290
|
-
}),
|
|
3509
|
+
}), Bl(e, n, bi, l), n.__stats__ = t, Hl(e, n, "__stats__"), Ni(e, "EV_MT_STATS", n, r), null;
|
|
3291
3510
|
},
|
|
3292
3511
|
mt_command_parser: function(e, t, n, r) {
|
|
3293
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3512
|
+
if ("ST_SESSION" !== cn(e)) return or("Not in session"), null;
|
|
3294
3513
|
n || (n = {});
|
|
3295
|
-
let l =
|
|
3296
|
-
return o || (o = {}),
|
|
3514
|
+
let l = wi(e, Rt(r), pl(e, n, "service", "", 0)), o = El(e, n, "__md_command__", null, Vn.KW_EXTRACT);
|
|
3515
|
+
return o || (o = {}), Bl(e, n, "command_stack", {
|
|
3297
3516
|
command: t,
|
|
3298
3517
|
kw: o
|
|
3299
|
-
}),
|
|
3518
|
+
}), Bl(e, n, bi, l), n.__command__ = t, Hl(e, n, "__command__"), Ni(e, "EV_MT_COMMAND", n, r), null;
|
|
3300
3519
|
},
|
|
3301
3520
|
mt_inject_event: function(e, t, n, r) {
|
|
3302
3521
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3303
|
-
if (n = Object.assign({},
|
|
3522
|
+
if (n = Object.assign({}, Kr(n) ? n : {}), Kr(n.__md_iev__) && (n.__md_iev__ = wr(n.__md_iev__)), Jl(e, n, bi));
|
|
3304
3523
|
else {
|
|
3305
|
-
let l =
|
|
3306
|
-
|
|
3524
|
+
let l = wi(e, Rt(r), pl(e, n, "__service__", 0, 0));
|
|
3525
|
+
kr(n, "__service__"), Bl(e, n, "__message__", t), Bl(e, n, bi, l);
|
|
3307
3526
|
}
|
|
3308
|
-
return
|
|
3527
|
+
return Hl(e, n, "__message__"), Ni(e, t, n, r);
|
|
3309
3528
|
},
|
|
3310
3529
|
mt_subscription_added: function(e, t) {
|
|
3311
3530
|
let n = e.priv;
|
|
3312
|
-
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3531
|
+
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 : ji(e, t) : 0;
|
|
3313
3532
|
},
|
|
3314
3533
|
mt_subscription_deleted: function(e, t) {
|
|
3315
3534
|
let n = e.priv;
|
|
3316
3535
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3317
3536
|
if (n.inside_on_open) return 0;
|
|
3318
|
-
if (
|
|
3537
|
+
if (el(t.event)) return 0;
|
|
3319
3538
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3320
3539
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3321
|
-
return
|
|
3540
|
+
return Bl(e, r, bi, wi(e, Rt(a), s)), Hl(e, r, "__unsubscribing__"), Ni(e, t.event, r, e);
|
|
3322
3541
|
}
|
|
3323
3542
|
};
|
|
3324
|
-
function
|
|
3543
|
+
function Fi() {
|
|
3325
3544
|
return function(e) {
|
|
3326
|
-
if (
|
|
3545
|
+
if (Ti) return or(`GClass ALREADY created: ${e}`), -1;
|
|
3327
3546
|
const t = [
|
|
3328
3547
|
["ST_DISCONNECTED", [
|
|
3329
3548
|
[
|
|
3330
3549
|
"EV_ON_OPEN",
|
|
3331
|
-
|
|
3550
|
+
$i,
|
|
3332
3551
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3333
3552
|
],
|
|
3334
3553
|
[
|
|
3335
3554
|
"EV_ON_CLOSE",
|
|
3336
|
-
|
|
3555
|
+
Ai,
|
|
3337
3556
|
null
|
|
3338
3557
|
],
|
|
3339
3558
|
[
|
|
3340
3559
|
"EV_TIMEOUT",
|
|
3341
|
-
|
|
3560
|
+
Di,
|
|
3342
3561
|
null
|
|
3343
3562
|
],
|
|
3344
3563
|
[
|
|
@@ -3350,22 +3569,22 @@ function yi() {
|
|
|
3350
3569
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3351
3570
|
[
|
|
3352
3571
|
"EV_ON_MESSAGE",
|
|
3353
|
-
|
|
3572
|
+
Ci,
|
|
3354
3573
|
null
|
|
3355
3574
|
],
|
|
3356
3575
|
[
|
|
3357
3576
|
"EV_IDENTITY_CARD_ACK",
|
|
3358
|
-
|
|
3577
|
+
ki,
|
|
3359
3578
|
null
|
|
3360
3579
|
],
|
|
3361
3580
|
[
|
|
3362
3581
|
"EV_ON_CLOSE",
|
|
3363
|
-
|
|
3582
|
+
Ai,
|
|
3364
3583
|
"ST_DISCONNECTED"
|
|
3365
3584
|
],
|
|
3366
3585
|
[
|
|
3367
3586
|
"EV_TIMEOUT",
|
|
3368
|
-
|
|
3587
|
+
Ii,
|
|
3369
3588
|
null
|
|
3370
3589
|
],
|
|
3371
3590
|
[
|
|
@@ -3377,22 +3596,22 @@ function yi() {
|
|
|
3377
3596
|
["ST_SESSION", [
|
|
3378
3597
|
[
|
|
3379
3598
|
"EV_ON_MESSAGE",
|
|
3380
|
-
|
|
3599
|
+
Ci,
|
|
3381
3600
|
null
|
|
3382
3601
|
],
|
|
3383
3602
|
[
|
|
3384
3603
|
"EV_MT_STATS",
|
|
3385
|
-
|
|
3604
|
+
Li,
|
|
3386
3605
|
null
|
|
3387
3606
|
],
|
|
3388
3607
|
[
|
|
3389
3608
|
"EV_MT_COMMAND",
|
|
3390
|
-
|
|
3609
|
+
Ui,
|
|
3391
3610
|
null
|
|
3392
3611
|
],
|
|
3393
3612
|
[
|
|
3394
3613
|
"EV_ON_CLOSE",
|
|
3395
|
-
|
|
3614
|
+
Ai,
|
|
3396
3615
|
"ST_DISCONNECTED"
|
|
3397
3616
|
],
|
|
3398
3617
|
[
|
|
@@ -3403,7 +3622,7 @@ function yi() {
|
|
|
3403
3622
|
]],
|
|
3404
3623
|
[null, null]
|
|
3405
3624
|
];
|
|
3406
|
-
return (
|
|
3625
|
+
return (Ti = Ae(e, [
|
|
3407
3626
|
["EV_ON_MESSAGE", P.EVF_OUTPUT_EVENT],
|
|
3408
3627
|
["EV_IDENTITY_CARD_ACK", P.EVF_PUBLIC_EVENT],
|
|
3409
3628
|
["EV_ON_ID_NAK", P.EVF_PUBLIC_EVENT | P.EVF_OUTPUT_EVENT],
|
|
@@ -3414,9 +3633,9 @@ function yi() {
|
|
|
3414
3633
|
["EV_ON_OPEN_ERROR", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3415
3634
|
["EV_TIMEOUT", 0],
|
|
3416
3635
|
[null, 0]
|
|
3417
|
-
], t,
|
|
3636
|
+
], t, Pi, 0, pi, Ei, 0, 0, mi, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3418
3637
|
}("C_IEVENT_CLI");
|
|
3419
3638
|
}
|
|
3420
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ,
|
|
3639
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, w as SDATACM, R as SDATACM2, A as SDATADF, j as SDATAPM, $ as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response, No as build_path, s as build_stats_response, vo as clean_name, oi as clear_timeout, ol as cmp_two_simple_json, l as command_parser, fo as createElement2, co as createOneHtml, io as create_json_record, Qo as create_template_record, ho as current_timestamp, y as data_type_t, Go as db_list_persistent_attrs, Po as db_load_persistent_attrs, Vo as db_remove_persistent_attrs, Fo as db_save_persistent_attrs, So as debounce, xl as delete_from_list, Rr as duplicate_objects, xr as empty_json, el as empty_string, uo as escapeHtml, P as event_flag_t, Io as flat2json, Lo as flat_apply, Co as flat_diff, Do as flat_key_join, $o as flat_key_split, Ue as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ge as gclass_check_fsm, Ae as gclass_create, Ve as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, go as getPositionRelativeToBody, Oo as get_function_name, Eo as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Pn as gobj_command, it as gobj_create, et as gobj_create2, rt as gobj_create_default_service, ot as gobj_create_pure_child, nt as gobj_create_service, lt as gobj_create_volatil, tt as gobj_create_yuno, cn as gobj_current_state, xe as gobj_default_service, Tn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, Kt as gobj_find_gobj, Ke as gobj_find_service, Ln as gobj_find_subscribings, kn as gobj_find_subscriptions, L as gobj_flag_t, $t as gobj_full_name, jt as gobj_gclass_name, be as gobj_get_gclass_trace_level, pe as gobj_get_gclass_trace_level2, me as gobj_get_gclass_trace_no_level, ge as gobj_get_global_trace_level, de as gobj_get_global_trace_no_level, ue as gobj_global_trace_level, _e as gobj_global_trace_no_level, Qt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, je as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, Et as gobj_is_running, yt as gobj_is_service, It as gobj_is_volatil, ze as gobj_list_persistent_attrs, Cn as gobj_list_subscriptions, He as gobj_load_persistent_attrs, Jt as gobj_match_children, Ht as gobj_match_children_tree, Yt as gobj_match_gobj, Rt as gobj_name, At as gobj_parent, ht as gobj_pause, mt as gobj_play, hn as gobj_post_event, En as gobj_posted_events_size, Un as gobj_publish_event, zt as gobj_read_attr, Xt as gobj_read_attrs, Zt as gobj_read_bool_attr, en as gobj_read_integer_attr, nn as gobj_read_pointer_attr, tn as gobj_read_str_attr, Qe as gobj_remove_persistent_attrs, Oe as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, qe as gobj_save_persistent_attrs, qt as gobj_search_path, yn as gobj_send_event, We as gobj_services, Ut as gobj_set_bottom_gobj, he as gobj_set_deep_trace, ye as gobj_set_gclass_no_trace, Ee as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, Te as gobj_set_gobj_trace, x as gobj_set_trace_machine_format, Dt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Se as gobj_start_up, Fn as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, $n as gobj_subscribe_event, Z as gobj_trace_level, K as gobj_trace_machine_format, ee as gobj_trace_no_level, An as gobj_unsubscribe_event, In as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Vt as gobj_walk_gobj_children_tree, rn as gobj_write_attr, on as gobj_write_attrs, sn as gobj_write_bool_attr, an as gobj_write_integer_attr, un as gobj_write_str_attr, Ot as gobj_yuno, wt as gobj_yuno_id, St as gobj_yuno_name, Nt as gobj_yuno_role, Gl as id_index_in_obj_list, To as index_in_list, Yr as is_array, Hr as is_boolean, zr as is_date, Xr as is_function, Zr as is_gobj, sl as is_metadata_key, qr as is_null, Jr as is_number, Kr as is_object, al as is_private_key, Qr as is_pure_number, dr as is_secret_name, Br as is_string, to as jdb_delete, ro as jdb_get, lo as jdb_get_by_idx, no as jdb_get_topic, Zl as jdb_init, eo as jdb_update, Ao as json2flat, Ur as json_array_append, Pr as json_array_append_new, Vr as json_array_extend, Fr as json_array_remove, Mr as json_array_size, wr as json_deep_copy, jr as json_is_identical, Sr as json_mask_secrets, kr as json_object_del, Ir as json_object_get, Cr as json_object_set, Lr as json_object_set_new, Gr as json_object_size, Dr as json_object_update, $r as json_object_update_existing, Ar as json_object_update_missing, Wr as json_size, ao as jwt2json, so as jwtDecode, jl as kw_clone_by_keys, Dl as kw_clone_by_not_keys, Rl as kw_collect, fl as kw_delete, Nl as kw_find_json_in_list, cl as kw_find_path, Vn as kw_flag_t, gl as kw_get_bool, hl as kw_get_dict, El as kw_get_dict_value, dl as kw_get_int, Tl as kw_get_list, $l as kw_get_local_storage_value, ml as kw_get_pointer, bl as kw_get_real, pl as kw_get_str, _l as kw_has_key, Sl as kw_match_simple, ul as kw_pop, Il as kw_remove_local_storage_value, wl as kw_select, yl as kw_set_dict_value, Al as kw_set_local_storage_value, vl as kw_set_subdict_value, Cl as kwid_collect, Pl as kwid_find_one_record, Fl as kwid_get_ids, kl as kwid_match_id, Ll as kwid_new_dict, Ul as kwid_new_list, Vl as list2options, Ql as load_json_file, ar as log_debug, or as log_error, sr as log_info, ir as log_warning, Er as mask_secrets_inline, ql as msg_iev_get_msg_type, Jl as msg_iev_get_stack, Bl as msg_iev_push_stack, Kl as msg_iev_read_key, Hl as msg_iev_set_msg_type, Yl as msg_iev_write_key, yo as node_uuid, tl as parseBoolean, bo as parseSVG, po as refresh_language, Fi as register_c_ievent_cli, ni as register_c_timer, di as register_c_yuno, _o as safeSrc, v as sdata_flag_t, zl as send_http_json_post, Qn as set_console_log_enabled, Xn as set_console_log_filter, Hn as set_log_callback, rr as set_remote_log_functions, ri as set_timeout, li as set_timeout_periodic, t as sprintf, i as stats_parser, Ml as str_in_list, ll as strcasecmp, rl as strcmp, nl as strncmp, Wl as strs_in_list, il as strstr, qo as template_get_field_desc, mo as timeTracker, _r as trace_json, Nr as trace_json_masked, B as trace_level_t, ur as trace_msg, Wo as treedb_decoder_fkey, Ko as treedb_decoder_hook, xo as treedb_encoder_fkey, Ho as treedb_get_field_desc, Mo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3421
3640
|
|
|
3422
3641
|
//# sourceMappingURL=gobj-js.es.min.js.map
|