@yuneta/gobj-js 7.25.7 → 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 +35 -0
- package/dist/gobj-js.cjs.js +440 -66
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +1208 -988
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +437 -67
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +1225 -1005
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +440 -66
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1249 -1029
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +440 -66
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +1238 -1018
- 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
566
|
function je(e) {
|
|
568
567
|
return e.jn_attrs;
|
|
569
568
|
}
|
|
570
569
|
function De(e, t, n) {
|
|
571
|
-
return Qt(e, t) ? je(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n &&
|
|
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
|
-
})(je(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (
|
|
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
892
|
function jt(e) {
|
|
894
|
-
return
|
|
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
980
|
if (n && n !== jt(e)) return !1;
|
|
982
|
-
if (r && r !==
|
|
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,7 +1019,7 @@ 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) {
|
|
@@ -1031,16 +1030,16 @@ function Ht(e, t) {
|
|
|
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,20 +1100,20 @@ 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;
|
|
@@ -1124,42 +1123,42 @@ function on(e, t, n, r) {
|
|
|
1124
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 ? "" : "!!", jt(e),
|
|
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 ? "" : "!!", jt(e),
|
|
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 wn(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 jn(e,
|
|
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 jn(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++) wn(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 ? "" : "!!", jt(e),
|
|
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,36 +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
|
-
|
|
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;
|
|
1399
1443
|
if (!d) continue;
|
|
1400
1444
|
let b = gn(_, n, !0);
|
|
1401
1445
|
if (b && b.event_flag & P.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
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__) {
|
|
1405
1450
|
s = -1;
|
|
1406
1451
|
break;
|
|
1407
1452
|
}
|
|
1408
|
-
if (a +=
|
|
1453
|
+
if (a += m, s++, Ct(e)) break;
|
|
1409
1454
|
}
|
|
1410
1455
|
}
|
|
1411
|
-
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;
|
|
1412
1457
|
}
|
|
1413
|
-
function
|
|
1414
|
-
|
|
1458
|
+
function Pn(e, n, r, l) {
|
|
1459
|
+
if (Ct(e)) return or("gobj NULL or DESTROYED"), -1;
|
|
1460
|
+
if (function(e) {
|
|
1415
1461
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1416
|
-
}(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);
|
|
1417
1467
|
}
|
|
1418
|
-
function
|
|
1419
|
-
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);
|
|
1420
1470
|
}
|
|
1421
|
-
var
|
|
1471
|
+
var Vn = Object.freeze({
|
|
1422
1472
|
KW_REQUIRED: 1,
|
|
1423
1473
|
KW_CREATE: 2,
|
|
1424
1474
|
KW_WILD_NUMBER: 4,
|
|
@@ -1438,68 +1488,68 @@ Object.freeze({
|
|
|
1438
1488
|
JSON_FALSE: 7,
|
|
1439
1489
|
JSON_NULL: 8
|
|
1440
1490
|
});
|
|
1441
|
-
var
|
|
1442
|
-
function
|
|
1443
|
-
if ((e = "function" == typeof e ? e : null) && e !==
|
|
1444
|
-
|
|
1445
|
-
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()) {
|
|
1446
1496
|
let r = t;
|
|
1447
1497
|
if ("json" === e) try {
|
|
1448
1498
|
r = JSON.parse(t);
|
|
1449
1499
|
} catch (e) {
|
|
1450
1500
|
r = t;
|
|
1451
1501
|
}
|
|
1452
|
-
|
|
1502
|
+
nr(e, r, n);
|
|
1453
1503
|
}
|
|
1454
|
-
} else
|
|
1504
|
+
} else Yn = e;
|
|
1455
1505
|
}
|
|
1456
|
-
var
|
|
1457
|
-
function qn(e) {
|
|
1458
|
-
Jn = !!e;
|
|
1459
|
-
}
|
|
1460
|
-
var Hn = null;
|
|
1506
|
+
var qn = !0;
|
|
1461
1507
|
function Qn(e) {
|
|
1462
|
-
|
|
1508
|
+
qn = !!e;
|
|
1509
|
+
}
|
|
1510
|
+
var zn = null;
|
|
1511
|
+
function Xn(e) {
|
|
1512
|
+
zn = "function" == typeof e ? e : null;
|
|
1463
1513
|
}
|
|
1464
|
-
function
|
|
1465
|
-
if (!
|
|
1466
|
-
if (!
|
|
1514
|
+
function Zn(e, t) {
|
|
1515
|
+
if (!qn) return !1;
|
|
1516
|
+
if (!zn) return !0;
|
|
1467
1517
|
try {
|
|
1468
|
-
return !!
|
|
1518
|
+
return !!zn(e, t);
|
|
1469
1519
|
} catch (e) {
|
|
1470
1520
|
return !0;
|
|
1471
1521
|
}
|
|
1472
1522
|
}
|
|
1473
|
-
var
|
|
1474
|
-
function
|
|
1475
|
-
|
|
1523
|
+
var er = !1;
|
|
1524
|
+
function tr(e, t, n) {
|
|
1525
|
+
er || (function(e, t, n) {
|
|
1476
1526
|
let r = t;
|
|
1477
1527
|
if ("json" === e) try {
|
|
1478
1528
|
r = JSON.stringify(t);
|
|
1479
1529
|
} catch (e) {
|
|
1480
1530
|
r = String(t);
|
|
1481
1531
|
}
|
|
1482
|
-
|
|
1532
|
+
Jn.push([
|
|
1483
1533
|
e,
|
|
1484
1534
|
r,
|
|
1485
1535
|
n
|
|
1486
|
-
]),
|
|
1487
|
-
}(e, t, n),
|
|
1536
|
+
]), Jn.length > Bn && Jn.shift();
|
|
1537
|
+
}(e, t, n), nr(e, t, n));
|
|
1488
1538
|
}
|
|
1489
|
-
function
|
|
1490
|
-
if (
|
|
1491
|
-
|
|
1539
|
+
function nr(e, t, n) {
|
|
1540
|
+
if (Yn && !er) {
|
|
1541
|
+
er = !0;
|
|
1492
1542
|
try {
|
|
1493
|
-
|
|
1543
|
+
Yn(e, t, n);
|
|
1494
1544
|
} catch (e) {} finally {
|
|
1495
|
-
|
|
1545
|
+
er = !1;
|
|
1496
1546
|
}
|
|
1497
1547
|
}
|
|
1498
1548
|
}
|
|
1499
|
-
function
|
|
1500
|
-
e ? (
|
|
1549
|
+
function rr(e) {
|
|
1550
|
+
e ? (Mn = e, Wn = e) : (Mn = Gn.error, Wn = Gn.warn);
|
|
1501
1551
|
}
|
|
1502
|
-
function
|
|
1552
|
+
function lr(e) {
|
|
1503
1553
|
const t = Array.prototype.slice.call(arguments);
|
|
1504
1554
|
let n = "";
|
|
1505
1555
|
if ("string" == typeof e) {
|
|
@@ -1521,33 +1571,203 @@ function nr(e) {
|
|
|
1521
1571
|
} else n = t.map((e) => "object" == typeof e ? JSON.stringify(e) : String(e)).join(" ");
|
|
1522
1572
|
return n;
|
|
1523
1573
|
}
|
|
1524
|
-
function rr(e) {
|
|
1525
|
-
let t = nr(e), n = eo();
|
|
1526
|
-
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);
|
|
1527
|
-
}
|
|
1528
|
-
function lr(e) {
|
|
1529
|
-
let t = nr(e), n = eo();
|
|
1530
|
-
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);
|
|
1531
|
-
}
|
|
1532
1574
|
function or(e) {
|
|
1533
|
-
let t =
|
|
1534
|
-
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);
|
|
1535
1577
|
}
|
|
1536
1578
|
function ir(e) {
|
|
1537
|
-
let t =
|
|
1538
|
-
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);
|
|
1539
1581
|
}
|
|
1540
1582
|
function sr(e) {
|
|
1541
|
-
let t =
|
|
1542
|
-
|
|
1583
|
+
let t = lr(e), n = ho();
|
|
1584
|
+
xn && Zn("info", t) && xn("%c" + n + " INFO: " + String(t), "color:cyan"), tr("info", t, n);
|
|
1543
1585
|
}
|
|
1544
|
-
function ar(e
|
|
1545
|
-
|
|
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);
|
|
1546
1589
|
}
|
|
1547
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) {
|
|
1548
1768
|
return structuredClone(e);
|
|
1549
1769
|
}
|
|
1550
|
-
function
|
|
1770
|
+
function Rr(...e) {
|
|
1551
1771
|
const t = {};
|
|
1552
1772
|
for (const n of e) {
|
|
1553
1773
|
const e = structuredClone(n);
|
|
@@ -1555,14 +1775,14 @@ function _r(...e) {
|
|
|
1555
1775
|
}
|
|
1556
1776
|
return t;
|
|
1557
1777
|
}
|
|
1558
|
-
function
|
|
1778
|
+
function jr(e, t) {
|
|
1559
1779
|
if (e === t) return !0;
|
|
1560
1780
|
if (null === e || null === t) return e === t;
|
|
1561
1781
|
if (typeof e != typeof t) return !1;
|
|
1562
1782
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1563
1783
|
if (Array.isArray(e)) {
|
|
1564
1784
|
if (e.length !== t.length) return !1;
|
|
1565
|
-
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;
|
|
1566
1786
|
return !0;
|
|
1567
1787
|
}
|
|
1568
1788
|
if ("object" == typeof e) {
|
|
@@ -1570,297 +1790,297 @@ function cr(e, t) {
|
|
|
1570
1790
|
if (n.length !== r.length) return !1;
|
|
1571
1791
|
for (let l = 0; l < n.length; l++) {
|
|
1572
1792
|
if (n[l] !== r[l]) return !1;
|
|
1573
|
-
if (!
|
|
1793
|
+
if (!jr(e[n[l]], t[r[l]])) return !1;
|
|
1574
1794
|
}
|
|
1575
1795
|
return !0;
|
|
1576
1796
|
}
|
|
1577
1797
|
return e === t;
|
|
1578
1798
|
}
|
|
1579
|
-
function
|
|
1799
|
+
function Dr(e, t) {
|
|
1580
1800
|
if (!t) return e;
|
|
1581
1801
|
for (let n of Object.keys(t)) e[n] = t[n];
|
|
1582
1802
|
return e;
|
|
1583
1803
|
}
|
|
1584
|
-
function
|
|
1804
|
+
function $r(e, t) {
|
|
1585
1805
|
if (!t) return e;
|
|
1586
1806
|
for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1587
1807
|
return e;
|
|
1588
1808
|
}
|
|
1589
|
-
function
|
|
1809
|
+
function Ar(e, t) {
|
|
1590
1810
|
if (!t) return e;
|
|
1591
1811
|
for (let n in t) t.hasOwnProperty(n) && !e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1592
1812
|
return e;
|
|
1593
1813
|
}
|
|
1594
|
-
function
|
|
1814
|
+
function Ir(e, t) {
|
|
1595
1815
|
if (e && e.hasOwnProperty(t)) return e[t];
|
|
1596
1816
|
}
|
|
1597
|
-
function
|
|
1817
|
+
function kr(e, t) {
|
|
1598
1818
|
e && e.hasOwnProperty(t) && delete e[t];
|
|
1599
1819
|
}
|
|
1600
|
-
function
|
|
1820
|
+
function Cr(e, t, n) {
|
|
1601
1821
|
e[t] = n;
|
|
1602
1822
|
}
|
|
1603
|
-
function
|
|
1823
|
+
function Lr(e, t, n) {
|
|
1604
1824
|
e[t] = n;
|
|
1605
1825
|
}
|
|
1606
|
-
function
|
|
1826
|
+
function Ur(e, t) {
|
|
1607
1827
|
e.push(t);
|
|
1608
1828
|
}
|
|
1609
|
-
function
|
|
1829
|
+
function Pr(e, t) {
|
|
1610
1830
|
e.push(t);
|
|
1611
1831
|
}
|
|
1612
|
-
function
|
|
1832
|
+
function Fr(e, t) {
|
|
1613
1833
|
e.splice(t, 1);
|
|
1614
1834
|
}
|
|
1615
|
-
function
|
|
1835
|
+
function Vr(e, t) {
|
|
1616
1836
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1617
1837
|
}
|
|
1618
|
-
function
|
|
1619
|
-
return
|
|
1838
|
+
function Gr(e) {
|
|
1839
|
+
return Kr(e) ? Object.keys(e).length : 0;
|
|
1620
1840
|
}
|
|
1621
|
-
function
|
|
1622
|
-
return
|
|
1841
|
+
function Mr(e) {
|
|
1842
|
+
return Yr(e) ? e.length : 0;
|
|
1623
1843
|
}
|
|
1624
|
-
function
|
|
1625
|
-
return
|
|
1844
|
+
function Wr(e) {
|
|
1845
|
+
return Kr(e) ? Object.keys(e).length : Yr(e) ? e.length : Br(e) && e.length > 0 ? 1 : 0;
|
|
1626
1846
|
}
|
|
1627
|
-
function
|
|
1628
|
-
return 0 ===
|
|
1847
|
+
function xr(e) {
|
|
1848
|
+
return 0 === Wr(e);
|
|
1629
1849
|
}
|
|
1630
|
-
function
|
|
1850
|
+
function Kr(e) {
|
|
1631
1851
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1632
1852
|
}
|
|
1633
|
-
function
|
|
1853
|
+
function Yr(e) {
|
|
1634
1854
|
return Array.isArray(e);
|
|
1635
1855
|
}
|
|
1636
|
-
function
|
|
1856
|
+
function Br(e) {
|
|
1637
1857
|
return "string" == typeof e;
|
|
1638
1858
|
}
|
|
1639
|
-
function
|
|
1859
|
+
function Jr(e) {
|
|
1640
1860
|
return "number" == typeof e && Number.isFinite(e);
|
|
1641
1861
|
}
|
|
1642
|
-
function
|
|
1862
|
+
function Hr(e) {
|
|
1643
1863
|
return "boolean" == typeof e;
|
|
1644
1864
|
}
|
|
1645
|
-
function
|
|
1865
|
+
function qr(e) {
|
|
1646
1866
|
return null == e;
|
|
1647
1867
|
}
|
|
1648
|
-
function
|
|
1649
|
-
if (
|
|
1650
|
-
if (!
|
|
1868
|
+
function Qr(e) {
|
|
1869
|
+
if (Jr(e)) return !0;
|
|
1870
|
+
if (!Br(e)) return !1;
|
|
1651
1871
|
const t = Number(e);
|
|
1652
1872
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1653
1873
|
}
|
|
1654
|
-
function
|
|
1874
|
+
function zr(e) {
|
|
1655
1875
|
return e instanceof Date && !isNaN(e);
|
|
1656
1876
|
}
|
|
1657
|
-
function
|
|
1877
|
+
function Xr(e) {
|
|
1658
1878
|
return "function" == typeof e;
|
|
1659
1879
|
}
|
|
1660
|
-
function
|
|
1880
|
+
function Zr(e) {
|
|
1661
1881
|
return e instanceof k;
|
|
1662
1882
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return !
|
|
1883
|
+
function el(e) {
|
|
1884
|
+
return !Br(e) || 0 === e.length;
|
|
1665
1885
|
}
|
|
1666
|
-
function
|
|
1667
|
-
return
|
|
1886
|
+
function tl(e) {
|
|
1887
|
+
return Jr(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1668
1888
|
}
|
|
1669
|
-
function
|
|
1889
|
+
function nl(e, t, n) {
|
|
1670
1890
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1671
1891
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1672
1892
|
}
|
|
1673
|
-
function
|
|
1893
|
+
function rl(e, t) {
|
|
1674
1894
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1675
1895
|
}
|
|
1676
|
-
function
|
|
1896
|
+
function ll(e, t) {
|
|
1677
1897
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1678
1898
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1679
1899
|
}
|
|
1680
|
-
function
|
|
1681
|
-
if (
|
|
1682
|
-
if (
|
|
1900
|
+
function ol(e, t) {
|
|
1901
|
+
if (Kr(e) || Kr(t) || Yr(e) || Yr(t)) return 0;
|
|
1902
|
+
if (Jr(e) || Jr(t)) {
|
|
1683
1903
|
let n = Number(e), r = Number(t);
|
|
1684
1904
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1685
1905
|
}
|
|
1686
|
-
if (
|
|
1906
|
+
if (Hr(e) || Hr(t)) {
|
|
1687
1907
|
let n = Number(e), r = Number(t);
|
|
1688
1908
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1689
1909
|
}
|
|
1690
|
-
return
|
|
1910
|
+
return rl(String(e), String(t));
|
|
1691
1911
|
}
|
|
1692
|
-
function
|
|
1912
|
+
function il(e, t, n) {
|
|
1693
1913
|
var r;
|
|
1694
1914
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
1695
1915
|
}
|
|
1696
|
-
function
|
|
1697
|
-
if (!
|
|
1698
|
-
let t;
|
|
1699
|
-
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++);
|
|
1700
1920
|
return 2 === t;
|
|
1701
1921
|
}
|
|
1702
|
-
function
|
|
1703
|
-
if (!
|
|
1704
|
-
let t;
|
|
1705
|
-
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++);
|
|
1706
1926
|
return 1 === t;
|
|
1707
1927
|
}
|
|
1708
|
-
function
|
|
1709
|
-
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);
|
|
1710
1930
|
else "string" == typeof t && delete e[t];
|
|
1711
1931
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1712
1932
|
}
|
|
1713
|
-
function
|
|
1933
|
+
function _l(e, t) {
|
|
1714
1934
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1715
1935
|
}
|
|
1716
|
-
function
|
|
1717
|
-
e && !
|
|
1936
|
+
function cl(e, t, n, r) {
|
|
1937
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1718
1938
|
const l = e ? `${Dt(e)}: ` : "";
|
|
1719
|
-
if (!
|
|
1720
|
-
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)}`);
|
|
1721
1941
|
let o = n.split("`"), i = o.length;
|
|
1722
1942
|
for (let e = 0; e < i - 1; e++) {
|
|
1723
|
-
if (null == (t = t[o[e]])) return void (r &&
|
|
1724
|
-
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}'`);
|
|
1725
1945
|
}
|
|
1726
1946
|
let s = t[o[i - 1]];
|
|
1727
|
-
return void 0 === s && r &&
|
|
1947
|
+
return void 0 === s && r && or(`${l}path not found: '${n}'`), s;
|
|
1728
1948
|
}
|
|
1729
|
-
function
|
|
1730
|
-
e && !
|
|
1949
|
+
function fl(e, t, n) {
|
|
1950
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1731
1951
|
let [r, l] = function(e, t) {
|
|
1732
1952
|
let n = e.lastIndexOf(t);
|
|
1733
1953
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
1734
1954
|
}(n, "`");
|
|
1735
|
-
return
|
|
1955
|
+
return el(l) ? kr(t, n) : kr(cl(e, t, r, !0), l), 0;
|
|
1736
1956
|
}
|
|
1737
|
-
function
|
|
1738
|
-
e && !
|
|
1739
|
-
let o =
|
|
1740
|
-
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;
|
|
1741
1961
|
if (void 0 === o) {
|
|
1742
1962
|
if (s && t) {
|
|
1743
1963
|
let l = Boolean(r);
|
|
1744
|
-
return
|
|
1964
|
+
return yl(e, t, n, l), l;
|
|
1745
1965
|
}
|
|
1746
|
-
return i && (
|
|
1966
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), Boolean(r);
|
|
1747
1967
|
}
|
|
1748
1968
|
let _;
|
|
1749
|
-
if (
|
|
1750
|
-
else if (u &&
|
|
1751
|
-
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);
|
|
1752
1972
|
else {
|
|
1753
|
-
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));
|
|
1754
1974
|
_ = !1;
|
|
1755
1975
|
}
|
|
1756
|
-
return a &&
|
|
1976
|
+
return a && fl(e, t, n), _;
|
|
1757
1977
|
}
|
|
1758
|
-
function
|
|
1759
|
-
e && !
|
|
1760
|
-
let o =
|
|
1761
|
-
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;
|
|
1762
1982
|
if (void 0 === o) {
|
|
1763
1983
|
if (s && t) {
|
|
1764
1984
|
let l = parseInt(r);
|
|
1765
|
-
return
|
|
1985
|
+
return yl(e, t, n, l), l;
|
|
1766
1986
|
}
|
|
1767
|
-
return i && (
|
|
1987
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), parseInt(r);
|
|
1768
1988
|
}
|
|
1769
1989
|
let _;
|
|
1770
|
-
if (
|
|
1990
|
+
if (Jr(o)) _ = Math.trunc(o);
|
|
1771
1991
|
else {
|
|
1772
|
-
if (!u) return
|
|
1773
|
-
if (
|
|
1774
|
-
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) {
|
|
1775
1995
|
const t = /^\s*([+-]?)(0[xX][0-9a-fA-F]+|0[0-7]*|[1-9][0-9]*)/.exec(e);
|
|
1776
1996
|
if (!t) return 0;
|
|
1777
1997
|
let n, r = t[2];
|
|
1778
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;
|
|
1779
1999
|
}(o);
|
|
1780
2000
|
else {
|
|
1781
|
-
if (null !== o) return
|
|
2001
|
+
if (null !== o) return or(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Nr(t), 0;
|
|
1782
2002
|
_ = 0;
|
|
1783
2003
|
}
|
|
1784
2004
|
}
|
|
1785
|
-
return a &&
|
|
2005
|
+
return a && fl(e, t, n), _;
|
|
1786
2006
|
}
|
|
1787
|
-
function
|
|
1788
|
-
e && !
|
|
1789
|
-
let o =
|
|
1790
|
-
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;
|
|
1791
2011
|
if (void 0 === o) {
|
|
1792
2012
|
if (s && t) {
|
|
1793
2013
|
let l = Number(r);
|
|
1794
|
-
return
|
|
2014
|
+
return yl(e, t, n, l), l;
|
|
1795
2015
|
}
|
|
1796
|
-
return i && (
|
|
2016
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), Number(r);
|
|
1797
2017
|
}
|
|
1798
2018
|
let _;
|
|
1799
|
-
if (
|
|
2019
|
+
if (Jr(o)) _ = o;
|
|
1800
2020
|
else {
|
|
1801
|
-
if (!u) return
|
|
1802
|
-
if (
|
|
1803
|
-
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);
|
|
1804
2024
|
else {
|
|
1805
|
-
if (null !== o) return
|
|
2025
|
+
if (null !== o) return or(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Nr(t), 0;
|
|
1806
2026
|
_ = 0;
|
|
1807
2027
|
}
|
|
1808
2028
|
}
|
|
1809
|
-
return a &&
|
|
2029
|
+
return a && fl(e, t, n), _;
|
|
1810
2030
|
}
|
|
1811
|
-
function
|
|
1812
|
-
e && !
|
|
1813
|
-
let o =
|
|
1814
|
-
const i = l && l &
|
|
1815
|
-
return void 0 === o ? s && t ? (
|
|
1816
|
-
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;
|
|
1817
2037
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1818
|
-
if (!
|
|
2038
|
+
if (!Kr(r) && !Yr(r)) return !1;
|
|
1819
2039
|
r = r[n[e]];
|
|
1820
2040
|
}
|
|
1821
|
-
return !(!
|
|
1822
|
-
}(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);
|
|
1823
2043
|
}
|
|
1824
|
-
function
|
|
1825
|
-
e && !
|
|
1826
|
-
let o =
|
|
1827
|
-
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;
|
|
1828
2048
|
if (void 0 === o) {
|
|
1829
2049
|
if (s) {
|
|
1830
2050
|
let l = r;
|
|
1831
|
-
return
|
|
2051
|
+
return yl(e, t, n, l), l;
|
|
1832
2052
|
}
|
|
1833
|
-
return i && (
|
|
2053
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), r;
|
|
1834
2054
|
}
|
|
1835
|
-
return a &&
|
|
2055
|
+
return a && fl(e, t, n), o;
|
|
1836
2056
|
}
|
|
1837
|
-
function
|
|
1838
|
-
e && !
|
|
1839
|
-
let o =
|
|
1840
|
-
const i = l && l &
|
|
1841
|
-
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);
|
|
1842
2062
|
}
|
|
1843
|
-
function
|
|
1844
|
-
e && !
|
|
1845
|
-
let o =
|
|
1846
|
-
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;
|
|
1847
2067
|
if (void 0 === o) {
|
|
1848
2068
|
if (s) {
|
|
1849
2069
|
let l = r;
|
|
1850
|
-
return
|
|
2070
|
+
return yl(e, t, n, l), l;
|
|
1851
2071
|
}
|
|
1852
|
-
return i && (
|
|
2072
|
+
return i && (or(`path not found: '${n}'`), Nr(t)), r;
|
|
1853
2073
|
}
|
|
1854
|
-
return a &&
|
|
2074
|
+
return a && fl(e, t, n), o;
|
|
1855
2075
|
}
|
|
1856
|
-
function
|
|
1857
|
-
e && !
|
|
1858
|
-
let o =
|
|
1859
|
-
const i = l && l &
|
|
1860
|
-
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);
|
|
1861
2081
|
}
|
|
1862
|
-
function
|
|
1863
|
-
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;
|
|
1864
2084
|
let l = n.split("`");
|
|
1865
2085
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1866
2086
|
let o = l.length;
|
|
@@ -1870,40 +2090,40 @@ function ll(e, t, n, r) {
|
|
|
1870
2090
|
else {
|
|
1871
2091
|
let r = t[s];
|
|
1872
2092
|
if (void 0 === r) t[s] = {};
|
|
1873
|
-
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;
|
|
1874
2094
|
t = t[s];
|
|
1875
2095
|
}
|
|
1876
2096
|
}
|
|
1877
2097
|
return 0;
|
|
1878
2098
|
}
|
|
1879
|
-
function
|
|
1880
|
-
if (e && !
|
|
1881
|
-
let o =
|
|
1882
|
-
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);
|
|
1883
2103
|
}
|
|
1884
|
-
function
|
|
2104
|
+
function Ol(e, n, r) {
|
|
1885
2105
|
let l = "", o = !1;
|
|
1886
|
-
if (
|
|
2106
|
+
if (Yr(n)) {
|
|
1887
2107
|
o = !1;
|
|
1888
2108
|
for (let i = 0; i < n.length; i++) {
|
|
1889
2109
|
let s = n[i];
|
|
1890
|
-
if (l =
|
|
2110
|
+
if (l = el(r) ? t("%s", r) : t("%s`%d", r, i), o = Ol(e, s, l), o) break;
|
|
1891
2111
|
}
|
|
1892
|
-
} else if (
|
|
2112
|
+
} else if (Kr(n)) {
|
|
1893
2113
|
o = !0;
|
|
1894
2114
|
let i = Object.keys(n);
|
|
1895
2115
|
for (let s = 0; s < i.length; s++) {
|
|
1896
2116
|
let a = i[s], u = n[a];
|
|
1897
|
-
if (l =
|
|
1898
|
-
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;
|
|
1899
2119
|
continue;
|
|
1900
2120
|
}
|
|
1901
|
-
let _ =
|
|
1902
|
-
if (_ || (_ =
|
|
2121
|
+
let _ = El(0, e, l, 0, 0);
|
|
2122
|
+
if (_ || (_ = Ir(e, l)), !_) {
|
|
1903
2123
|
o = !1;
|
|
1904
2124
|
break;
|
|
1905
2125
|
}
|
|
1906
|
-
if (0 !==
|
|
2126
|
+
if (0 !== ol(_, u)) {
|
|
1907
2127
|
o = !1;
|
|
1908
2128
|
break;
|
|
1909
2129
|
}
|
|
@@ -1911,91 +2131,91 @@ function il(e, n, r) {
|
|
|
1911
2131
|
}
|
|
1912
2132
|
return o;
|
|
1913
2133
|
}
|
|
1914
|
-
function
|
|
1915
|
-
return 0 ===
|
|
2134
|
+
function Sl(e, t) {
|
|
2135
|
+
return 0 === Wr(t) || Ol(e, t, "");
|
|
1916
2136
|
}
|
|
1917
|
-
function
|
|
1918
|
-
if (!n || !
|
|
1919
|
-
for (let e = 0; e < t.length; e++) if (
|
|
1920
|
-
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;
|
|
1921
2141
|
}
|
|
1922
|
-
function
|
|
1923
|
-
if (e && !
|
|
1924
|
-
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);
|
|
1925
2145
|
let l = [];
|
|
1926
|
-
if (
|
|
2146
|
+
if (Yr(t)) for (let e = 0; e < t.length; e++) {
|
|
1927
2147
|
let o = t[e];
|
|
1928
|
-
r(o, n) && l.push(
|
|
2148
|
+
r(o, n) && l.push(wr(o));
|
|
1929
2149
|
}
|
|
1930
2150
|
else {
|
|
1931
|
-
if (!
|
|
1932
|
-
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));
|
|
1933
2153
|
}
|
|
1934
2154
|
return l;
|
|
1935
2155
|
}
|
|
1936
|
-
function
|
|
1937
|
-
if (e && !
|
|
1938
|
-
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);
|
|
1939
2159
|
let l = [];
|
|
1940
|
-
if (
|
|
2160
|
+
if (Yr(t)) for (let e = 0; e < t.length; e++) {
|
|
1941
2161
|
let o = t[e];
|
|
1942
2162
|
r(o, n) && l.push(o);
|
|
1943
2163
|
}
|
|
1944
2164
|
else {
|
|
1945
|
-
if (!
|
|
2165
|
+
if (!Kr(t)) return or("kw_select() BAD kw parameter"), null;
|
|
1946
2166
|
r(t, n) && l.push(t);
|
|
1947
2167
|
}
|
|
1948
2168
|
return l;
|
|
1949
2169
|
}
|
|
1950
|
-
function
|
|
1951
|
-
e && !
|
|
2170
|
+
function jl(e, t, n, r) {
|
|
2171
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
1952
2172
|
let l = {};
|
|
1953
|
-
if (
|
|
2173
|
+
if (Br(n) && !el(n)) {
|
|
1954
2174
|
let o = n;
|
|
1955
|
-
t.hasOwnProperty(o) ? l[o] = t[o] : r &&
|
|
1956
|
-
} 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}`);
|
|
1957
2177
|
else {
|
|
1958
|
-
if (!(
|
|
2178
|
+
if (!(Yr(n) && Mr(n) > 0)) return t;
|
|
1959
2179
|
for (let o = 0; o < n.length; o++) {
|
|
1960
2180
|
let i = n[o];
|
|
1961
|
-
t.hasOwnProperty(i) ? l[i] = t[i] : r &&
|
|
2181
|
+
t.hasOwnProperty(i) ? l[i] = t[i] : r && or(`${Dt(e)}: key not found: ${i}`);
|
|
1962
2182
|
}
|
|
1963
2183
|
}
|
|
1964
2184
|
return l;
|
|
1965
2185
|
}
|
|
1966
|
-
function
|
|
2186
|
+
function Dl(e, t, n, r) {
|
|
1967
2187
|
let l = {};
|
|
1968
|
-
if (
|
|
2188
|
+
if (Dr(l, t), Br(n) && !el(n)) {
|
|
1969
2189
|
let o = n;
|
|
1970
|
-
|
|
1971
|
-
} 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}`);
|
|
1972
2192
|
else {
|
|
1973
|
-
if (!(
|
|
2193
|
+
if (!(Yr(n) && Mr(n) > 0)) return {};
|
|
1974
2194
|
for (let o = 0; o < n.length; o++) {
|
|
1975
2195
|
let i = n[o];
|
|
1976
|
-
t.hasOwnProperty(i) ?
|
|
2196
|
+
t.hasOwnProperty(i) ? kr(l, i) : r && or(`${Dt(e)}: key not found: ${i}`);
|
|
1977
2197
|
}
|
|
1978
2198
|
}
|
|
1979
2199
|
return l;
|
|
1980
2200
|
}
|
|
1981
|
-
function
|
|
2201
|
+
function $l(e, t, n = !1) {
|
|
1982
2202
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
1983
2203
|
let r = window.localStorage.getItem(e);
|
|
1984
|
-
return null === r ? (n &&
|
|
2204
|
+
return null === r ? (n && Al(e, t), t) : JSON.parse(r);
|
|
1985
2205
|
} catch (n) {
|
|
1986
2206
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
1987
2207
|
}
|
|
1988
2208
|
}
|
|
1989
|
-
function
|
|
2209
|
+
function Al(e, t) {
|
|
1990
2210
|
if ("undefined" == typeof window || !window.localStorage) return 0;
|
|
1991
|
-
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;
|
|
1992
2212
|
try {
|
|
1993
2213
|
return window.localStorage.setItem(e, JSON.stringify(t)), 0;
|
|
1994
2214
|
} catch (t) {
|
|
1995
|
-
return
|
|
2215
|
+
return or(`kw_set_local_storage_value(): cannot save "${e}" (storage full or blocked?): ${t && t.message ? t.message : t}`), -1;
|
|
1996
2216
|
}
|
|
1997
2217
|
}
|
|
1998
|
-
function
|
|
2218
|
+
function Il(e) {
|
|
1999
2219
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
2000
2220
|
window.localStorage.removeItem(e);
|
|
2001
2221
|
} catch (t) {
|
|
@@ -2003,125 +2223,125 @@ function bl(e) {
|
|
|
2003
2223
|
}
|
|
2004
2224
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
2005
2225
|
}
|
|
2006
|
-
function
|
|
2007
|
-
if (
|
|
2008
|
-
if (
|
|
2226
|
+
function kl(e, t) {
|
|
2227
|
+
if (qr(e) || qr(t)) return !0;
|
|
2228
|
+
if (Yr(e)) {
|
|
2009
2229
|
if (0 === e.length) return !0;
|
|
2010
2230
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2011
|
-
} else if (
|
|
2231
|
+
} else if (Kr(e)) {
|
|
2012
2232
|
if (0 === Object.keys(e).length) return !0;
|
|
2013
2233
|
for (let n in e) if (n === t) return !0;
|
|
2014
|
-
} else if (
|
|
2234
|
+
} else if (Br(e) && e === t) return !0;
|
|
2015
2235
|
return !1;
|
|
2016
2236
|
}
|
|
2017
|
-
function
|
|
2018
|
-
if (e && !
|
|
2019
|
-
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);
|
|
2020
2240
|
let o = [];
|
|
2021
|
-
if (
|
|
2241
|
+
if (Yr(t)) for (let i = 0; i < t.length; i++) {
|
|
2022
2242
|
let s, a = t[i];
|
|
2023
|
-
if (
|
|
2243
|
+
if (Kr(a)) s = pl(e, a, "id", "", 0);
|
|
2024
2244
|
else {
|
|
2025
|
-
if (!
|
|
2245
|
+
if (!Br(a)) continue;
|
|
2026
2246
|
s = a;
|
|
2027
2247
|
}
|
|
2028
|
-
|
|
2248
|
+
kl(n, s) && l(a, r) && o.push(a);
|
|
2029
2249
|
}
|
|
2030
2250
|
else {
|
|
2031
|
-
if (!
|
|
2251
|
+
if (!Kr(t)) return or("kw_collect() BAD kw parameter"), null;
|
|
2032
2252
|
for (let e of Object.keys(t)) {
|
|
2033
2253
|
let i = t[e];
|
|
2034
|
-
|
|
2254
|
+
kl(n, e) && l(i, r) && o.push(i);
|
|
2035
2255
|
}
|
|
2036
2256
|
}
|
|
2037
2257
|
return o;
|
|
2038
2258
|
}
|
|
2039
|
-
function
|
|
2040
|
-
e && !
|
|
2259
|
+
function Ll(e, t, n) {
|
|
2260
|
+
e && !Zr(e) && or("GObj bad instanceof");
|
|
2041
2261
|
let r = {};
|
|
2042
|
-
if (
|
|
2043
|
-
else if (
|
|
2044
|
-
let l = t[n], o =
|
|
2045
|
-
|
|
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);
|
|
2046
2266
|
}
|
|
2047
|
-
else
|
|
2267
|
+
else or(`${Dt(e)} kwid_new_dict: data type unknown`);
|
|
2048
2268
|
return r;
|
|
2049
2269
|
}
|
|
2050
|
-
function
|
|
2051
|
-
if (e && !
|
|
2052
|
-
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)) {
|
|
2053
2273
|
let n = [];
|
|
2054
2274
|
for (let r of Object.keys(t)) {
|
|
2055
2275
|
let l = t[r];
|
|
2056
|
-
|
|
2276
|
+
Kr(l) ? (l.id = r, n.push(l)) : or(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2057
2277
|
}
|
|
2058
2278
|
return n;
|
|
2059
2279
|
}
|
|
2060
|
-
return
|
|
2280
|
+
return or(`${Dt(e)} kwid_new_list: wrong type for list`), [];
|
|
2061
2281
|
}
|
|
2062
|
-
function
|
|
2063
|
-
e && !
|
|
2064
|
-
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);
|
|
2065
2285
|
return o && 0 !== o.length ? o[0] : null;
|
|
2066
2286
|
}
|
|
2067
|
-
function
|
|
2068
|
-
if (e && !
|
|
2287
|
+
function Fl(e, t) {
|
|
2288
|
+
if (e && !Zr(e) && or("GObj bad instanceof"), !t) return [];
|
|
2069
2289
|
let n = [];
|
|
2070
|
-
if (
|
|
2071
|
-
else if (
|
|
2072
|
-
else
|
|
2073
|
-
if (
|
|
2074
|
-
else if (
|
|
2075
|
-
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);
|
|
2076
2296
|
r && n.push(r);
|
|
2077
2297
|
}
|
|
2078
2298
|
});
|
|
2079
2299
|
return n;
|
|
2080
2300
|
}
|
|
2081
|
-
function
|
|
2301
|
+
function Vl(e, t, n) {
|
|
2082
2302
|
t = t || "id", n = n || "value";
|
|
2083
2303
|
let r = [];
|
|
2084
|
-
if (
|
|
2304
|
+
if (Yr(e)) for (let l = 0; l < e.length; l++) {
|
|
2085
2305
|
let o = e[l];
|
|
2086
|
-
if (
|
|
2306
|
+
if (Br(o)) r.push({
|
|
2087
2307
|
id: e[l],
|
|
2088
2308
|
value: e[l]
|
|
2089
2309
|
});
|
|
2090
|
-
else if (
|
|
2310
|
+
else if (Kr(o)) {
|
|
2091
2311
|
let e = {};
|
|
2092
|
-
if (
|
|
2093
|
-
if (!
|
|
2094
|
-
if (!(
|
|
2095
|
-
|
|
2312
|
+
if (_l(o, t)) {
|
|
2313
|
+
if (!_l(o, n)) {
|
|
2314
|
+
if (!(Wr(o) > 0)) {
|
|
2315
|
+
or("list2options(): object without field value: " + n);
|
|
2096
2316
|
continue;
|
|
2097
2317
|
}
|
|
2098
2318
|
n = Object.keys(o)[0];
|
|
2099
2319
|
}
|
|
2100
2320
|
e.id = o[t], e.value = o[n];
|
|
2101
2321
|
} else {
|
|
2102
|
-
if (!(
|
|
2103
|
-
|
|
2322
|
+
if (!(Wr(o) > 0)) {
|
|
2323
|
+
or("list2options(): object without field id: " + t);
|
|
2104
2324
|
continue;
|
|
2105
2325
|
}
|
|
2106
2326
|
t = Object.keys(o)[0], e.id = t, e.value = o[t];
|
|
2107
2327
|
}
|
|
2108
2328
|
r.push(e);
|
|
2109
|
-
} else
|
|
2329
|
+
} else or("list2options(): case1 not implemented");
|
|
2110
2330
|
}
|
|
2111
|
-
else if (
|
|
2331
|
+
else if (Kr(e)) for (let t of Object.keys(e)) r.push({
|
|
2112
2332
|
id: t,
|
|
2113
2333
|
value: t
|
|
2114
2334
|
});
|
|
2115
|
-
else
|
|
2335
|
+
else or("list2options(): case2 not implemented");
|
|
2116
2336
|
return r;
|
|
2117
2337
|
}
|
|
2118
|
-
function
|
|
2338
|
+
function Gl(e, t) {
|
|
2119
2339
|
if (!e) return -1;
|
|
2120
2340
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2121
2341
|
return -1;
|
|
2122
2342
|
}
|
|
2123
|
-
function
|
|
2124
|
-
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;
|
|
2125
2345
|
let r = e.length;
|
|
2126
2346
|
if (n) {
|
|
2127
2347
|
t = t.toLowerCase();
|
|
@@ -2132,17 +2352,17 @@ function Ol(e, t, n) {
|
|
|
2132
2352
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2133
2353
|
return !1;
|
|
2134
2354
|
}
|
|
2135
|
-
function
|
|
2136
|
-
if (!e) return
|
|
2137
|
-
if (!t) return
|
|
2138
|
-
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;
|
|
2139
2359
|
return !1;
|
|
2140
2360
|
}
|
|
2141
|
-
function
|
|
2361
|
+
function xl(e, t) {
|
|
2142
2362
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2143
2363
|
return !1;
|
|
2144
2364
|
}
|
|
2145
|
-
function
|
|
2365
|
+
function Kl(e, t) {
|
|
2146
2366
|
try {
|
|
2147
2367
|
let n = e.__md_iev__;
|
|
2148
2368
|
if (n) return n[t];
|
|
@@ -2150,53 +2370,53 @@ function wl(e, t) {
|
|
|
2150
2370
|
return;
|
|
2151
2371
|
}
|
|
2152
2372
|
}
|
|
2153
|
-
function
|
|
2373
|
+
function Yl(e, t, n) {
|
|
2154
2374
|
let r = e.__md_iev__;
|
|
2155
2375
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2156
2376
|
}
|
|
2157
|
-
function
|
|
2158
|
-
if (!
|
|
2377
|
+
function Bl(e, t, n, r) {
|
|
2378
|
+
if (!Zr(e)) return or("gobj is not a GObj"), null;
|
|
2159
2379
|
if (!t) return;
|
|
2160
|
-
let l =
|
|
2161
|
-
l || (l = [],
|
|
2380
|
+
let l = Kl(t, n);
|
|
2381
|
+
l || (l = [], Yl(t, n, l));
|
|
2162
2382
|
try {
|
|
2163
|
-
|
|
2383
|
+
Yr(l) && l.unshift(r);
|
|
2164
2384
|
} catch (e) {
|
|
2165
|
-
|
|
2385
|
+
or(e);
|
|
2166
2386
|
}
|
|
2167
2387
|
}
|
|
2168
|
-
function
|
|
2169
|
-
if (!
|
|
2170
|
-
if (!
|
|
2171
|
-
let l =
|
|
2172
|
-
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);
|
|
2173
2393
|
}
|
|
2174
|
-
function
|
|
2175
|
-
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;
|
|
2176
2396
|
}
|
|
2177
|
-
function
|
|
2178
|
-
return
|
|
2397
|
+
function ql(e, t) {
|
|
2398
|
+
return pl(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2179
2399
|
}
|
|
2180
|
-
function
|
|
2400
|
+
function Ql(e, t, n) {
|
|
2181
2401
|
let r = new XMLHttpRequest();
|
|
2182
2402
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2183
2403
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
2184
2404
|
t(JSON.parse(r.responseText));
|
|
2185
2405
|
} catch (e) {
|
|
2186
|
-
n && (
|
|
2406
|
+
n && (or(`JSON parse status ${r.status}, error: ${e.message}`), n(r.status));
|
|
2187
2407
|
}
|
|
2188
2408
|
else n && n(r.status);
|
|
2189
2409
|
var e;
|
|
2190
2410
|
}, r.send();
|
|
2191
2411
|
}
|
|
2192
|
-
function
|
|
2412
|
+
function zl(e, t, n) {
|
|
2193
2413
|
let r = new XMLHttpRequest();
|
|
2194
2414
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2195
2415
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2196
2416
|
}, r.send(t);
|
|
2197
2417
|
}
|
|
2198
|
-
function
|
|
2199
|
-
void 0 !== n &&
|
|
2418
|
+
function Xl(e, t, n) {
|
|
2419
|
+
void 0 !== n && Br(n) || (n = "");
|
|
2200
2420
|
for (let r of Object.keys(e)) {
|
|
2201
2421
|
if (!e.hasOwnProperty(r)) continue;
|
|
2202
2422
|
let l = (n.length ? "`" : "") + r;
|
|
@@ -2205,61 +2425,61 @@ function Ll(e, t, n) {
|
|
|
2205
2425
|
r,
|
|
2206
2426
|
e[r],
|
|
2207
2427
|
n
|
|
2208
|
-
]),
|
|
2428
|
+
]), Kr(e[r]) && Xl(e[r], t, n), n = n.slice(0, -l.length);
|
|
2209
2429
|
}
|
|
2210
2430
|
}
|
|
2211
|
-
function
|
|
2212
|
-
n && (e =
|
|
2213
|
-
let r =
|
|
2214
|
-
|
|
2215
|
-
let l =
|
|
2216
|
-
return
|
|
2217
|
-
"__" !== 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);
|
|
2218
2438
|
}, t), e;
|
|
2219
2439
|
}
|
|
2220
|
-
function
|
|
2221
|
-
let l =
|
|
2222
|
-
if (!l) return
|
|
2223
|
-
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;
|
|
2224
2444
|
let o, i = n.split("`"), s = l;
|
|
2225
|
-
for (; (o = i.shift()) && !
|
|
2226
|
-
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);
|
|
2227
2447
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2228
2448
|
else {
|
|
2229
|
-
let t =
|
|
2449
|
+
let t = El(null, s, e.hook, [], 1), n = oo(t, e.hook, r.id, !1);
|
|
2230
2450
|
n ? Object.assign(n, r) : t.push(r);
|
|
2231
2451
|
}
|
|
2232
2452
|
return l;
|
|
2233
2453
|
}
|
|
2234
|
-
function
|
|
2235
|
-
let l =
|
|
2236
|
-
if (!l) return
|
|
2237
|
-
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;
|
|
2238
2458
|
let o, i = n.split("`"), s = l;
|
|
2239
|
-
for (; (o = i.shift()) && !
|
|
2240
|
-
if (0 === i.length && s) if (
|
|
2241
|
-
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);
|
|
2242
2462
|
e >= 0 && s.splice(e, 1);
|
|
2243
2463
|
} else {
|
|
2244
|
-
let t =
|
|
2464
|
+
let t = El(null, s, e.hook, null, 0), n = Gl(t, r.id);
|
|
2245
2465
|
n >= 0 && t.splice(n, 1);
|
|
2246
2466
|
}
|
|
2247
2467
|
return l;
|
|
2248
2468
|
}
|
|
2249
|
-
function
|
|
2250
|
-
let n =
|
|
2251
|
-
if (!n) return
|
|
2252
|
-
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);
|
|
2253
2473
|
}
|
|
2254
|
-
function
|
|
2255
|
-
let l =
|
|
2256
|
-
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);
|
|
2257
2477
|
}
|
|
2258
|
-
function
|
|
2259
|
-
let r =
|
|
2260
|
-
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);
|
|
2261
2481
|
}
|
|
2262
|
-
function
|
|
2482
|
+
function oo(e, t, n, r) {
|
|
2263
2483
|
if (!e) return null;
|
|
2264
2484
|
let l, o = e.length;
|
|
2265
2485
|
for (l = 0; l < o; l++) {
|
|
@@ -2267,19 +2487,19 @@ function Wl(e, t, n, r) {
|
|
|
2267
2487
|
if (o) {
|
|
2268
2488
|
let e = o.id;
|
|
2269
2489
|
if (e && e === n) return o;
|
|
2270
|
-
if (r &&
|
|
2271
|
-
let e =
|
|
2490
|
+
if (r && _l(o, t)) {
|
|
2491
|
+
let e = oo(o[t], t, n, r);
|
|
2272
2492
|
if (e) return e;
|
|
2273
2493
|
}
|
|
2274
2494
|
}
|
|
2275
2495
|
}
|
|
2276
2496
|
return null;
|
|
2277
2497
|
}
|
|
2278
|
-
function
|
|
2279
|
-
let n =
|
|
2280
|
-
return
|
|
2498
|
+
function io(e, t) {
|
|
2499
|
+
let n = wr(e);
|
|
2500
|
+
return $r(n, t), n;
|
|
2281
2501
|
}
|
|
2282
|
-
function
|
|
2502
|
+
function so(e) {
|
|
2283
2503
|
function t(e) {
|
|
2284
2504
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2285
2505
|
switch (t.length % 4) {
|
|
@@ -2310,9 +2530,9 @@ function xl(e) {
|
|
|
2310
2530
|
signature: t(n[2])
|
|
2311
2531
|
};
|
|
2312
2532
|
}
|
|
2313
|
-
function
|
|
2533
|
+
function ao(e, t) {
|
|
2314
2534
|
try {
|
|
2315
|
-
let n =
|
|
2535
|
+
let n = so(e);
|
|
2316
2536
|
switch (t) {
|
|
2317
2537
|
case "header": return JSON.parse(n.header);
|
|
2318
2538
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2322,38 +2542,38 @@ function Yl(e, t) {
|
|
|
2322
2542
|
return null;
|
|
2323
2543
|
}
|
|
2324
2544
|
}
|
|
2325
|
-
function
|
|
2545
|
+
function uo(e) {
|
|
2326
2546
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2327
2547
|
}
|
|
2328
|
-
function
|
|
2548
|
+
function _o(e) {
|
|
2329
2549
|
if (!e) return "";
|
|
2330
2550
|
const t = String(e).trim();
|
|
2331
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2551
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : uo(t);
|
|
2332
2552
|
}
|
|
2333
|
-
function
|
|
2553
|
+
function co(e) {
|
|
2334
2554
|
const t = document.createElement("template");
|
|
2335
2555
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2336
2556
|
}
|
|
2337
|
-
function
|
|
2557
|
+
function fo(e, t) {
|
|
2338
2558
|
let [n, r, l, o] = e;
|
|
2339
|
-
if (!n) return void
|
|
2559
|
+
if (!n) return void or("Tag must be a valid HTML element.");
|
|
2340
2560
|
let i = document.createElement(n), s = "";
|
|
2341
2561
|
if (r && "object" == typeof r) for (let e of Object.keys(r)) if ("style" === e && "object" == typeof r[e]) {
|
|
2342
2562
|
let t = "";
|
|
2343
2563
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2344
2564
|
i.style.cssText = t;
|
|
2345
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]);
|
|
2346
|
-
if (
|
|
2566
|
+
if (Br(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(co(l));
|
|
2347
2567
|
else if (t && s) i.textContent = t(s) || l;
|
|
2348
2568
|
else i.textContent = l;
|
|
2349
|
-
else if (
|
|
2350
|
-
if (l.length > 0) if (
|
|
2351
|
-
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(
|
|
2352
|
-
} 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));
|
|
2353
2573
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2354
2574
|
return i;
|
|
2355
2575
|
}
|
|
2356
|
-
function
|
|
2576
|
+
function go(e) {
|
|
2357
2577
|
if (!e) return {
|
|
2358
2578
|
top: 0,
|
|
2359
2579
|
left: 0,
|
|
@@ -2373,11 +2593,11 @@ function Ql(e) {
|
|
|
2373
2593
|
bottom: t + i + l
|
|
2374
2594
|
};
|
|
2375
2595
|
}
|
|
2376
|
-
function
|
|
2596
|
+
function bo(e) {
|
|
2377
2597
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2378
2598
|
}
|
|
2379
|
-
function
|
|
2380
|
-
if (!
|
|
2599
|
+
function po(e, t) {
|
|
2600
|
+
if (!Xr(t)) return void or("You must supply a translation function");
|
|
2381
2601
|
e || (e = document);
|
|
2382
2602
|
const n = (t) => {
|
|
2383
2603
|
let n = [];
|
|
@@ -2400,41 +2620,41 @@ function Xl(e, t) {
|
|
|
2400
2620
|
n && e.setAttribute("placeholder", t(n));
|
|
2401
2621
|
});
|
|
2402
2622
|
}
|
|
2403
|
-
function
|
|
2623
|
+
function mo(e = "Time Tracker", t = !1) {
|
|
2404
2624
|
const n = e, r = performance.now();
|
|
2405
2625
|
let l = r;
|
|
2406
|
-
return t &&
|
|
2626
|
+
return t && ir(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
2407
2627
|
const i = performance.now(), s = (i - l) / 1e3, a = (i - r) / 1e3;
|
|
2408
|
-
return t &&
|
|
2628
|
+
return t && ir(`--\x3e ${n} ${e} - partial: ${s} sec, total: ${a} sec, ${o}`), l = i, {
|
|
2409
2629
|
partial: s,
|
|
2410
2630
|
total: a
|
|
2411
2631
|
};
|
|
2412
2632
|
} };
|
|
2413
2633
|
}
|
|
2414
|
-
function
|
|
2634
|
+
function ho(e) {
|
|
2415
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();
|
|
2416
2636
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2417
2637
|
}
|
|
2418
|
-
function
|
|
2638
|
+
function Eo() {
|
|
2419
2639
|
return Math.floor(Date.now() / 1e3);
|
|
2420
2640
|
}
|
|
2421
|
-
function
|
|
2641
|
+
function To(e, t) {
|
|
2422
2642
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2423
2643
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2424
2644
|
return -1;
|
|
2425
2645
|
}
|
|
2426
|
-
function
|
|
2646
|
+
function yo() {
|
|
2427
2647
|
let e = "";
|
|
2428
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;
|
|
2429
2649
|
}
|
|
2430
|
-
function
|
|
2650
|
+
function vo(e) {
|
|
2431
2651
|
return e.replace(/[?# ^:]/g, "_");
|
|
2432
2652
|
}
|
|
2433
|
-
function
|
|
2653
|
+
function Oo(e) {
|
|
2434
2654
|
let t = null;
|
|
2435
2655
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2436
2656
|
}
|
|
2437
|
-
function
|
|
2657
|
+
function So(e, t = 0, n = !1) {
|
|
2438
2658
|
let r = null, l = null, o = null;
|
|
2439
2659
|
const i = (...i) => {
|
|
2440
2660
|
o = this, l = i;
|
|
@@ -2449,20 +2669,20 @@ function io(e, t = 0, n = !1) {
|
|
|
2449
2669
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2450
2670
|
}, i;
|
|
2451
2671
|
}
|
|
2452
|
-
function
|
|
2672
|
+
function No(...e) {
|
|
2453
2673
|
let t = "", n = 0;
|
|
2454
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++));
|
|
2455
2675
|
return t;
|
|
2456
2676
|
}
|
|
2457
|
-
var
|
|
2458
|
-
function
|
|
2677
|
+
var wo = 256, Ro = 1e5;
|
|
2678
|
+
function jo(e) {
|
|
2459
2679
|
const t = String(e).replace(/`/g, "``");
|
|
2460
2680
|
return "[" === t[0] ? "[" + t : t;
|
|
2461
2681
|
}
|
|
2462
|
-
function
|
|
2463
|
-
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("`") : "";
|
|
2464
2684
|
}
|
|
2465
|
-
function
|
|
2685
|
+
function $o(e) {
|
|
2466
2686
|
if ("string" != typeof e) return null;
|
|
2467
2687
|
let t = [], n = "";
|
|
2468
2688
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2483,9 +2703,9 @@ function fo(e) {
|
|
|
2483
2703
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2484
2704
|
});
|
|
2485
2705
|
}
|
|
2486
|
-
function
|
|
2706
|
+
function Ao(e) {
|
|
2487
2707
|
const t = {}, n = (e, r, l) => {
|
|
2488
|
-
if (l >
|
|
2708
|
+
if (l > wo) throw new Error("json2flat: deeper than 256");
|
|
2489
2709
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2490
2710
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2491
2711
|
const o = `[${t}]`;
|
|
@@ -2495,7 +2715,7 @@ function go(e) {
|
|
|
2495
2715
|
const t = Object.keys(e);
|
|
2496
2716
|
if (t.length > 0) {
|
|
2497
2717
|
for (const o of t) {
|
|
2498
|
-
const t =
|
|
2718
|
+
const t = jo(o);
|
|
2499
2719
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2500
2720
|
}
|
|
2501
2721
|
return;
|
|
@@ -2505,20 +2725,20 @@ function go(e) {
|
|
|
2505
2725
|
};
|
|
2506
2726
|
return null == e || n(e, "", 0), t;
|
|
2507
2727
|
}
|
|
2508
|
-
function
|
|
2728
|
+
function Io(e) {
|
|
2509
2729
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2510
2730
|
let t = null;
|
|
2511
2731
|
for (const n of Object.keys(e)) {
|
|
2512
|
-
const r =
|
|
2732
|
+
const r = $o(n);
|
|
2513
2733
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2514
|
-
if (r.length >
|
|
2734
|
+
if (r.length > wo) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2515
2735
|
const l = "number" == typeof r[0];
|
|
2516
2736
|
if (null === t) t = l ? [] : {};
|
|
2517
2737
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2518
2738
|
let o = t;
|
|
2519
2739
|
for (let t = 0; t < r.length; t++) {
|
|
2520
2740
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2521
|
-
if (i && l >
|
|
2741
|
+
if (i && l > Ro) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2522
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"}`);
|
|
2523
2743
|
if (s) {
|
|
2524
2744
|
if (Array.isArray(o)) {
|
|
@@ -2542,23 +2762,23 @@ function bo(e) {
|
|
|
2542
2762
|
}
|
|
2543
2763
|
return null === t ? {} : t;
|
|
2544
2764
|
}
|
|
2545
|
-
function
|
|
2765
|
+
function ko(e, t) {
|
|
2546
2766
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2547
2767
|
}
|
|
2548
|
-
function
|
|
2768
|
+
function Co(e, t) {
|
|
2549
2769
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2550
2770
|
added: {},
|
|
2551
2771
|
removed: {},
|
|
2552
2772
|
changed: {}
|
|
2553
2773
|
};
|
|
2554
|
-
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] = {
|
|
2555
2775
|
from: n[e],
|
|
2556
2776
|
to: r[e]
|
|
2557
2777
|
}) : l.removed[e] = n[e];
|
|
2558
2778
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || (l.added[e] = r[e]);
|
|
2559
2779
|
return l;
|
|
2560
2780
|
}
|
|
2561
|
-
function
|
|
2781
|
+
function Lo(e, t) {
|
|
2562
2782
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2563
2783
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2564
2784
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -2570,40 +2790,40 @@ function Eo(e, t) {
|
|
|
2570
2790
|
}
|
|
2571
2791
|
return e;
|
|
2572
2792
|
}
|
|
2573
|
-
function
|
|
2793
|
+
function Uo(e) {
|
|
2574
2794
|
return "persistent-attrs-" + Dt(e);
|
|
2575
2795
|
}
|
|
2576
|
-
function
|
|
2577
|
-
let n = Xt(e, v.SDF_PERSIST), r =
|
|
2578
|
-
if (r &&
|
|
2579
|
-
let l =
|
|
2580
|
-
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);
|
|
2581
2801
|
}
|
|
2582
2802
|
}
|
|
2583
|
-
function
|
|
2584
|
-
let n =
|
|
2585
|
-
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);
|
|
2586
2806
|
}
|
|
2587
|
-
function
|
|
2588
|
-
let n =
|
|
2589
|
-
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);
|
|
2590
2810
|
}
|
|
2591
|
-
function
|
|
2592
|
-
let n =
|
|
2593
|
-
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;
|
|
2594
2814
|
}
|
|
2595
|
-
function
|
|
2596
|
-
if (
|
|
2815
|
+
function Mo(e) {
|
|
2816
|
+
if (Yr(e) && 1 === Wr(e)) {
|
|
2597
2817
|
let t = e[0];
|
|
2598
|
-
return
|
|
2818
|
+
return _l(t, "size") ? t.size : 1;
|
|
2599
2819
|
}
|
|
2600
|
-
return
|
|
2820
|
+
return Wr(e);
|
|
2601
2821
|
}
|
|
2602
|
-
function
|
|
2603
|
-
if (
|
|
2822
|
+
function Wo(e, t) {
|
|
2823
|
+
if (Br(t)) {
|
|
2604
2824
|
if (-1 === t.indexOf("^")) {
|
|
2605
2825
|
let n, r, l = e.fkey;
|
|
2606
|
-
if (1 !==
|
|
2826
|
+
if (1 !== Gr(l)) return or("bad fkey 1"), or(e), or(t), null;
|
|
2607
2827
|
for (const e of Object.keys(l)) {
|
|
2608
2828
|
n = e, r = l[e];
|
|
2609
2829
|
break;
|
|
@@ -2616,28 +2836,28 @@ function No(e, t) {
|
|
|
2616
2836
|
}
|
|
2617
2837
|
{
|
|
2618
2838
|
let n = t.split("^");
|
|
2619
|
-
return 3 !== n.length ? (
|
|
2839
|
+
return 3 !== n.length ? (or("bad fkey 2"), or(e), or(t), null) : {
|
|
2620
2840
|
topic_name: n[0],
|
|
2621
2841
|
id: n[1],
|
|
2622
2842
|
hook_name: n[2]
|
|
2623
2843
|
};
|
|
2624
2844
|
}
|
|
2625
2845
|
}
|
|
2626
|
-
return
|
|
2846
|
+
return Kr(t) ? {
|
|
2627
2847
|
topic_name: t.topic_name,
|
|
2628
2848
|
id: t.id,
|
|
2629
2849
|
hook_name: t.hook_name
|
|
2630
|
-
} : (
|
|
2850
|
+
} : (or("bad fkey 3"), or(e), or(t), null);
|
|
2631
2851
|
}
|
|
2632
|
-
function
|
|
2633
|
-
let n =
|
|
2852
|
+
function xo(e, t) {
|
|
2853
|
+
let n = Wo(e, t);
|
|
2634
2854
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2635
2855
|
}
|
|
2636
|
-
function
|
|
2637
|
-
if (
|
|
2856
|
+
function Ko(e, t) {
|
|
2857
|
+
if (Br(t)) {
|
|
2638
2858
|
if (-1 === t.indexOf("^")) {
|
|
2639
2859
|
let n, r = e.hook;
|
|
2640
|
-
if (1 !==
|
|
2860
|
+
if (1 !== Gr(r)) return or("bad hook 1"), or(e), or(t), null;
|
|
2641
2861
|
for (let e of Object.keys(r)) {
|
|
2642
2862
|
n = e, r[e];
|
|
2643
2863
|
break;
|
|
@@ -2649,18 +2869,18 @@ function wo(e, t) {
|
|
|
2649
2869
|
}
|
|
2650
2870
|
{
|
|
2651
2871
|
let n = t.split("^");
|
|
2652
|
-
return 2 !== n.length ? (
|
|
2872
|
+
return 2 !== n.length ? (or("bad hook 2"), or(e), or(t), null) : {
|
|
2653
2873
|
topic_name: n[0],
|
|
2654
2874
|
id: n[1]
|
|
2655
2875
|
};
|
|
2656
2876
|
}
|
|
2657
2877
|
}
|
|
2658
|
-
return
|
|
2878
|
+
return Kr(t) ? {
|
|
2659
2879
|
topic_name: t.topic_name,
|
|
2660
2880
|
id: t.id
|
|
2661
|
-
} : (
|
|
2881
|
+
} : (or("bad hook 3"), or(e), or(t), null);
|
|
2662
2882
|
}
|
|
2663
|
-
var
|
|
2883
|
+
var Yo = [
|
|
2664
2884
|
"string",
|
|
2665
2885
|
"integer",
|
|
2666
2886
|
"object",
|
|
@@ -2670,7 +2890,7 @@ var jo = [
|
|
|
2670
2890
|
"real",
|
|
2671
2891
|
"boolean",
|
|
2672
2892
|
"blob"
|
|
2673
|
-
],
|
|
2893
|
+
], Bo = [
|
|
2674
2894
|
"persistent",
|
|
2675
2895
|
"required",
|
|
2676
2896
|
"notnull",
|
|
@@ -2682,7 +2902,7 @@ var jo = [
|
|
|
2682
2902
|
"stats",
|
|
2683
2903
|
"rstats",
|
|
2684
2904
|
"pstats"
|
|
2685
|
-
],
|
|
2905
|
+
], Jo = [
|
|
2686
2906
|
"hook",
|
|
2687
2907
|
"fkey",
|
|
2688
2908
|
"enum",
|
|
@@ -2711,7 +2931,7 @@ var jo = [
|
|
|
2711
2931
|
"coordinates",
|
|
2712
2932
|
"gbuffer"
|
|
2713
2933
|
];
|
|
2714
|
-
function
|
|
2934
|
+
function Ho(e) {
|
|
2715
2935
|
let t = {
|
|
2716
2936
|
name: e.id,
|
|
2717
2937
|
header: e.header,
|
|
@@ -2730,7 +2950,7 @@ function Ao(e) {
|
|
|
2730
2950
|
if (!e.flag) return t;
|
|
2731
2951
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2732
2952
|
let r = e.flag[n];
|
|
2733
|
-
if (
|
|
2953
|
+
if (Ml(Jo, r)) {
|
|
2734
2954
|
switch (r) {
|
|
2735
2955
|
case "enum":
|
|
2736
2956
|
t.enum_list = e.enum;
|
|
@@ -2744,7 +2964,7 @@ function Ao(e) {
|
|
|
2744
2964
|
case "file": t.is_file = !0;
|
|
2745
2965
|
}
|
|
2746
2966
|
t.type = r;
|
|
2747
|
-
} else if (
|
|
2967
|
+
} else if (Ml(Bo, r)) switch (r) {
|
|
2748
2968
|
case "writable":
|
|
2749
2969
|
t.is_writable = !0;
|
|
2750
2970
|
break;
|
|
@@ -2757,7 +2977,7 @@ function Ao(e) {
|
|
|
2757
2977
|
}
|
|
2758
2978
|
return t.is_file && (t.type = "file"), t;
|
|
2759
2979
|
}
|
|
2760
|
-
function
|
|
2980
|
+
function qo(e, t) {
|
|
2761
2981
|
let n = {
|
|
2762
2982
|
name: e,
|
|
2763
2983
|
header: e,
|
|
@@ -2771,13 +2991,13 @@ function Io(e, t) {
|
|
|
2771
2991
|
placeholder: void 0,
|
|
2772
2992
|
fkey: null
|
|
2773
2993
|
};
|
|
2774
|
-
if (
|
|
2994
|
+
if (Br(t)) {
|
|
2775
2995
|
let e = t.split(".");
|
|
2776
2996
|
for (let t = 0; t < e.length; t++) {
|
|
2777
2997
|
let r = e[t];
|
|
2778
|
-
if (
|
|
2779
|
-
else if (
|
|
2780
|
-
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) {
|
|
2781
3001
|
case "writable":
|
|
2782
3002
|
n.is_writable = !0;
|
|
2783
3003
|
break;
|
|
@@ -2789,39 +3009,39 @@ function Io(e, t) {
|
|
|
2789
3009
|
}
|
|
2790
3010
|
}
|
|
2791
3011
|
n.real_type || (n.real_type = "string");
|
|
2792
|
-
} 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);
|
|
2793
3013
|
return n.type || (n.type = n.real_type), n;
|
|
2794
3014
|
}
|
|
2795
|
-
function
|
|
3015
|
+
function Qo(e, t) {
|
|
2796
3016
|
let n = {};
|
|
2797
3017
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2798
3018
|
let l;
|
|
2799
|
-
|
|
2800
|
-
let o =
|
|
3019
|
+
Kr(r) && (l = r.default);
|
|
3020
|
+
let o = El(null, t, e, l);
|
|
2801
3021
|
n[e] = o;
|
|
2802
3022
|
}), n;
|
|
2803
3023
|
}
|
|
2804
|
-
var
|
|
3024
|
+
var zo = [
|
|
2805
3025
|
N(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2806
3026
|
N(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2807
3027
|
N(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2808
|
-
|
|
2809
|
-
],
|
|
3028
|
+
S()
|
|
3029
|
+
], Xo = {
|
|
2810
3030
|
periodic: !1,
|
|
2811
3031
|
msec: 0,
|
|
2812
3032
|
timer_id: -1
|
|
2813
|
-
},
|
|
2814
|
-
function
|
|
3033
|
+
}, Zo = null;
|
|
3034
|
+
function ei(e, t, n, r) {
|
|
2815
3035
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2816
3036
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2817
3037
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2818
|
-
}, 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;
|
|
2819
3039
|
}
|
|
2820
|
-
var
|
|
3040
|
+
var ti = {
|
|
2821
3041
|
mt_create: function(e) {
|
|
2822
3042
|
let t = e.priv;
|
|
2823
3043
|
const n = nn(e, "subscriber");
|
|
2824
|
-
n &&
|
|
3044
|
+
n && $n(e, null, {}, n), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
2825
3045
|
},
|
|
2826
3046
|
mt_writing: function(e, t) {
|
|
2827
3047
|
let n = e.priv;
|
|
@@ -2831,7 +3051,7 @@ var Fo = {
|
|
|
2831
3051
|
break;
|
|
2832
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() {
|
|
2833
3053
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2834
|
-
}, n.msec)), n.msec > 0 ?
|
|
3054
|
+
}, n.msec)), n.msec > 0 ? Et(e) || at(e) : Et(e) && gt(e);
|
|
2835
3055
|
}
|
|
2836
3056
|
},
|
|
2837
3057
|
mt_start: function(e) {
|
|
@@ -2842,31 +3062,31 @@ var Fo = {
|
|
|
2842
3062
|
},
|
|
2843
3063
|
mt_destroy: function(e) {}
|
|
2844
3064
|
};
|
|
2845
|
-
function
|
|
3065
|
+
function ni() {
|
|
2846
3066
|
return function(e) {
|
|
2847
|
-
if (
|
|
3067
|
+
if (Zo) return or(`GClass ALREADY created: ${e}`), -1;
|
|
2848
3068
|
const t = [["ST_IDLE", [[
|
|
2849
3069
|
"EV_TIMEOUT",
|
|
2850
|
-
|
|
3070
|
+
ei,
|
|
2851
3071
|
null
|
|
2852
3072
|
]]]];
|
|
2853
|
-
return (
|
|
3073
|
+
return (Zo = Ae(e, [
|
|
2854
3074
|
["EV_TIMEOUT", P.EVF_OUTPUT_EVENT],
|
|
2855
3075
|
["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT],
|
|
2856
3076
|
[0, 0]
|
|
2857
|
-
], t,
|
|
3077
|
+
], t, ti, 0, zo, Xo, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
2858
3078
|
}("C_TIMER");
|
|
2859
3079
|
}
|
|
2860
|
-
function
|
|
2861
|
-
return e instanceof k ? "C_TIMER" !== jt(e) ? (
|
|
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);
|
|
2862
3082
|
}
|
|
2863
|
-
function
|
|
2864
|
-
return e instanceof k ? "C_TIMER" !== jt(e) ? (
|
|
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);
|
|
2865
3085
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return e instanceof k ? "C_TIMER" !== jt(e) ? (
|
|
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);
|
|
2868
3088
|
}
|
|
2869
|
-
var
|
|
3089
|
+
var ii = [
|
|
2870
3090
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2871
3091
|
N(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2872
3092
|
N(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2885,72 +3105,72 @@ var Ko = [
|
|
|
2885
3105
|
N(y.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
2886
3106
|
N(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2887
3107
|
N(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2888
|
-
|
|
2889
|
-
],
|
|
2890
|
-
function
|
|
3108
|
+
S()
|
|
3109
|
+
], si = { gobj_timer: null }, ai = null;
|
|
3110
|
+
function ui(e, t, n, r) {
|
|
2891
3111
|
let l = zt(e, t);
|
|
2892
|
-
return
|
|
3112
|
+
return Kr(l) || (l = {}), l[n] = r, rn(e, t, l), qe(e, t);
|
|
2893
3113
|
}
|
|
2894
|
-
function
|
|
3114
|
+
function _i(e) {
|
|
2895
3115
|
if (!0 === e || !1 === e) return e;
|
|
2896
3116
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2897
3117
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2898
3118
|
}
|
|
2899
|
-
function
|
|
2900
|
-
return `${Nt()}^${
|
|
3119
|
+
function ci() {
|
|
3120
|
+
return `${Nt()}^${St()}`;
|
|
2901
3121
|
}
|
|
2902
|
-
function
|
|
2903
|
-
return
|
|
3122
|
+
function fi(e, t, n, r) {
|
|
3123
|
+
return Un(e, t, n), 0;
|
|
2904
3124
|
}
|
|
2905
|
-
var
|
|
3125
|
+
var gi = {
|
|
2906
3126
|
mt_create: function(e) {
|
|
2907
3127
|
let t = e.priv;
|
|
2908
|
-
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) {
|
|
2909
3129
|
let t = zt(e, "trace_levels");
|
|
2910
|
-
if (!
|
|
3130
|
+
if (!Kr(t)) return 0;
|
|
2911
3131
|
let n = t.__global_trace__;
|
|
2912
|
-
if (
|
|
3132
|
+
if (Yr(n)) {
|
|
2913
3133
|
ce(4294967295, !1);
|
|
2914
3134
|
for (let e of n) se(e, !0);
|
|
2915
3135
|
}
|
|
2916
3136
|
for (const [n, r] of Object.entries(t)) {
|
|
2917
3137
|
let t = Me(n);
|
|
2918
|
-
if (t) if (
|
|
2919
|
-
|
|
2920
|
-
for (let e of r)
|
|
2921
|
-
} 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`);
|
|
2922
3142
|
}
|
|
2923
3143
|
}(e), function(e) {
|
|
2924
3144
|
let t = zt(e, "no_trace_levels");
|
|
2925
|
-
if (!
|
|
3145
|
+
if (!Kr(t)) return 0;
|
|
2926
3146
|
let n = t.__global_no_trace__;
|
|
2927
|
-
if (
|
|
3147
|
+
if (Yr(n)) {
|
|
2928
3148
|
fe(4294967295, !1);
|
|
2929
3149
|
for (let e of n) ae(e, !0);
|
|
2930
3150
|
}
|
|
2931
3151
|
for (const [n, r] of Object.entries(t)) {
|
|
2932
3152
|
let t = Me(n);
|
|
2933
|
-
if (t) if (
|
|
3153
|
+
if (t) if (Yr(r)) {
|
|
2934
3154
|
ye(t, null, !1);
|
|
2935
3155
|
for (let e of r) ye(t, e, !0);
|
|
2936
|
-
} else
|
|
3156
|
+
} else or(`${Rt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2937
3157
|
}
|
|
2938
3158
|
}(e);
|
|
2939
3159
|
},
|
|
2940
3160
|
mt_writing: function(e, t) {},
|
|
2941
3161
|
mt_start: function(e) {
|
|
2942
|
-
return
|
|
3162
|
+
return li(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2943
3163
|
},
|
|
2944
3164
|
mt_stop: function(e) {
|
|
2945
|
-
return
|
|
3165
|
+
return oi(e.priv.gobj_timer), bt(e), 0;
|
|
2946
3166
|
},
|
|
2947
3167
|
mt_destroy: function(e) {},
|
|
2948
3168
|
mt_play: function(e) {
|
|
2949
|
-
let t =
|
|
2950
|
-
return
|
|
3169
|
+
let t = xe();
|
|
3170
|
+
return Et(t) || at(t), vt(t) || mt(t), 0;
|
|
2951
3171
|
},
|
|
2952
3172
|
mt_pause: function(e) {
|
|
2953
|
-
return
|
|
3173
|
+
return ht(xe()), 0;
|
|
2954
3174
|
},
|
|
2955
3175
|
mt_command_parser: function(e, t, n, r) {
|
|
2956
3176
|
switch (n = n || {}, t) {
|
|
@@ -2958,35 +3178,35 @@ var Qo = {
|
|
|
2958
3178
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
2959
3179
|
case "set-global-trace":
|
|
2960
3180
|
case "set-global-no-trace": {
|
|
2961
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
2962
|
-
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);
|
|
2963
3183
|
}
|
|
2964
3184
|
case "get-gclass-trace":
|
|
2965
3185
|
case "get-gclass-no-trace":
|
|
2966
3186
|
case "set-gclass-trace":
|
|
2967
3187
|
case "set-gclass-no-trace": {
|
|
2968
3188
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
2969
|
-
if (!i) return o(0, -1, `${
|
|
3189
|
+
if (!i) return o(0, -1, `${ci()}: what gclass is '${l}'?`, null, null);
|
|
2970
3190
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
2971
|
-
let s = n.level, a =
|
|
2972
|
-
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);
|
|
2973
3193
|
}
|
|
2974
|
-
default: return o(0, -1, `${
|
|
3194
|
+
default: return o(0, -1, `${ci()}: command not available: ${t}`, null, null);
|
|
2975
3195
|
}
|
|
2976
3196
|
}
|
|
2977
3197
|
};
|
|
2978
|
-
function
|
|
3198
|
+
function di() {
|
|
2979
3199
|
return function(e) {
|
|
2980
|
-
if (
|
|
3200
|
+
if (ai) return or(`GClass ALREADY created: ${e}`), -1;
|
|
2981
3201
|
const t = [["ST_IDLE", [[
|
|
2982
3202
|
"EV_TIMEOUT_PERIODIC",
|
|
2983
|
-
|
|
3203
|
+
fi,
|
|
2984
3204
|
null
|
|
2985
3205
|
]]]];
|
|
2986
|
-
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;
|
|
2987
3207
|
}("C_YUNO");
|
|
2988
3208
|
}
|
|
2989
|
-
var
|
|
3209
|
+
var bi = "ievent_gate_stack", pi = [
|
|
2990
3210
|
N(y.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
2991
3211
|
N(y.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
2992
3212
|
N(y.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3002,16 +3222,16 @@ var Xo = "ievent_gate_stack", Zo = [
|
|
|
3002
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"),
|
|
3003
3223
|
N(y.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3004
3224
|
N(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3005
|
-
|
|
3006
|
-
],
|
|
3225
|
+
S()
|
|
3226
|
+
], mi = [
|
|
3007
3227
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3008
3228
|
["ievents2", "Trace inter-events with full kw"],
|
|
3009
3229
|
["identity-card", "Trace identity_card messages"]
|
|
3010
3230
|
];
|
|
3011
|
-
function
|
|
3231
|
+
function hi(e) {
|
|
3012
3232
|
return !!(3 & Z(e));
|
|
3013
3233
|
}
|
|
3014
|
-
var
|
|
3234
|
+
var Ei = {
|
|
3015
3235
|
url: null,
|
|
3016
3236
|
remote_yuno_name: null,
|
|
3017
3237
|
remote_yuno_role: null,
|
|
@@ -3021,16 +3241,16 @@ var ni = {
|
|
|
3021
3241
|
websocket: null,
|
|
3022
3242
|
inside_on_open: !1,
|
|
3023
3243
|
retry_ms: 0
|
|
3024
|
-
},
|
|
3025
|
-
function
|
|
3026
|
-
e.priv.websocket &&
|
|
3244
|
+
}, Ti = null;
|
|
3245
|
+
function yi(e) {
|
|
3246
|
+
e.priv.websocket && or("Websocket ALREADY setup");
|
|
3027
3247
|
const t = tn(e, "url");
|
|
3028
3248
|
let n;
|
|
3029
|
-
|
|
3249
|
+
ar(`====> Starting WebSocket to '${t}' (${Dt(e)})`);
|
|
3030
3250
|
try {
|
|
3031
3251
|
n = new WebSocket(t);
|
|
3032
3252
|
} catch (n) {
|
|
3033
|
-
return
|
|
3253
|
+
return or(`${Dt(e)}: Cannot open WebSocket to '${t}', Error: ${n.message}`), null;
|
|
3034
3254
|
}
|
|
3035
3255
|
return n ? (n.onopen = () => {
|
|
3036
3256
|
yn(e, "EV_ON_OPEN", { url: t }, e);
|
|
@@ -3040,72 +3260,72 @@ function li(e) {
|
|
|
3040
3260
|
data: n.data
|
|
3041
3261
|
}, e);
|
|
3042
3262
|
}, n.onclose = (n) => {
|
|
3043
|
-
Ct(e) || (Zt(
|
|
3263
|
+
Ct(e) || (Zt(Ot(), "browser_beforeunload") ? ir("Close websocket by unload page") : yn(e, "EV_ON_CLOSE", {
|
|
3044
3264
|
url: t,
|
|
3045
3265
|
e: n
|
|
3046
3266
|
}, e));
|
|
3047
|
-
}, n) : (
|
|
3267
|
+
}, n) : (or(`${Dt(e)}: Failed to initialize WebSocket.`), null);
|
|
3048
3268
|
}
|
|
3049
|
-
function
|
|
3269
|
+
function vi(e, t = 1e3, n = "") {
|
|
3050
3270
|
let r = e.priv, l = r.websocket;
|
|
3051
3271
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3052
|
-
|
|
3272
|
+
ar(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
3053
3273
|
try {
|
|
3054
3274
|
l.close(t, n);
|
|
3055
3275
|
} catch (e) {
|
|
3056
|
-
|
|
3276
|
+
or("Error closing WebSocket:", e.message);
|
|
3057
3277
|
}
|
|
3058
|
-
} else
|
|
3278
|
+
} else ir("WebSocket is already closed or in the process of closing.");
|
|
3059
3279
|
}
|
|
3060
|
-
function
|
|
3061
|
-
let r =
|
|
3280
|
+
function Oi(e, t, n) {
|
|
3281
|
+
let r = ho();
|
|
3062
3282
|
try {
|
|
3063
|
-
|
|
3283
|
+
ar("\n" + r + " " + t + "\n"), Nr(n);
|
|
3064
3284
|
} catch (e) {
|
|
3065
|
-
|
|
3285
|
+
ar("ERROR in trace_inter_event: " + e);
|
|
3066
3286
|
}
|
|
3067
3287
|
}
|
|
3068
|
-
var
|
|
3288
|
+
var Si = class {
|
|
3069
3289
|
constructor(e, t) {
|
|
3070
3290
|
this.event = e, this.kw = t || {};
|
|
3071
3291
|
}
|
|
3072
3292
|
};
|
|
3073
|
-
function
|
|
3293
|
+
function Ni(e, t, n, r) {
|
|
3074
3294
|
return function(e, t) {
|
|
3075
3295
|
let n = e.priv, r = JSON.stringify(t);
|
|
3076
|
-
if (
|
|
3077
|
-
let n = tn(e, "url"), l =
|
|
3078
|
-
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);
|
|
3079
3299
|
}
|
|
3080
|
-
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;
|
|
3081
3301
|
try {
|
|
3082
3302
|
n.websocket.send(r);
|
|
3083
3303
|
} catch (t) {
|
|
3084
|
-
|
|
3304
|
+
or(`${Dt(e)}: send_iev(): ${t}`);
|
|
3085
3305
|
}
|
|
3086
3306
|
return 0;
|
|
3087
3307
|
}(e, function(e, t) {
|
|
3088
|
-
return
|
|
3308
|
+
return el(e) ? (or("iev_create() event NULL"), null) : new Si(e, t);
|
|
3089
3309
|
}(t, n));
|
|
3090
3310
|
}
|
|
3091
|
-
function
|
|
3092
|
-
return
|
|
3311
|
+
function wi(e, t, n) {
|
|
3312
|
+
return el(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3093
3313
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3094
3314
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3095
3315
|
dst_service: n,
|
|
3096
|
-
src_yuno:
|
|
3316
|
+
src_yuno: St(),
|
|
3097
3317
|
src_role: Nt(),
|
|
3098
3318
|
src_service: t,
|
|
3099
|
-
host:
|
|
3319
|
+
host: yo()
|
|
3100
3320
|
};
|
|
3101
3321
|
}
|
|
3102
|
-
function
|
|
3103
|
-
let t = e.priv, n = vt(
|
|
3104
|
-
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"));
|
|
3105
3325
|
let s = {
|
|
3106
3326
|
yuno_role: Nt(),
|
|
3107
|
-
yuno_id:
|
|
3108
|
-
yuno_name:
|
|
3327
|
+
yuno_id: wt(),
|
|
3328
|
+
yuno_name: St(),
|
|
3109
3329
|
yuno_tag: o,
|
|
3110
3330
|
yuno_version: r,
|
|
3111
3331
|
yuno_release: l,
|
|
@@ -3114,37 +3334,37 @@ function _i(e) {
|
|
|
3114
3334
|
pid: 0,
|
|
3115
3335
|
watcher_pid: 0,
|
|
3116
3336
|
jwt: tn(e, "jwt"),
|
|
3117
|
-
username: tn(
|
|
3337
|
+
username: tn(Ot(), "__username__"),
|
|
3118
3338
|
launch_id: 0,
|
|
3119
|
-
yuno_startdate: tn(
|
|
3120
|
-
id:
|
|
3339
|
+
yuno_startdate: tn(Ot(), "start_date"),
|
|
3340
|
+
id: yo(),
|
|
3121
3341
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3122
3342
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3123
3343
|
required_services: i
|
|
3124
3344
|
};
|
|
3125
|
-
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);
|
|
3126
3346
|
}
|
|
3127
|
-
function
|
|
3128
|
-
if (
|
|
3347
|
+
function ji(e, t) {
|
|
3348
|
+
if (el(t.event)) return -1;
|
|
3129
3349
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3130
3350
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3131
|
-
return
|
|
3351
|
+
return Bl(e, n, bi, wi(e, Rt(s), i)), Hl(e, n, "__subscribing__"), Ni(e, t.event, n);
|
|
3132
3352
|
}
|
|
3133
|
-
function
|
|
3353
|
+
function Di(e, t, n, r) {
|
|
3134
3354
|
let l = e.priv;
|
|
3135
|
-
return
|
|
3355
|
+
return Et(e) && (l.websocket = yi(e)), 0;
|
|
3136
3356
|
}
|
|
3137
|
-
function
|
|
3138
|
-
return
|
|
3357
|
+
function $i(e, t, n, r) {
|
|
3358
|
+
return ar("Websocket opened: " + e.priv.url), Ri(e), 0;
|
|
3139
3359
|
}
|
|
3140
|
-
function
|
|
3360
|
+
function Ai(e, t, n, r) {
|
|
3141
3361
|
let l = e.priv, o = n.e, i = n.url;
|
|
3142
|
-
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", {
|
|
3143
3363
|
url: i,
|
|
3144
3364
|
remote_yuno_name: l.remote_yuno_name,
|
|
3145
3365
|
remote_yuno_role: l.remote_yuno_role,
|
|
3146
3366
|
remote_yuno_service: l.remote_yuno_service
|
|
3147
|
-
})) : (
|
|
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", {
|
|
3148
3368
|
url: i,
|
|
3149
3369
|
remote_yuno_name: l.remote_yuno_name,
|
|
3150
3370
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -3152,7 +3372,7 @@ function di(e, t, n, r) {
|
|
|
3152
3372
|
code: o.code,
|
|
3153
3373
|
reason: o.reason,
|
|
3154
3374
|
was_clean: o.wasClean
|
|
3155
|
-
})),
|
|
3375
|
+
})), Et(e) && ri(l.gobj_timer, function(e) {
|
|
3156
3376
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3157
3377
|
r < n && (r = n);
|
|
3158
3378
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
@@ -3160,17 +3380,17 @@ function di(e, t, n, r) {
|
|
|
3160
3380
|
return Math.max(1, Math.round(o));
|
|
3161
3381
|
}(e)), 0;
|
|
3162
3382
|
}
|
|
3163
|
-
function
|
|
3164
|
-
return
|
|
3383
|
+
function Ii(e, t, n, r) {
|
|
3384
|
+
return Ri(e), 0;
|
|
3165
3385
|
}
|
|
3166
|
-
function
|
|
3386
|
+
function ki(e, t, n, r) {
|
|
3167
3387
|
let l = e.priv;
|
|
3168
|
-
|
|
3169
|
-
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", "");
|
|
3170
3390
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3171
|
-
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", {});
|
|
3172
3392
|
if (u < 0) {
|
|
3173
|
-
|
|
3393
|
+
vi(e);
|
|
3174
3394
|
let t = {
|
|
3175
3395
|
url: tn(e, "url"),
|
|
3176
3396
|
result: u,
|
|
@@ -3180,7 +3400,7 @@ function pi(e, t, n, r) {
|
|
|
3180
3400
|
remote_yuno_role: s,
|
|
3181
3401
|
remote_yuno_service: a
|
|
3182
3402
|
};
|
|
3183
|
-
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);
|
|
3184
3404
|
} else {
|
|
3185
3405
|
if (_n(e, "ST_SESSION"), l.inside_on_open = !0, l.retry_ms = 0, !l.inform_on_close) {
|
|
3186
3406
|
l.inform_on_close = !0;
|
|
@@ -3191,69 +3411,69 @@ function pi(e, t, n, r) {
|
|
|
3191
3411
|
remote_yuno_service: a,
|
|
3192
3412
|
services_roles: f
|
|
3193
3413
|
};
|
|
3194
|
-
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);
|
|
3195
3415
|
}
|
|
3196
3416
|
l.inside_on_open = !1, function(e) {
|
|
3197
|
-
let t =
|
|
3198
|
-
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]);
|
|
3199
3419
|
}(e);
|
|
3200
3420
|
}
|
|
3201
3421
|
return 0;
|
|
3202
3422
|
}
|
|
3203
|
-
function
|
|
3423
|
+
function Ci(e, t, n, r) {
|
|
3204
3424
|
let l = e.priv.url, o = function(e, t) {
|
|
3205
3425
|
let n;
|
|
3206
3426
|
try {
|
|
3207
3427
|
n = JSON.parse(t);
|
|
3208
3428
|
} catch (e) {
|
|
3209
|
-
return
|
|
3429
|
+
return or("parsing inter_event json: " + e), null;
|
|
3210
3430
|
}
|
|
3211
|
-
if (!(n instanceof Object)) return
|
|
3431
|
+
if (!(n instanceof Object)) return or("parsing inter_event: websocket data not a json object"), null;
|
|
3212
3432
|
let r = n.event;
|
|
3213
|
-
if (!r) return
|
|
3214
|
-
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;
|
|
3215
3435
|
let l = n.kw;
|
|
3216
3436
|
return l ? l instanceof Object ? {
|
|
3217
3437
|
event: r,
|
|
3218
3438
|
kw: l || {}
|
|
3219
|
-
} : (
|
|
3439
|
+
} : (or("parsing inter_event: kw not a json object"), null) : (or("parsing inter_kw: no kw"), null);
|
|
3220
3440
|
}(0, n.data);
|
|
3221
|
-
if (
|
|
3222
|
-
let e =
|
|
3223
|
-
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);
|
|
3224
3444
|
}
|
|
3225
3445
|
let i = o.event, s = o.kw;
|
|
3226
3446
|
if ("ST_SESSION" !== cn(e)) {
|
|
3227
3447
|
if (dn(e, i, P.EVF_PUBLIC_EVENT)) {
|
|
3228
3448
|
if (!(yn(e, i, s, e) < 0)) return 0;
|
|
3229
|
-
} else
|
|
3230
|
-
return
|
|
3449
|
+
} else or(`${Dt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3450
|
+
return vi(e), -1;
|
|
3231
3451
|
}
|
|
3232
3452
|
o = null;
|
|
3233
|
-
let a =
|
|
3234
|
-
if (_.toLowerCase() !== Nt().toLowerCase()) return
|
|
3235
|
-
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", "");
|
|
3236
3456
|
if ("__subscribing__" === a) return -1;
|
|
3237
3457
|
if ("__unsubscribing__" === a) return -1;
|
|
3238
3458
|
if (dn(e, i, P.EVF_PUBLIC_EVENT)) return yn(e, i, s, e), 0;
|
|
3239
|
-
if (!
|
|
3240
|
-
let t =
|
|
3241
|
-
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);
|
|
3242
3462
|
}
|
|
3243
|
-
return kt(e) ? yn(At(e), i, s, e) :
|
|
3463
|
+
return kt(e) ? yn(At(e), i, s, e) : Un(e, i, s), 0;
|
|
3244
3464
|
}
|
|
3245
|
-
function
|
|
3465
|
+
function Li(e, t, n, r) {
|
|
3246
3466
|
return 0;
|
|
3247
3467
|
}
|
|
3248
|
-
function
|
|
3468
|
+
function Ui(e, t, n, r) {
|
|
3249
3469
|
return 0;
|
|
3250
3470
|
}
|
|
3251
|
-
var
|
|
3471
|
+
var Pi = {
|
|
3252
3472
|
mt_create: function(e) {
|
|
3253
3473
|
let t = e.priv;
|
|
3254
|
-
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);
|
|
3255
3475
|
const n = nn(e, "subscriber");
|
|
3256
|
-
n &&
|
|
3476
|
+
n && $n(e, null, {}, n);
|
|
3257
3477
|
},
|
|
3258
3478
|
mt_writing: function(e, t) {
|
|
3259
3479
|
let n = e.priv;
|
|
@@ -3272,72 +3492,72 @@ var Ti = {
|
|
|
3272
3492
|
},
|
|
3273
3493
|
mt_start: function(e) {
|
|
3274
3494
|
let t = e.priv;
|
|
3275
|
-
return t.retry_ms = 0, t.websocket =
|
|
3495
|
+
return t.retry_ms = 0, t.websocket = yi(e), 0;
|
|
3276
3496
|
},
|
|
3277
3497
|
mt_stop: function(e) {
|
|
3278
3498
|
let t = e.priv;
|
|
3279
|
-
return
|
|
3499
|
+
return oi(t.gobj_timer), t.websocket && vi(e), 0;
|
|
3280
3500
|
},
|
|
3281
3501
|
mt_destroy: function(e) {},
|
|
3282
3502
|
mt_stats: function(e, t, n, r) {
|
|
3283
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3503
|
+
if ("ST_SESSION" !== cn(e)) return or("Not in session"), null;
|
|
3284
3504
|
n || (n = {});
|
|
3285
|
-
let l =
|
|
3286
|
-
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", {
|
|
3287
3507
|
stats: t,
|
|
3288
3508
|
kw: o
|
|
3289
|
-
}),
|
|
3509
|
+
}), Bl(e, n, bi, l), n.__stats__ = t, Hl(e, n, "__stats__"), Ni(e, "EV_MT_STATS", n, r), null;
|
|
3290
3510
|
},
|
|
3291
3511
|
mt_command_parser: function(e, t, n, r) {
|
|
3292
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3512
|
+
if ("ST_SESSION" !== cn(e)) return or("Not in session"), null;
|
|
3293
3513
|
n || (n = {});
|
|
3294
|
-
let l =
|
|
3295
|
-
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", {
|
|
3296
3516
|
command: t,
|
|
3297
3517
|
kw: o
|
|
3298
|
-
}),
|
|
3518
|
+
}), Bl(e, n, bi, l), n.__command__ = t, Hl(e, n, "__command__"), Ni(e, "EV_MT_COMMAND", n, r), null;
|
|
3299
3519
|
},
|
|
3300
3520
|
mt_inject_event: function(e, t, n, r) {
|
|
3301
3521
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3302
|
-
if (n
|
|
3522
|
+
if (n = Object.assign({}, Kr(n) ? n : {}), Kr(n.__md_iev__) && (n.__md_iev__ = wr(n.__md_iev__)), Jl(e, n, bi));
|
|
3303
3523
|
else {
|
|
3304
|
-
let l =
|
|
3305
|
-
|
|
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);
|
|
3306
3526
|
}
|
|
3307
|
-
return
|
|
3527
|
+
return Hl(e, n, "__message__"), Ni(e, t, n, r);
|
|
3308
3528
|
},
|
|
3309
3529
|
mt_subscription_added: function(e, t) {
|
|
3310
3530
|
let n = e.priv;
|
|
3311
|
-
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;
|
|
3312
3532
|
},
|
|
3313
3533
|
mt_subscription_deleted: function(e, t) {
|
|
3314
3534
|
let n = e.priv;
|
|
3315
3535
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3316
3536
|
if (n.inside_on_open) return 0;
|
|
3317
|
-
if (
|
|
3537
|
+
if (el(t.event)) return 0;
|
|
3318
3538
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3319
3539
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3320
|
-
return
|
|
3540
|
+
return Bl(e, r, bi, wi(e, Rt(a), s)), Hl(e, r, "__unsubscribing__"), Ni(e, t.event, r, e);
|
|
3321
3541
|
}
|
|
3322
3542
|
};
|
|
3323
|
-
function
|
|
3543
|
+
function Fi() {
|
|
3324
3544
|
return function(e) {
|
|
3325
|
-
if (
|
|
3545
|
+
if (Ti) return or(`GClass ALREADY created: ${e}`), -1;
|
|
3326
3546
|
const t = [
|
|
3327
3547
|
["ST_DISCONNECTED", [
|
|
3328
3548
|
[
|
|
3329
3549
|
"EV_ON_OPEN",
|
|
3330
|
-
|
|
3550
|
+
$i,
|
|
3331
3551
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3332
3552
|
],
|
|
3333
3553
|
[
|
|
3334
3554
|
"EV_ON_CLOSE",
|
|
3335
|
-
|
|
3555
|
+
Ai,
|
|
3336
3556
|
null
|
|
3337
3557
|
],
|
|
3338
3558
|
[
|
|
3339
3559
|
"EV_TIMEOUT",
|
|
3340
|
-
|
|
3560
|
+
Di,
|
|
3341
3561
|
null
|
|
3342
3562
|
],
|
|
3343
3563
|
[
|
|
@@ -3349,22 +3569,22 @@ function yi() {
|
|
|
3349
3569
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3350
3570
|
[
|
|
3351
3571
|
"EV_ON_MESSAGE",
|
|
3352
|
-
|
|
3572
|
+
Ci,
|
|
3353
3573
|
null
|
|
3354
3574
|
],
|
|
3355
3575
|
[
|
|
3356
3576
|
"EV_IDENTITY_CARD_ACK",
|
|
3357
|
-
|
|
3577
|
+
ki,
|
|
3358
3578
|
null
|
|
3359
3579
|
],
|
|
3360
3580
|
[
|
|
3361
3581
|
"EV_ON_CLOSE",
|
|
3362
|
-
|
|
3582
|
+
Ai,
|
|
3363
3583
|
"ST_DISCONNECTED"
|
|
3364
3584
|
],
|
|
3365
3585
|
[
|
|
3366
3586
|
"EV_TIMEOUT",
|
|
3367
|
-
|
|
3587
|
+
Ii,
|
|
3368
3588
|
null
|
|
3369
3589
|
],
|
|
3370
3590
|
[
|
|
@@ -3376,22 +3596,22 @@ function yi() {
|
|
|
3376
3596
|
["ST_SESSION", [
|
|
3377
3597
|
[
|
|
3378
3598
|
"EV_ON_MESSAGE",
|
|
3379
|
-
|
|
3599
|
+
Ci,
|
|
3380
3600
|
null
|
|
3381
3601
|
],
|
|
3382
3602
|
[
|
|
3383
3603
|
"EV_MT_STATS",
|
|
3384
|
-
|
|
3604
|
+
Li,
|
|
3385
3605
|
null
|
|
3386
3606
|
],
|
|
3387
3607
|
[
|
|
3388
3608
|
"EV_MT_COMMAND",
|
|
3389
|
-
|
|
3609
|
+
Ui,
|
|
3390
3610
|
null
|
|
3391
3611
|
],
|
|
3392
3612
|
[
|
|
3393
3613
|
"EV_ON_CLOSE",
|
|
3394
|
-
|
|
3614
|
+
Ai,
|
|
3395
3615
|
"ST_DISCONNECTED"
|
|
3396
3616
|
],
|
|
3397
3617
|
[
|
|
@@ -3402,7 +3622,7 @@ function yi() {
|
|
|
3402
3622
|
]],
|
|
3403
3623
|
[null, null]
|
|
3404
3624
|
];
|
|
3405
|
-
return (
|
|
3625
|
+
return (Ti = Ae(e, [
|
|
3406
3626
|
["EV_ON_MESSAGE", P.EVF_OUTPUT_EVENT],
|
|
3407
3627
|
["EV_IDENTITY_CARD_ACK", P.EVF_PUBLIC_EVENT],
|
|
3408
3628
|
["EV_ON_ID_NAK", P.EVF_PUBLIC_EVENT | P.EVF_OUTPUT_EVENT],
|
|
@@ -3413,9 +3633,9 @@ function yi() {
|
|
|
3413
3633
|
["EV_ON_OPEN_ERROR", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3414
3634
|
["EV_TIMEOUT", 0],
|
|
3415
3635
|
[null, 0]
|
|
3416
|
-
], t,
|
|
3636
|
+
], t, Pi, 0, pi, Ei, 0, 0, mi, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3417
3637
|
}("C_IEVENT_CLI");
|
|
3418
3638
|
}
|
|
3419
|
-
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 };
|
|
3420
3640
|
|
|
3421
3641
|
//# sourceMappingURL=gobj-js.es.min.js.map
|