@yuneta/gobj-js 7.26.0 → 7.26.2
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 +4 -3
- package/dist/gobj-js.cjs.js +80 -60
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +1003 -993
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +80 -60
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +219 -210
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +80 -60
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1059 -1049
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +80 -60
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +1059 -1049
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +3 -3
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -133,7 +133,7 @@ function s(e, t, n, r, l) {
|
|
|
133
133
|
data: l || []
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = Object.create(null), h = null, E = null,
|
|
136
|
+
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = Object.create(null), h = null, E = null, y = 0, T = Object.freeze({
|
|
137
137
|
DTP_STRING: 1,
|
|
138
138
|
DTP_BOOLEAN: 2,
|
|
139
139
|
DTP_INTEGER: 3,
|
|
@@ -143,7 +143,7 @@ var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b
|
|
|
143
143
|
DTP_JSON: 7,
|
|
144
144
|
DTP_POINTER: 8
|
|
145
145
|
});
|
|
146
|
-
|
|
146
|
+
T.DTP_POINTER;
|
|
147
147
|
var v = Object.freeze({
|
|
148
148
|
SDF_NOTACCESS: 1,
|
|
149
149
|
SDF_RD: 2,
|
|
@@ -230,7 +230,7 @@ function K() {
|
|
|
230
230
|
return W;
|
|
231
231
|
}
|
|
232
232
|
function Y(e) {
|
|
233
|
-
Yr(e) && (e = JSON.stringify(e)), ur(" ".repeat(Math.max(1, 2 *
|
|
233
|
+
Yr(e) && (e = JSON.stringify(e)), ur(" ".repeat(Math.max(1, 2 * y)) + String(e));
|
|
234
234
|
}
|
|
235
235
|
var B = Object.freeze({
|
|
236
236
|
TRACE_MACHINE: 65536,
|
|
@@ -425,12 +425,12 @@ function Ee(e, t, n) {
|
|
|
425
425
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
426
426
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function ye(e, t, n) {
|
|
429
429
|
if (!e) return ir("gobj_set_gobj_trace: gobj NULL"), -1;
|
|
430
430
|
const r = X(t, "gobj_set_gobj_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
431
431
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Te(e, t, n) {
|
|
434
434
|
const r = Jr(e) ? Me(e) : e;
|
|
435
435
|
if (!r) return ir(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
436
436
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_no_trace", r.s_user_trace_level || null);
|
|
@@ -470,19 +470,19 @@ function Ne(e, t) {
|
|
|
470
470
|
function we(e, t, n) {
|
|
471
471
|
let r, l = n.default_value;
|
|
472
472
|
switch (n.type) {
|
|
473
|
-
case
|
|
473
|
+
case T.DTP_STRING:
|
|
474
474
|
r = String(l);
|
|
475
475
|
break;
|
|
476
|
-
case
|
|
476
|
+
case T.DTP_BOOLEAN:
|
|
477
477
|
r = nl(l);
|
|
478
478
|
break;
|
|
479
|
-
case
|
|
479
|
+
case T.DTP_INTEGER:
|
|
480
480
|
r = parseInt(l), isNaN(r) && ir(`${$t(e)}: attr NaN: ${n.name}`);
|
|
481
481
|
break;
|
|
482
|
-
case
|
|
482
|
+
case T.DTP_REAL:
|
|
483
483
|
r = Number(l), isNaN(r) && ir(`${$t(e)}: attr NaN: ${n.name}`);
|
|
484
484
|
break;
|
|
485
|
-
case
|
|
485
|
+
case T.DTP_LIST:
|
|
486
486
|
if (Jr(l)) try {
|
|
487
487
|
r = JSON.parse(l);
|
|
488
488
|
} catch (e) {
|
|
@@ -491,7 +491,7 @@ function we(e, t, n) {
|
|
|
491
491
|
else r = l;
|
|
492
492
|
Br(r) || (r = []);
|
|
493
493
|
break;
|
|
494
|
-
case
|
|
494
|
+
case T.DTP_DICT:
|
|
495
495
|
if (Jr(l)) try {
|
|
496
496
|
r = JSON.parse(l);
|
|
497
497
|
} catch (e) {
|
|
@@ -500,7 +500,7 @@ function we(e, t, n) {
|
|
|
500
500
|
else r = l;
|
|
501
501
|
Yr(r) || (r = {});
|
|
502
502
|
break;
|
|
503
|
-
case
|
|
503
|
+
case T.DTP_JSON:
|
|
504
504
|
if ("" === l || void 0 === l) r = null;
|
|
505
505
|
else if (Jr(l)) try {
|
|
506
506
|
r = JSON.parse(l);
|
|
@@ -509,14 +509,14 @@ function we(e, t, n) {
|
|
|
509
509
|
}
|
|
510
510
|
else r = l;
|
|
511
511
|
break;
|
|
512
|
-
case
|
|
512
|
+
case T.DTP_POINTER: r = l;
|
|
513
513
|
}
|
|
514
514
|
return void 0 === r && (ir(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
515
|
}
|
|
516
516
|
function je(e, t, n, r) {
|
|
517
517
|
let l;
|
|
518
518
|
switch (n.type) {
|
|
519
|
-
case
|
|
519
|
+
case T.DTP_STRING:
|
|
520
520
|
if (null == r) l = "";
|
|
521
521
|
else if (Jr(r)) l = String(r);
|
|
522
522
|
else {
|
|
@@ -524,16 +524,16 @@ function je(e, t, n, r) {
|
|
|
524
524
|
e && (l = String(e));
|
|
525
525
|
}
|
|
526
526
|
break;
|
|
527
|
-
case
|
|
527
|
+
case T.DTP_BOOLEAN:
|
|
528
528
|
l = nl(r);
|
|
529
529
|
break;
|
|
530
|
-
case
|
|
530
|
+
case T.DTP_INTEGER:
|
|
531
531
|
if (l = parseInt(r), isNaN(l)) return ir(`${$t(e)}: attr NaN: ${n.name}`), -1;
|
|
532
532
|
break;
|
|
533
|
-
case
|
|
533
|
+
case T.DTP_REAL:
|
|
534
534
|
if (l = Number(r), isNaN(l)) return ir(`${$t(e)}: attr NaN: ${n.name}`), -1;
|
|
535
535
|
break;
|
|
536
|
-
case
|
|
536
|
+
case T.DTP_LIST:
|
|
537
537
|
if (Jr(r)) try {
|
|
538
538
|
l = JSON.parse(r);
|
|
539
539
|
} catch (e) {
|
|
@@ -542,7 +542,7 @@ function je(e, t, n, r) {
|
|
|
542
542
|
else l = r;
|
|
543
543
|
if (!Br(l)) return ir(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
|
-
case
|
|
545
|
+
case T.DTP_DICT:
|
|
546
546
|
if (Jr(r)) try {
|
|
547
547
|
l = JSON.parse(r);
|
|
548
548
|
} catch (e) {
|
|
@@ -551,16 +551,19 @@ function je(e, t, n, r) {
|
|
|
551
551
|
else l = r;
|
|
552
552
|
if (!Yr(l)) return ir(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
|
-
case
|
|
555
|
-
if (l = r, Jr(r))
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
554
|
+
case T.DTP_JSON:
|
|
555
|
+
if (l = r, Jr(r)) {
|
|
556
|
+
const e = r.trim();
|
|
557
|
+
if (e.startsWith("{") || e.startsWith("[")) try {
|
|
558
|
+
l = JSON.parse(e);
|
|
559
|
+
} catch (e) {
|
|
560
|
+
l = r;
|
|
561
|
+
}
|
|
559
562
|
}
|
|
560
563
|
break;
|
|
561
|
-
case
|
|
564
|
+
case T.DTP_POINTER: l = r;
|
|
562
565
|
}
|
|
563
|
-
return void 0 === l && ir(`${$t(e)}: attr undefined: ${n.name}`), t[n.name] = l, Yr(e.priv) &&
|
|
566
|
+
return void 0 === l && ir(`${$t(e)}: attr undefined: ${n.name}`), t[n.name] = l, Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
564
567
|
}
|
|
565
568
|
function Re(e) {
|
|
566
569
|
return e.jn_attrs;
|
|
@@ -715,13 +718,13 @@ function Je(e, t) {
|
|
|
715
718
|
n >= 0 && (Vr(e.dl_children, n), t.parent = null);
|
|
716
719
|
}
|
|
717
720
|
function qe(e, t) {
|
|
718
|
-
return
|
|
721
|
+
return Tt(e) ? u ? u(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
719
722
|
}
|
|
720
723
|
function He(e, t) {
|
|
721
|
-
return
|
|
724
|
+
return Tt(e) ? _ ? _(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
722
725
|
}
|
|
723
726
|
function Qe(e, t) {
|
|
724
|
-
return
|
|
727
|
+
return Tt(e) ? c ? c(e, t) : -1 : (ir(`${$t(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
725
728
|
}
|
|
726
729
|
function ze(e, t) {
|
|
727
730
|
return f ? f(e, t) : null;
|
|
@@ -820,13 +823,13 @@ function at(e) {
|
|
|
820
823
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
821
824
|
}
|
|
822
825
|
function ut(e, t, n) {
|
|
823
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || Et(e) ||
|
|
826
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || Et(e) || yt(e) || at(e), 0;
|
|
824
827
|
}
|
|
825
828
|
function _t(e) {
|
|
826
829
|
return Ct(e) ? (ir("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, ut, 0, 0);
|
|
827
830
|
}
|
|
828
831
|
function ct(e, t, n) {
|
|
829
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start ||
|
|
832
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || yt(e) ? 1 : (Et(e) || at(e), 0);
|
|
830
833
|
}
|
|
831
834
|
function ft(e) {
|
|
832
835
|
return Ct(e) ? (ir("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", Dt(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Vt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
@@ -865,10 +868,10 @@ function ht(e) {
|
|
|
865
868
|
function Et(e) {
|
|
866
869
|
return !Ct(e) && e.running;
|
|
867
870
|
}
|
|
868
|
-
function
|
|
871
|
+
function yt(e) {
|
|
869
872
|
return !!Ct(e) || e.disabled;
|
|
870
873
|
}
|
|
871
|
-
function
|
|
874
|
+
function Tt(e) {
|
|
872
875
|
return !!(e && e.gobj_flag & L.gobj_flag_service);
|
|
873
876
|
}
|
|
874
877
|
function vt(e) {
|
|
@@ -1046,7 +1049,7 @@ function Qt(e, t) {
|
|
|
1046
1049
|
}
|
|
1047
1050
|
function zt(e, t, n) {
|
|
1048
1051
|
let r = e.jn_attrs;
|
|
1049
|
-
if (t in r &&
|
|
1052
|
+
if (t in r && Object.prototype.hasOwnProperty.call(r, t)) {
|
|
1050
1053
|
let n = r[t];
|
|
1051
1054
|
return e.gclass.gmt.mt_reading ? e.gclass.gmt.mt_reading(e, t, n) : n;
|
|
1052
1055
|
}
|
|
@@ -1065,10 +1068,10 @@ function Xt(e, t, n) {
|
|
|
1065
1068
|
}
|
|
1066
1069
|
function Zt(e, t) {
|
|
1067
1070
|
if (t) {
|
|
1068
|
-
if (0 === ol(t, "__disabled__")) return
|
|
1071
|
+
if (0 === ol(t, "__disabled__")) return yt(e);
|
|
1069
1072
|
if (0 === ol(t, "__running__")) return Et(e);
|
|
1070
1073
|
if (0 === ol(t, "__playing__")) return vt(e);
|
|
1071
|
-
if (0 === ol(t, "__service__")) return
|
|
1074
|
+
if (0 === ol(t, "__service__")) return Tt(e);
|
|
1072
1075
|
}
|
|
1073
1076
|
let n = $e(e, t, !1);
|
|
1074
1077
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? kr(n, t) : e.gclass.gmt.mt_reading(e, t) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
@@ -1092,7 +1095,7 @@ function rn(e, n, r, l) {
|
|
|
1092
1095
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1093
1096
|
if (s.length <= 1) {
|
|
1094
1097
|
let l = n;
|
|
1095
|
-
return l in i &&
|
|
1098
|
+
return l in i && Object.prototype.hasOwnProperty.call(i, l) ? (i[l] = r, Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (ir(t("gobj_write_attr(%s): attr not found '%s'", $t(e), l)), -1);
|
|
1096
1099
|
}
|
|
1097
1100
|
let a = s.length;
|
|
1098
1101
|
for (let t = 0; t < a; t++) {
|
|
@@ -1103,7 +1106,7 @@ function rn(e, n, r, l) {
|
|
|
1103
1106
|
continue;
|
|
1104
1107
|
}
|
|
1105
1108
|
let l = e.jn_attrs;
|
|
1106
|
-
if (o in l &&
|
|
1109
|
+
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o), 0;
|
|
1107
1110
|
break;
|
|
1108
1111
|
}
|
|
1109
1112
|
return ir(t("gobj_write_attr(%s): attr not found '%s'", $t(e), o)), -1;
|
|
@@ -1114,7 +1117,7 @@ function ln(e) {
|
|
|
1114
1117
|
let r = e.gclass.attrs_table;
|
|
1115
1118
|
for (let l = 0; l < r.length; l++) {
|
|
1116
1119
|
const o = r[l];
|
|
1117
|
-
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o), Yr(e.priv) &&
|
|
1120
|
+
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o.name) && (e.priv[o.name] = e.jn_attrs[o.name]), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name)));
|
|
1118
1121
|
}
|
|
1119
1122
|
return 0;
|
|
1120
1123
|
}(e, v.SDF_VOLATIL, 0);
|
|
@@ -1129,15 +1132,15 @@ function on(e, t, n, r) {
|
|
|
1129
1132
|
}
|
|
1130
1133
|
function sn(e, t, n) {
|
|
1131
1134
|
let r = $e(e, t, !1);
|
|
1132
|
-
return r ? (r[t] = nl(n), Yr(e.priv) &&
|
|
1135
|
+
return r ? (r[t] = nl(n), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1133
1136
|
}
|
|
1134
1137
|
function an(e, t, n) {
|
|
1135
1138
|
let r = $e(e, t, !1);
|
|
1136
|
-
return r ? (r[t] = parseInt(n), Yr(e.priv) &&
|
|
1139
|
+
return r ? (r[t] = parseInt(n), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1137
1140
|
}
|
|
1138
1141
|
function un(e, t, n) {
|
|
1139
1142
|
let r = $e(e, t, !1);
|
|
1140
|
-
return r ? (r[t] = String(n), Yr(e.priv) &&
|
|
1143
|
+
return r ? (r[t] = String(n), Yr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (ir(`${$t(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1141
1144
|
}
|
|
1142
1145
|
function _n(e, n) {
|
|
1143
1146
|
if (Ct(e)) return ir("gobj NULL or DESTROYED"), null;
|
|
@@ -1184,12 +1187,12 @@ function hn(e, n, r, l) {
|
|
|
1184
1187
|
event: n,
|
|
1185
1188
|
kw: r,
|
|
1186
1189
|
src: l
|
|
1187
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", $t(e), n, pn.length)), mn || (mn = !0, setTimeout(
|
|
1190
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", $t(e), n, pn.length)), mn || (mn = !0, setTimeout(yn, 0)), 0) : (ir(`gobj_post_event(): event NOT DEFINED in gclass ${Rt(e)}, event ${n}`), -1) : (ir(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1188
1191
|
}
|
|
1189
1192
|
function En() {
|
|
1190
1193
|
return pn.length;
|
|
1191
1194
|
}
|
|
1192
|
-
function
|
|
1195
|
+
function yn() {
|
|
1193
1196
|
mn = !1;
|
|
1194
1197
|
let e = pn;
|
|
1195
1198
|
pn = [];
|
|
@@ -1198,24 +1201,24 @@ function Tn() {
|
|
|
1198
1201
|
const r = e[n];
|
|
1199
1202
|
if (!(r.dst.obflag & (P.obflag_destroyed | P.obflag_destroying))) {
|
|
1200
1203
|
try {
|
|
1201
|
-
|
|
1204
|
+
Tn(r.dst, r.event, r.kw, r.src);
|
|
1202
1205
|
} catch (t) {
|
|
1203
|
-
throw (pn = e.slice(n + 1).concat(pn)).length > 0 && !mn && (mn = !0, setTimeout(
|
|
1206
|
+
throw (pn = e.slice(n + 1).concat(pn)).length > 0 && !mn && (mn = !0, setTimeout(yn, 0)), t;
|
|
1204
1207
|
}
|
|
1205
1208
|
t++;
|
|
1206
1209
|
}
|
|
1207
1210
|
}
|
|
1208
|
-
return pn.length > 0 && !mn && (mn = !0, setTimeout(
|
|
1211
|
+
return pn.length > 0 && !mn && (mn = !0, setTimeout(yn, 0)), t;
|
|
1209
1212
|
}
|
|
1210
|
-
function
|
|
1213
|
+
function Tn(e, n, r, l) {
|
|
1211
1214
|
if (!(e && e instanceof k)) return ir("gobj dst NULL"), -1;
|
|
1212
1215
|
if (e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return ir("gobj dst DESTROYED"), -1;
|
|
1213
1216
|
let o = e.current_state;
|
|
1214
1217
|
if (!o) return ir(`${$t(e)}: current_state NULL`), -1;
|
|
1215
1218
|
let i = oe(e, n) && !ie(l, n);
|
|
1216
|
-
|
|
1219
|
+
y++;
|
|
1217
1220
|
let s = Ce(o, n);
|
|
1218
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (
|
|
1221
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (y--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", $t(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", $t(e), o.state_name, n || "", l && !l.running ? "!!" : "", $t(l))), r && le(e) && Mr(r) && wr(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 ? "" : "!!", Rt(e), jt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Rt(l), jt(l))), ir(`📛📛 Event NOT DEFINED in state 📛📛: ${$t(e)}, ${o.state_name}, ${n}`), y--, -1);
|
|
1219
1222
|
if (i) {
|
|
1220
1223
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", $t(e), o.state_name, l && !l.running ? "!!" : "", $t(l)));
|
|
1221
1224
|
else {
|
|
@@ -1229,15 +1232,15 @@ function yn(e, n, r, l) {
|
|
|
1229
1232
|
try {
|
|
1230
1233
|
s.action && (a = s.action(e, n, r, l));
|
|
1231
1234
|
} catch (t) {
|
|
1232
|
-
if (
|
|
1233
|
-
ir(`${$t(e)}: action of ${n} in ${
|
|
1235
|
+
if (y--, !t || !t.__gobj_logged__) {
|
|
1236
|
+
ir(`${$t(e)}: action of ${n} in ${o.state_name} THREW: ${t && t.stack ? t.stack : t}`);
|
|
1234
1237
|
try {
|
|
1235
1238
|
t.__gobj_logged__ = !0;
|
|
1236
1239
|
} catch (e) {}
|
|
1237
1240
|
}
|
|
1238
1241
|
throw t;
|
|
1239
1242
|
}
|
|
1240
|
-
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Rt(e), jt(e), e.current_state.state_name, n || "", qr(a) ? a : 0)),
|
|
1243
|
+
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Rt(e), jt(e), e.current_state.state_name, n || "", qr(a) ? a : 0)), y--, a;
|
|
1241
1244
|
}
|
|
1242
1245
|
var vn = Object.freeze({
|
|
1243
1246
|
__rename_event_name__: 1,
|
|
@@ -1256,16 +1259,16 @@ function On(e) {
|
|
|
1256
1259
|
return null;
|
|
1257
1260
|
}
|
|
1258
1261
|
var Sn = [
|
|
1259
|
-
N(
|
|
1260
|
-
N(
|
|
1261
|
-
N(
|
|
1262
|
-
N(
|
|
1263
|
-
N(
|
|
1264
|
-
N(
|
|
1265
|
-
N(
|
|
1266
|
-
N(
|
|
1267
|
-
N(
|
|
1268
|
-
N(
|
|
1262
|
+
N(T.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
1263
|
+
N(T.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
1264
|
+
N(T.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
1265
|
+
N(T.DTP_STRING, "renamed_event", 0, "", "rename event name"),
|
|
1266
|
+
N(T.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
|
|
1267
|
+
N(T.DTP_JSON, "__config__", 0, null, "subscription config"),
|
|
1268
|
+
N(T.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
|
|
1269
|
+
N(T.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
1270
|
+
N(T.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
1271
|
+
N(T.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
1269
1272
|
S()
|
|
1270
1273
|
];
|
|
1271
1274
|
function Nn(e, t) {
|
|
@@ -1274,26 +1277,26 @@ function Nn(e, t) {
|
|
|
1274
1277
|
kw: e,
|
|
1275
1278
|
renamed_event: ""
|
|
1276
1279
|
};
|
|
1277
|
-
let r =
|
|
1280
|
+
let r = Dr({}, e), l = Dr({}, n);
|
|
1278
1281
|
r.__config__ = l;
|
|
1279
1282
|
let o = "", i = l.__rename_event_name__, s = "string" != typeof i || tl(i) ? null : On(i);
|
|
1280
|
-
return s && (o = s.event_name, delete l.__rename_event_name__, t && xr(r.__global__) > 0 && (r.__global__ =
|
|
1283
|
+
return s && (o = s.event_name, delete l.__rename_event_name__, t && xr(r.__global__) > 0 && (r.__global__ = Dr(Dr({}, r.__global__), { __original_event_name__: t }))), delete l.__hard_subscription__, delete l.__own_event__, {
|
|
1281
1284
|
kw: r,
|
|
1282
1285
|
renamed_event: o
|
|
1283
1286
|
};
|
|
1284
1287
|
}
|
|
1285
1288
|
function wn(e, t, n, r, l, o) {
|
|
1286
|
-
let i =
|
|
1287
|
-
if (t && t !==
|
|
1288
|
-
let t =
|
|
1289
|
+
let i = Tl(t, l, "__config__", null), s = Tl(t, l, "__global__", null), a = Tl(t, l, "__local__", null), u = vl(t, l, "__filter__", null), _ = !0;
|
|
1290
|
+
if (t && t !== yl(null, e, "publisher", null) && (_ = !1), o && o !== yl(null, e, "subscriber", null) && (_ = !1), n && n !== El(null, e, "event", "") && (_ = !1), r && r !== El(null, e, "renamed_event", "") && (_ = !1), xr(i) > 0) {
|
|
1291
|
+
let t = Tl(null, e, "__config__", null);
|
|
1289
1292
|
xr(t) > 0 && $r(t, i) || (_ = !1);
|
|
1290
1293
|
}
|
|
1291
1294
|
if (xr(s) > 0) {
|
|
1292
|
-
let t =
|
|
1295
|
+
let t = Tl(null, e, "__global__", null);
|
|
1293
1296
|
xr(t) > 0 && $r(t, s) || (_ = !1);
|
|
1294
1297
|
}
|
|
1295
1298
|
if (xr(a) > 0) {
|
|
1296
|
-
let t =
|
|
1299
|
+
let t = Tl(null, e, "__local__", null);
|
|
1297
1300
|
xr(t) > 0 && $r(t, a) || (_ = !1);
|
|
1298
1301
|
}
|
|
1299
1302
|
if (xr(u) > 0) {
|
|
@@ -1314,7 +1317,7 @@ function Rn(e, t) {
|
|
|
1314
1317
|
return e.indexOf(t);
|
|
1315
1318
|
}
|
|
1316
1319
|
function $n(e, n, r, l) {
|
|
1317
|
-
let o =
|
|
1320
|
+
let o = yl(e, n, "publisher", null, Vn.KW_REQUIRED), i = yl(e, n, "subscriber", null, Vn.KW_REQUIRED), s = El(e, n, "event", "", Vn.KW_REQUIRED);
|
|
1318
1321
|
if (!!(ml(e, n, "subs_flag", null, Vn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1319
1322
|
let a = ne(i) || ne(o);
|
|
1320
1323
|
if (Rn(o.dl_subscriptions, n) < 0) return a && Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", s || "", $t(o), $t(i))), 1;
|
|
@@ -1348,7 +1351,7 @@ function Dn(e, n, r, l) {
|
|
|
1348
1351
|
Pr(l, "event", t), Pr(l, "subscriber", r), Pr(l, "publisher", e);
|
|
1349
1352
|
let o = 0;
|
|
1350
1353
|
if (n) {
|
|
1351
|
-
let r =
|
|
1354
|
+
let r = Tl(e, n, "__config__", null), i = Tl(e, n, "__global__", null), s = Tl(e, n, "__local__", null), a = vl(e, n, "__filter__", null), u = El(e, n, "__service__", "");
|
|
1352
1355
|
if (xr(i) > 0 && Pr(l, "__global__", jr(i)), xr(r) > 0) {
|
|
1353
1356
|
let n = jr(r);
|
|
1354
1357
|
Pr(l, "__config__", n);
|
|
@@ -1357,7 +1360,7 @@ function Dn(e, n, r, l) {
|
|
|
1357
1360
|
let r = On(i);
|
|
1358
1361
|
if (r) {
|
|
1359
1362
|
Pr(l, "renamed_event", r.event_name), delete n.__rename_event_name__, o |= vn.__rename_event_name__;
|
|
1360
|
-
let i =
|
|
1363
|
+
let i = Tl(e, l, "__global__", null);
|
|
1361
1364
|
Yr(i) || (i = {}, Pr(l, "__global__", i)), i.__original_event_name__ = t;
|
|
1362
1365
|
} else ir(`${$t(e)}: EVENT NOT FOUND (__rename_event_name__: ${i})`);
|
|
1363
1366
|
}
|
|
@@ -1413,12 +1416,12 @@ function kn(e, t, n, r) {
|
|
|
1413
1416
|
function Cn(e) {
|
|
1414
1417
|
let t = kn(e, null, null, null);
|
|
1415
1418
|
for (let n = 0; n < t.length; n++) {
|
|
1416
|
-
let r = t[n], l =
|
|
1419
|
+
let r = t[n], l = yl(e, r, "publisher", null, Vn.KW_REQUIRED), o = yl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1417
1420
|
Pr(r, "s_event", El(e, r, "event", "", Vn.KW_REQUIRED)), Pr(r, "s_publisher", $t(l)), Pr(r, "s_subscriber", $t(o));
|
|
1418
1421
|
}
|
|
1419
1422
|
let n = Ln(e, 0, null, 0);
|
|
1420
1423
|
for (let t = 0; t < n.length; t++) {
|
|
1421
|
-
let r = n[t], l =
|
|
1424
|
+
let r = n[t], l = yl(e, r, "publisher", null, Vn.KW_REQUIRED), o = yl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1422
1425
|
Pr(r, "s_event", El(e, r, "event", "", Vn.KW_REQUIRED)), Pr(r, "s_publisher", $t(l)), Pr(r, "s_subscriber", $t(o));
|
|
1423
1426
|
}
|
|
1424
1427
|
return {
|
|
@@ -1449,12 +1452,12 @@ function Pn(e, n, r) {
|
|
|
1449
1452
|
if (t < 0) break;
|
|
1450
1453
|
if (!t) continue;
|
|
1451
1454
|
}
|
|
1452
|
-
let _ =
|
|
1455
|
+
let _ = yl(e, u, "subscriber", null, Vn.KW_REQUIRED);
|
|
1453
1456
|
if (!_ || Ct(_)) continue;
|
|
1454
1457
|
let c = ml(e, u, "subs_flag", 0, Vn.KW_REQUIRED), f = El(e, u, "event", "", Vn.KW_REQUIRED);
|
|
1455
1458
|
if (tl(f) || 0 === ol(f, n)) {
|
|
1456
|
-
|
|
1457
|
-
let l =
|
|
1459
|
+
Tl(e, u, "__config__", null, 0);
|
|
1460
|
+
let l = Tl(e, u, "__global__", null, 0), i = Tl(e, u, "__local__", null, 0), f = vl(e, u, "__filter__", null, 0), g = u.renamed_event;
|
|
1458
1461
|
tl(g) && (g = n);
|
|
1459
1462
|
let d = 1;
|
|
1460
1463
|
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) : xr(f) > 0 && (d = jl(r, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", $t(_), $t(e))), cr(f))), d < 0) break;
|
|
@@ -1462,8 +1465,8 @@ function Pn(e, n, r) {
|
|
|
1462
1465
|
let b = gn(_, n, !0);
|
|
1463
1466
|
if (b && b.event_flag & U.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1464
1467
|
let p = r;
|
|
1465
|
-
(xr(i) > 0 || xr(l) > 0) && (p =
|
|
1466
|
-
let m =
|
|
1468
|
+
(xr(i) > 0 || xr(l) > 0) && (p = Dr({}, r)), xr(i) > 0 && _l(p, i), xr(l) > 0 && Dr(p, jr(l)), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", g || "", _.running ? "" : "!!", $t(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", _.running ? "" : "!!", $t(_), cn(_), n || "", g || "", e && !e.running ? "!!" : "", $t(e))), le(e) && Mr(p) && wr(p));
|
|
1469
|
+
let m = Tn(_, g, p, e);
|
|
1467
1470
|
if (m < 0 && c & vn.__own_event__) {
|
|
1468
1471
|
s = -1;
|
|
1469
1472
|
break;
|
|
@@ -1478,7 +1481,7 @@ function Un(e, n, r, l) {
|
|
|
1478
1481
|
if (function(e) {
|
|
1479
1482
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1480
1483
|
}(e) || oe(e, null) && !ie(l, null)) {
|
|
1481
|
-
let o =
|
|
1484
|
+
let o = yr(n);
|
|
1482
1485
|
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", $t(e), null !== o ? o : n, $t(l))), le(e) && wr(r);
|
|
1483
1486
|
}
|
|
1484
1487
|
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", $t(e)), 0, 0) : o(0, -1, t("%s: command table not available", $t(e)), 0, 0);
|
|
@@ -1598,27 +1601,27 @@ function or(e) {
|
|
|
1598
1601
|
return n;
|
|
1599
1602
|
}
|
|
1600
1603
|
function ir(e, ...t) {
|
|
1601
|
-
let n = or(e, ...t), r =
|
|
1604
|
+
let n = or(e, ...t), r = To();
|
|
1602
1605
|
Mn && (Mn === Gn.error ? Zn("error", n) && Mn("%c" + r + " ERROR: " + String(n), "color:red") : (Zn("error", n) && Gn.error("%c" + r + " ERROR: " + String(n), "color:red"), Mn(`${r} ERROR: ${String(n)}`))), tr("error", n, r);
|
|
1603
1606
|
}
|
|
1604
1607
|
function sr(e, ...t) {
|
|
1605
|
-
let n = or(e, ...t), r =
|
|
1608
|
+
let n = or(e, ...t), r = To();
|
|
1606
1609
|
Wn && (Wn === Gn.warn ? Zn("warning", n) && Wn("%c" + r + " WARNING: " + String(n), "color:yellow") : (Zn("warning", n) && Gn.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), Wn(`${r} WARNING: ${String(n)}`))), tr("warning", n, r);
|
|
1607
1610
|
}
|
|
1608
1611
|
function ar(e, ...t) {
|
|
1609
|
-
let n = or(e, ...t), r =
|
|
1612
|
+
let n = or(e, ...t), r = To();
|
|
1610
1613
|
xn && Zn("info", n) && xn("%c" + r + " INFO: " + String(n), "color:cyan"), tr("info", n, r);
|
|
1611
1614
|
}
|
|
1612
1615
|
function ur(e, ...t) {
|
|
1613
|
-
let n = or(e, ...t), r =
|
|
1616
|
+
let n = or(e, ...t), r = To();
|
|
1614
1617
|
Kn && Zn("debug", n) && Kn("%c" + r + " DEBUG: " + String(n), "color:silver"), tr("debug", n, r);
|
|
1615
1618
|
}
|
|
1616
1619
|
function _r(e, ...t) {
|
|
1617
|
-
let n = or(e, ...t), r =
|
|
1620
|
+
let n = or(e, ...t), r = To();
|
|
1618
1621
|
Kn && Zn("msg", n) && Kn("%c" + r + " MSG: " + String(n), "color:cyan"), tr("msg", n, r);
|
|
1619
1622
|
}
|
|
1620
1623
|
function cr(e, t) {
|
|
1621
|
-
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e,
|
|
1624
|
+
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e, To());
|
|
1622
1625
|
}
|
|
1623
1626
|
var fr = [
|
|
1624
1627
|
"passw",
|
|
@@ -1696,7 +1699,7 @@ function pr(e, t, n) {
|
|
|
1696
1699
|
}
|
|
1697
1700
|
}
|
|
1698
1701
|
var mr = 128, hr = 4194304, Er = "<not shown: too large to mask>";
|
|
1699
|
-
function
|
|
1702
|
+
function yr(e) {
|
|
1700
1703
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1701
1704
|
if (e.length > hr) return Er;
|
|
1702
1705
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
@@ -1728,13 +1731,13 @@ function Tr(e) {
|
|
|
1728
1731
|
}
|
|
1729
1732
|
return i ? (l.push(e.substring(o)), l.join("")) : null;
|
|
1730
1733
|
}
|
|
1731
|
-
var
|
|
1734
|
+
var Tr = 64, vr = "<not shown: the masking failed>";
|
|
1732
1735
|
var Or = Symbol("mask-in-progress");
|
|
1733
1736
|
function Sr(e, t, n, r) {
|
|
1734
1737
|
if ("string" == typeof e) {
|
|
1735
1738
|
if (e.length > r.left) return r.left = 0, Er;
|
|
1736
1739
|
r.left -= e.length;
|
|
1737
|
-
let t =
|
|
1740
|
+
let t = yr(e);
|
|
1738
1741
|
return null !== t ? t : e;
|
|
1739
1742
|
}
|
|
1740
1743
|
let l = Array.isArray(e);
|
|
@@ -1748,7 +1751,7 @@ function Sr(e, t, n, r) {
|
|
|
1748
1751
|
let n = t.get(e);
|
|
1749
1752
|
return n === Or ? "<cycle>" : n;
|
|
1750
1753
|
}
|
|
1751
|
-
if (n >=
|
|
1754
|
+
if (n >= Tr) return "<deeper not shown>";
|
|
1752
1755
|
r.left -= 1, t.set(e, Or);
|
|
1753
1756
|
let o, i = !1, s = !1;
|
|
1754
1757
|
if (l) {
|
|
@@ -1774,7 +1777,7 @@ function Sr(e, t, n, r) {
|
|
|
1774
1777
|
}
|
|
1775
1778
|
r.left -= 1 + a.length;
|
|
1776
1779
|
let u, _ = e[a];
|
|
1777
|
-
u = (br(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" : Sr(_, t, n + 1, r), u !== _ && (i = !0), o
|
|
1780
|
+
u = (br(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" : Sr(_, t, n + 1, r), u !== _ && (i = !0), gl(o, a, u);
|
|
1778
1781
|
}
|
|
1779
1782
|
s && (o["<more>"] = Er);
|
|
1780
1783
|
}
|
|
@@ -1795,10 +1798,7 @@ function jr(e) {
|
|
|
1795
1798
|
}
|
|
1796
1799
|
function Rr(...e) {
|
|
1797
1800
|
const t = {};
|
|
1798
|
-
for (const n of e)
|
|
1799
|
-
const e = structuredClone(n);
|
|
1800
|
-
Object.assign(t, e);
|
|
1801
|
-
}
|
|
1801
|
+
for (const n of e) Dr(t, structuredClone(n));
|
|
1802
1802
|
return t;
|
|
1803
1803
|
}
|
|
1804
1804
|
function $r(e, t) {
|
|
@@ -1824,30 +1824,30 @@ function $r(e, t) {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
function Dr(e, t) {
|
|
1826
1826
|
if (!t) return e;
|
|
1827
|
-
for (let n of Object.keys(t)) e
|
|
1827
|
+
for (let n of Object.keys(t)) gl(e, n, t[n]);
|
|
1828
1828
|
return e;
|
|
1829
1829
|
}
|
|
1830
1830
|
function Ar(e, t) {
|
|
1831
1831
|
if (!t) return e;
|
|
1832
|
-
for (let n in t)
|
|
1832
|
+
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && Object.prototype.hasOwnProperty.call(e, n) && gl(e, n, t[n]);
|
|
1833
1833
|
return e;
|
|
1834
1834
|
}
|
|
1835
1835
|
function Ir(e, t) {
|
|
1836
1836
|
if (!t) return e;
|
|
1837
|
-
for (let n in t)
|
|
1837
|
+
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) && gl(e, n, t[n]);
|
|
1838
1838
|
return e;
|
|
1839
1839
|
}
|
|
1840
1840
|
function kr(e, t) {
|
|
1841
|
-
if (e &&
|
|
1841
|
+
if (e && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
1842
1842
|
}
|
|
1843
1843
|
function Cr(e, t) {
|
|
1844
|
-
e &&
|
|
1844
|
+
e && Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
|
|
1845
1845
|
}
|
|
1846
1846
|
function Lr(e, t, n) {
|
|
1847
|
-
e
|
|
1847
|
+
gl(e, t, n);
|
|
1848
1848
|
}
|
|
1849
1849
|
function Pr(e, t, n) {
|
|
1850
|
-
e
|
|
1850
|
+
gl(e, t, n);
|
|
1851
1851
|
}
|
|
1852
1852
|
function Ur(e, t) {
|
|
1853
1853
|
e.push(t);
|
|
@@ -1957,10 +1957,10 @@ function _l(e, t) {
|
|
|
1957
1957
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1958
1958
|
}
|
|
1959
1959
|
function cl(e, t) {
|
|
1960
|
-
return !(!(t in e) || !
|
|
1960
|
+
return !(!(t in e) || !Object.prototype.hasOwnProperty.call(e, t));
|
|
1961
1961
|
}
|
|
1962
1962
|
function fl(e, t) {
|
|
1963
|
-
return
|
|
1963
|
+
return !Object.prototype.hasOwnProperty.call(e, t);
|
|
1964
1964
|
}
|
|
1965
1965
|
function gl(e, t, n) {
|
|
1966
1966
|
"__proto__" === t ? Object.defineProperty(e, t, {
|
|
@@ -1977,6 +1977,10 @@ function dl(e, t, n, r) {
|
|
|
1977
1977
|
if (!Jr(n)) return void ir(`${l}path must be a string: ${String(n)}`);
|
|
1978
1978
|
let o = n.split("`"), i = o.length;
|
|
1979
1979
|
for (let e = 0; e < i; e++) {
|
|
1980
|
+
if (Br(t)) {
|
|
1981
|
+
if (!/^[0-9]+$/.test(o[e])) return void (r && ir(`${l}path not found: '${n}'`));
|
|
1982
|
+
o[e] = String(Number(o[e]));
|
|
1983
|
+
}
|
|
1980
1984
|
if (fl(t, o[e])) return void (r && ir(`${l}path not found: '${n}'`));
|
|
1981
1985
|
if (e === i - 1) break;
|
|
1982
1986
|
if (null == (t = t[o[e]])) return void (r && ir(`${l}path not found: '${n}'`));
|
|
@@ -2080,7 +2084,7 @@ function El(e, t, n, r, l) {
|
|
|
2080
2084
|
return !(!Yr(r) && !Br(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
2081
2085
|
}(t, n) && (ir(`path not found: '${n}'`), wr(t)), r) : Jr(o) ? (a && bl(e, t, n), o) : (null !== o && (ir(`${e ? $t(e) + ": " : ""}path MUST BE a json str: '${n}'`), wr(t)), r);
|
|
2082
2086
|
}
|
|
2083
|
-
function
|
|
2087
|
+
function yl(e, t, n, r, l) {
|
|
2084
2088
|
e && !el(e) && ir("GObj bad instanceof");
|
|
2085
2089
|
let o = dl(e, t, n, !1);
|
|
2086
2090
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
@@ -2093,7 +2097,7 @@ function Tl(e, t, n, r, l) {
|
|
|
2093
2097
|
}
|
|
2094
2098
|
return a && bl(e, t, n), o;
|
|
2095
2099
|
}
|
|
2096
|
-
function
|
|
2100
|
+
function Tl(e, t, n, r, l) {
|
|
2097
2101
|
e && !el(e) && ir("GObj bad instanceof");
|
|
2098
2102
|
let o = dl(e, t, n, !1);
|
|
2099
2103
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
@@ -2135,8 +2139,8 @@ function Sl(e, t, n, r) {
|
|
|
2135
2139
|
}
|
|
2136
2140
|
function Nl(e, t, n, r, l) {
|
|
2137
2141
|
if (e && !el(e) && ir("GObj bad instanceof"), !Yr(t)) return ir("kw is not an object"), -1;
|
|
2138
|
-
let o =
|
|
2139
|
-
return Yr(o) ? (o
|
|
2142
|
+
let o = Tl(e, t, n, {}, Vn.KW_CREATE);
|
|
2143
|
+
return Yr(o) ? (gl(o, r, l), 0) : (ir("subdict is not an object"), -1);
|
|
2140
2144
|
}
|
|
2141
2145
|
function wl(e, n, r) {
|
|
2142
2146
|
let l = "", o = !1;
|
|
@@ -2209,13 +2213,13 @@ function Al(e, t, n, r) {
|
|
|
2209
2213
|
let l = {};
|
|
2210
2214
|
if (Jr(n) && !tl(n)) {
|
|
2211
2215
|
let o = n;
|
|
2212
|
-
|
|
2213
|
-
} else if (Yr(n) && Mr(n) > 0) for (let o of Object.keys(n))
|
|
2216
|
+
Object.prototype.hasOwnProperty.call(t, o) ? gl(l, o, t[o]) : r && ir(`${$t(e)}: key not found: ${o}`);
|
|
2217
|
+
} else if (Yr(n) && Mr(n) > 0) for (let o of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, o) ? gl(l, o, t[o]) : r && ir(`${$t(e)}: key not found: ${o}`);
|
|
2214
2218
|
else {
|
|
2215
2219
|
if (!(Br(n) && Wr(n) > 0)) return t;
|
|
2216
2220
|
for (let o = 0; o < n.length; o++) {
|
|
2217
2221
|
let i = n[o];
|
|
2218
|
-
|
|
2222
|
+
Object.prototype.hasOwnProperty.call(t, i) ? gl(l, i, t[i]) : r && ir(`${$t(e)}: key not found: ${i}`);
|
|
2219
2223
|
}
|
|
2220
2224
|
}
|
|
2221
2225
|
return l;
|
|
@@ -2225,13 +2229,13 @@ function Il(e, t, n, r) {
|
|
|
2225
2229
|
if (!Yr(t)) return l;
|
|
2226
2230
|
if (Dr(l, t), Jr(n) && !tl(n)) {
|
|
2227
2231
|
let o = n;
|
|
2228
|
-
|
|
2229
|
-
} else if (Yr(n) && Mr(n) > 0) for (let o of Object.keys(n))
|
|
2232
|
+
Object.prototype.hasOwnProperty.call(t, o) ? Cr(l, o) : r && ir(`${$t(e)}: key not found: ${o}`);
|
|
2233
|
+
} else if (Yr(n) && Mr(n) > 0) for (let o of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, o) ? Cr(l, o) : r && ir(`${$t(e)}: key not found: ${o}`);
|
|
2230
2234
|
else {
|
|
2231
2235
|
if (!(Br(n) && Wr(n) > 0)) return {};
|
|
2232
2236
|
for (let o = 0; o < n.length; o++) {
|
|
2233
2237
|
let i = n[o];
|
|
2234
|
-
|
|
2238
|
+
Object.prototype.hasOwnProperty.call(t, i) ? Cr(l, i) : r && ir(`${$t(e)}: key not found: ${i}`);
|
|
2235
2239
|
}
|
|
2236
2240
|
}
|
|
2237
2241
|
return l;
|
|
@@ -2300,7 +2304,7 @@ function Fl(e, t, n) {
|
|
|
2300
2304
|
if (tl(n) || (t = dl(e, t, n)), Yr(t)) r = t;
|
|
2301
2305
|
else if (Br(t)) for (let n = 0; n < t.length; n++) {
|
|
2302
2306
|
let l = t[n], o = El(e, l, "id", "", Vn.KW_REQUIRED);
|
|
2303
|
-
tl(o) || (r
|
|
2307
|
+
tl(o) || gl(r, o, l);
|
|
2304
2308
|
}
|
|
2305
2309
|
else ir(`${$t(e)} kwid_new_dict: data type unknown`);
|
|
2306
2310
|
return r;
|
|
@@ -2326,7 +2330,7 @@ function Ml(e, t) {
|
|
|
2326
2330
|
if (e && !el(e) && ir("GObj bad instanceof"), !t) return [];
|
|
2327
2331
|
let n = [];
|
|
2328
2332
|
if (Jr(t)) n.push(t);
|
|
2329
|
-
else if (Yr(t)) for (let e in t)
|
|
2333
|
+
else if (Yr(t)) for (let e in t) Object.prototype.hasOwnProperty.call(t, e) && n.push(e);
|
|
2330
2334
|
else Br(t) && t.forEach(function(t) {
|
|
2331
2335
|
if (Jr(t)) tl(t) || n.push(t);
|
|
2332
2336
|
else if (Yr(t)) {
|
|
@@ -2456,7 +2460,7 @@ function eo(e, t, n) {
|
|
|
2456
2460
|
function to(e, t, n) {
|
|
2457
2461
|
void 0 !== n && Jr(n) || (n = "");
|
|
2458
2462
|
for (let r of Object.keys(e)) {
|
|
2459
|
-
if (!
|
|
2463
|
+
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
2460
2464
|
let l = (n.length ? "`" : "") + r;
|
|
2461
2465
|
n += l, t.apply(this, [
|
|
2462
2466
|
e,
|
|
@@ -2482,10 +2486,10 @@ function ro(e, t, n, r) {
|
|
|
2482
2486
|
let o, i = n.split("`"), s = l;
|
|
2483
2487
|
for (; (o = i.shift()) && !tl(o) && s;) Yr(s) && (s = vl(null, s, e.hook, [], 1)), s = ao(s, null, o, !1);
|
|
2484
2488
|
if (0 === i.length && s) if (Br(s)) s.push(r);
|
|
2485
|
-
else if (s.id === r.id)
|
|
2489
|
+
else if (s.id === r.id) Dr(s, r);
|
|
2486
2490
|
else {
|
|
2487
2491
|
let t = vl(null, s, e.hook, [], 1), n = ao(t, e.hook, r.id, !1);
|
|
2488
|
-
n ?
|
|
2492
|
+
n ? Dr(n, r) : t.push(r);
|
|
2489
2493
|
}
|
|
2490
2494
|
return l;
|
|
2491
2495
|
}
|
|
@@ -2606,7 +2610,7 @@ function po(e, t) {
|
|
|
2606
2610
|
else i.textContent = l;
|
|
2607
2611
|
else if (Br(l)) {
|
|
2608
2612
|
if (l.length > 0) if (Jr(l[0])) i.appendChild(po(l, t));
|
|
2609
|
-
else for (let e of l) Array.isArray(e)
|
|
2613
|
+
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(po(e, t)) : e instanceof Node ? i.appendChild(e) : Jr(e) ? i.appendChild(document.createTextNode(e)) : null != e && !1 !== e && ir("createElement2: child ignored, type " + typeof e);
|
|
2610
2614
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (ir("content ignored"), cr(l));
|
|
2611
2615
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2612
2616
|
return i;
|
|
@@ -2658,7 +2662,7 @@ function Eo(e, t) {
|
|
|
2658
2662
|
n && e.setAttribute("placeholder", t(n));
|
|
2659
2663
|
});
|
|
2660
2664
|
}
|
|
2661
|
-
function
|
|
2665
|
+
function yo(e = "Time Tracker", t = !1) {
|
|
2662
2666
|
const n = e, r = performance.now();
|
|
2663
2667
|
let l = r;
|
|
2664
2668
|
return t && sr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
@@ -2669,7 +2673,7 @@ function To(e = "Time Tracker", t = !1) {
|
|
|
2669
2673
|
};
|
|
2670
2674
|
} };
|
|
2671
2675
|
}
|
|
2672
|
-
function
|
|
2676
|
+
function To(e) {
|
|
2673
2677
|
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();
|
|
2674
2678
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2675
2679
|
}
|
|
@@ -2759,7 +2763,7 @@ function Co(e) {
|
|
|
2759
2763
|
return;
|
|
2760
2764
|
}
|
|
2761
2765
|
}
|
|
2762
|
-
0 !== l && (t
|
|
2766
|
+
0 !== l && gl(t, r, e);
|
|
2763
2767
|
};
|
|
2764
2768
|
return null == e || n(e, "", 0), t;
|
|
2765
2769
|
}
|
|
@@ -2809,22 +2813,22 @@ function Uo(e, t) {
|
|
|
2809
2813
|
removed: {},
|
|
2810
2814
|
changed: {}
|
|
2811
2815
|
};
|
|
2812
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? Po(n[e], r[e]) || (l.changed
|
|
2816
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? Po(n[e], r[e]) || gl(l.changed, e, {
|
|
2813
2817
|
from: n[e],
|
|
2814
2818
|
to: r[e]
|
|
2815
|
-
}) : l.removed
|
|
2816
|
-
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || (l.added
|
|
2819
|
+
}) : gl(l.removed, e, n[e]);
|
|
2820
|
+
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || gl(l.added, e, r[e]);
|
|
2817
2821
|
return l;
|
|
2818
2822
|
}
|
|
2819
2823
|
function Fo(e, t) {
|
|
2820
2824
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2821
2825
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2822
2826
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
2823
|
-
for (const n of Object.keys(t.added || {})) e
|
|
2827
|
+
for (const n of Object.keys(t.added || {})) gl(e, n, t.added[n]);
|
|
2824
2828
|
for (const n of Object.keys(t.changed || {})) {
|
|
2825
2829
|
const r = t.changed[n];
|
|
2826
2830
|
if (!r || !Object.prototype.hasOwnProperty.call(r, "to")) throw new Error(`flat_apply: changed '${n}' without a 'to'`);
|
|
2827
|
-
e
|
|
2831
|
+
gl(e, n, r.to);
|
|
2828
2832
|
}
|
|
2829
2833
|
return e;
|
|
2830
2834
|
}
|
|
@@ -3060,9 +3064,9 @@ function Zo(e, t) {
|
|
|
3060
3064
|
}), n;
|
|
3061
3065
|
}
|
|
3062
3066
|
var ei = [
|
|
3063
|
-
N(
|
|
3064
|
-
N(
|
|
3065
|
-
N(
|
|
3067
|
+
N(T.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3068
|
+
N(T.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3069
|
+
N(T.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3066
3070
|
S()
|
|
3067
3071
|
], ti = {
|
|
3068
3072
|
periodic: !1,
|
|
@@ -3072,8 +3076,8 @@ var ei = [
|
|
|
3072
3076
|
function ri(e, t, n, r) {
|
|
3073
3077
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3074
3078
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
3075
|
-
|
|
3076
|
-
}, l.msec) : l.timer_id = -1, kt(e) ?
|
|
3079
|
+
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3080
|
+
}, l.msec) : l.timer_id = -1, kt(e) ? Tn(At(e), o, {}, e) : Pn(e, o, {}), l.periodic || -1 !== l.timer_id || Et(e) && gt(e), 0;
|
|
3077
3081
|
}
|
|
3078
3082
|
var li = {
|
|
3079
3083
|
mt_create: function(e) {
|
|
@@ -3088,7 +3092,7 @@ var li = {
|
|
|
3088
3092
|
n.periodic = Zt(e, "periodic");
|
|
3089
3093
|
break;
|
|
3090
3094
|
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() {
|
|
3091
|
-
|
|
3095
|
+
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3092
3096
|
}, n.msec)), n.msec > 0 ? Et(e) || at(e) : Et(e) && gt(e);
|
|
3093
3097
|
}
|
|
3094
3098
|
},
|
|
@@ -3125,24 +3129,24 @@ function ai(e) {
|
|
|
3125
3129
|
return e instanceof k ? "C_TIMER" !== Rt(e) ? (ir("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (ir("not GObj TYPE"), -1);
|
|
3126
3130
|
}
|
|
3127
3131
|
var ui = [
|
|
3128
|
-
N(
|
|
3129
|
-
N(
|
|
3130
|
-
N(
|
|
3131
|
-
N(
|
|
3132
|
-
N(
|
|
3133
|
-
N(
|
|
3134
|
-
N(
|
|
3135
|
-
N(
|
|
3136
|
-
N(
|
|
3137
|
-
N(
|
|
3138
|
-
N(
|
|
3139
|
-
N(
|
|
3140
|
-
N(
|
|
3141
|
-
N(
|
|
3142
|
-
N(
|
|
3143
|
-
N(
|
|
3144
|
-
N(
|
|
3145
|
-
N(
|
|
3132
|
+
N(T.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3133
|
+
N(T.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3134
|
+
N(T.DTP_STRING, "__username__", 0, "", "Username"),
|
|
3135
|
+
N(T.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
|
|
3136
|
+
N(T.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
|
|
3137
|
+
N(T.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
|
|
3138
|
+
N(T.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
|
|
3139
|
+
N(T.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
|
|
3140
|
+
N(T.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
|
|
3141
|
+
N(T.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
|
|
3142
|
+
N(T.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
|
|
3143
|
+
N(T.DTP_STRING, "yuneta_version", 0, a, "Yuneta version"),
|
|
3144
|
+
N(T.DTP_LIST, "required_services", 0, "[]", "Required services"),
|
|
3145
|
+
N(T.DTP_DICT, "trace_levels", v.SDF_PERSIST, "{}", "Trace levels"),
|
|
3146
|
+
N(T.DTP_DICT, "no_trace_levels", v.SDF_PERSIST, "{}", "No trace levels"),
|
|
3147
|
+
N(T.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
3148
|
+
N(T.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3149
|
+
N(T.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3146
3150
|
S()
|
|
3147
3151
|
], _i = { gobj_timer: null }, ci = null;
|
|
3148
3152
|
function fi(e, t, n, r) {
|
|
@@ -3163,7 +3167,7 @@ function bi(e, t, n, r) {
|
|
|
3163
3167
|
var pi = {
|
|
3164
3168
|
mt_create: function(e) {
|
|
3165
3169
|
let t = e.priv;
|
|
3166
|
-
un(e, "start_date",
|
|
3170
|
+
un(e, "start_date", To()), un(e, "node_uuid", So()), e.priv.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.periodic_timeout = zt(e, "periodic_timeout"), function(e) {
|
|
3167
3171
|
let t = zt(e, "trace_levels");
|
|
3168
3172
|
if (!Yr(t)) return 0;
|
|
3169
3173
|
let n = t.__global_trace__;
|
|
@@ -3189,8 +3193,8 @@ var pi = {
|
|
|
3189
3193
|
for (const [n, r] of Object.entries(t)) {
|
|
3190
3194
|
let t = Me(n);
|
|
3191
3195
|
if (t) if (Br(r)) {
|
|
3192
|
-
|
|
3193
|
-
for (let e of r)
|
|
3196
|
+
Te(t, null, !1);
|
|
3197
|
+
for (let e of r) Te(t, e, !0);
|
|
3194
3198
|
} else ir(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
3195
3199
|
}
|
|
3196
3200
|
}(e);
|
|
@@ -3228,7 +3232,7 @@ var pi = {
|
|
|
3228
3232
|
if (!i) return o(0, -1, `${di()}: what gclass is '${l}'?`, null, null);
|
|
3229
3233
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
3230
3234
|
let s = n.level, a = gi(n.set);
|
|
3231
|
-
return s ? null === a ? o(0, -1, `${di()}: bitmask set or re-set?`, null, null) : (r ?
|
|
3235
|
+
return s ? null === a ? o(0, -1, `${di()}: bitmask set or re-set?`, null, null) : (r ? Te(i, s, a) : Ee(i, s, a)) < 0 ? o(0, -1, `${di()}: trace level of ${l} not found: ${s}`, null, null) : r ? (fi(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (fi(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${di()}: what level?`, null, null);
|
|
3232
3236
|
}
|
|
3233
3237
|
default: return o(0, -1, `${di()}: command not available: ${t}`, null, null);
|
|
3234
3238
|
}
|
|
@@ -3246,28 +3250,28 @@ function mi() {
|
|
|
3246
3250
|
}("C_YUNO");
|
|
3247
3251
|
}
|
|
3248
3252
|
var hi = "ievent_gate_stack", Ei = [
|
|
3249
|
-
N(
|
|
3250
|
-
N(
|
|
3251
|
-
N(
|
|
3252
|
-
N(
|
|
3253
|
-
N(
|
|
3254
|
-
N(
|
|
3255
|
-
N(
|
|
3256
|
-
N(
|
|
3257
|
-
N(
|
|
3258
|
-
N(
|
|
3259
|
-
N(
|
|
3260
|
-
N(
|
|
3261
|
-
N(
|
|
3262
|
-
N(
|
|
3263
|
-
N(
|
|
3253
|
+
N(T.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
3254
|
+
N(T.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
3255
|
+
N(T.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
3256
|
+
N(T.DTP_STRING, "remote_yuno_role", v.SDF_RD, "", "confirmed remote yuno role"),
|
|
3257
|
+
N(T.DTP_STRING, "remote_yuno_name", v.SDF_RD, "", "confirmed remote yuno name"),
|
|
3258
|
+
N(T.DTP_STRING, "remote_yuno_service", v.SDF_RD, "", "confirmed remote yuno service"),
|
|
3259
|
+
N(T.DTP_STRING, "url", v.SDF_RD, "", "Url to connect"),
|
|
3260
|
+
N(T.DTP_STRING, "jwt", v.SDF_PERSIST, "", "JWT"),
|
|
3261
|
+
N(T.DTP_STRING, "cert_pem", v.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
3262
|
+
N(T.DTP_JSON, "extra_info", v.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
3263
|
+
N(T.DTP_LIST, "required_services", v.SDF_RD, "[]", "Services this LINK requires (identity card). Empty = the yuno's `required_services`, as before. A yuno with several links to DIFFERENT backends must set it per link: the yuno-wide list is the union, so every backend is told the service names of all the others."),
|
|
3264
|
+
N(T.DTP_INTEGER, "timeout_retry", v.SDF_RD, "5000", "First reconnect delay (ms). It BACKS OFF from here, doubling up to timeout_retry_max, and resets when a session is reached"),
|
|
3265
|
+
N(T.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"),
|
|
3266
|
+
N(T.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3267
|
+
N(T.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3264
3268
|
S()
|
|
3265
|
-
],
|
|
3269
|
+
], yi = [
|
|
3266
3270
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3267
3271
|
["ievents2", "Trace inter-events with full kw"],
|
|
3268
3272
|
["identity-card", "Trace identity_card messages"]
|
|
3269
3273
|
];
|
|
3270
|
-
function
|
|
3274
|
+
function Ti(e) {
|
|
3271
3275
|
return !!(3 & Z(e));
|
|
3272
3276
|
}
|
|
3273
3277
|
var vi = {
|
|
@@ -3284,34 +3288,39 @@ var vi = {
|
|
|
3284
3288
|
function Si(e) {
|
|
3285
3289
|
e.priv.websocket && ir("Websocket ALREADY setup");
|
|
3286
3290
|
const t = tn(e, "url");
|
|
3287
|
-
let n;
|
|
3288
3291
|
ur(`====> Starting WebSocket to '${t}' (${$t(e)})`);
|
|
3292
|
+
const n = ++e.priv.ws_seq;
|
|
3293
|
+
let r;
|
|
3289
3294
|
try {
|
|
3290
|
-
|
|
3291
|
-
} catch (
|
|
3292
|
-
return ir(`${$t(e)}: Cannot open WebSocket to '${t}', Error: ${
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3295
|
+
r = new WebSocket(t);
|
|
3296
|
+
} catch (r) {
|
|
3297
|
+
return ir(`${$t(e)}: Cannot open WebSocket to '${t}', Error: ${r.message}`), hn(e, "EV_ON_CLOSE", {
|
|
3298
|
+
url: t,
|
|
3299
|
+
ws_seq: n,
|
|
3300
|
+
code: 1006,
|
|
3301
|
+
reason: r.message,
|
|
3302
|
+
was_clean: !1
|
|
3303
|
+
}, e), null;
|
|
3304
|
+
}
|
|
3305
|
+
return r ? (r.onopen = () => {
|
|
3306
|
+
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_OPEN", {
|
|
3298
3307
|
url: t,
|
|
3299
|
-
ws_seq:
|
|
3308
|
+
ws_seq: n
|
|
3300
3309
|
}, e);
|
|
3301
|
-
},
|
|
3302
|
-
|
|
3310
|
+
}, r.onmessage = (r) => {
|
|
3311
|
+
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_MESSAGE", {
|
|
3303
3312
|
url: t,
|
|
3304
|
-
data:
|
|
3313
|
+
data: r.data
|
|
3305
3314
|
}, e);
|
|
3306
|
-
},
|
|
3307
|
-
Ct(e) ||
|
|
3315
|
+
}, r.onclose = (r) => {
|
|
3316
|
+
Ct(e) || n === e.priv.ws_seq && (Zt(Ot(), "browser_beforeunload") ? sr("Close websocket by unload page") : Tn(e, "EV_ON_CLOSE", {
|
|
3308
3317
|
url: t,
|
|
3309
|
-
ws_seq:
|
|
3310
|
-
code:
|
|
3311
|
-
reason:
|
|
3312
|
-
was_clean:
|
|
3318
|
+
ws_seq: n,
|
|
3319
|
+
code: r.code,
|
|
3320
|
+
reason: r.reason,
|
|
3321
|
+
was_clean: r.wasClean
|
|
3313
3322
|
}, e));
|
|
3314
|
-
},
|
|
3323
|
+
}, r) : (ir(`${$t(e)}: Failed to initialize WebSocket.`), null);
|
|
3315
3324
|
}
|
|
3316
3325
|
function Ni(e, t = 1e3, n = "") {
|
|
3317
3326
|
let r = e.priv, l = r.websocket;
|
|
@@ -3325,7 +3334,7 @@ function Ni(e, t = 1e3, n = "") {
|
|
|
3325
3334
|
} else sr("WebSocket is already closed or in the process of closing.");
|
|
3326
3335
|
}
|
|
3327
3336
|
function wi(e, t, n) {
|
|
3328
|
-
let r =
|
|
3337
|
+
let r = To();
|
|
3329
3338
|
try {
|
|
3330
3339
|
ur("\n" + r + " " + t + "\n"), wr(n);
|
|
3331
3340
|
} catch (e) {
|
|
@@ -3340,7 +3349,7 @@ var ji = class {
|
|
|
3340
3349
|
function Ri(e, t, n, r) {
|
|
3341
3350
|
return function(e, t) {
|
|
3342
3351
|
let n = e.priv, r = JSON.stringify(t);
|
|
3343
|
-
if (
|
|
3352
|
+
if (Ti(e)) {
|
|
3344
3353
|
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o = zt(Ot(), "trace_ievent_callback");
|
|
3345
3354
|
o ? o(l, t, 1, r.length) : wi(0, l, t);
|
|
3346
3355
|
}
|
|
@@ -3406,12 +3415,12 @@ function ki(e, t, n, r) {
|
|
|
3406
3415
|
}
|
|
3407
3416
|
function Ci(e, t, n, r) {
|
|
3408
3417
|
let l = e.priv, o = n.url;
|
|
3409
|
-
return rr(), sr(`${$t(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), 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, Pn(e, "EV_ON_CLOSE", {
|
|
3418
|
+
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (rr(), sr(`${$t(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), 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, Pn(e, "EV_ON_CLOSE", {
|
|
3410
3419
|
url: o,
|
|
3411
3420
|
remote_yuno_name: l.remote_yuno_name,
|
|
3412
3421
|
remote_yuno_role: l.remote_yuno_role,
|
|
3413
3422
|
remote_yuno_service: l.remote_yuno_service
|
|
3414
|
-
})) : (sr(`${$t(e)}: EV_ON_OPEN_ERROR cannot open ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), Pn(e, "EV_ON_OPEN_ERROR", {
|
|
3423
|
+
})) : Et(e) && (sr(`${$t(e)}: EV_ON_OPEN_ERROR cannot open ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), Pn(e, "EV_ON_OPEN_ERROR", {
|
|
3415
3424
|
url: o,
|
|
3416
3425
|
remote_yuno_name: l.remote_yuno_name,
|
|
3417
3426
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -3425,7 +3434,7 @@ function Ci(e, t, n, r) {
|
|
|
3425
3434
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3426
3435
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
3427
3436
|
return Math.max(1, Math.round(o));
|
|
3428
|
-
}(e)), 0;
|
|
3437
|
+
}(e))), 0;
|
|
3429
3438
|
}
|
|
3430
3439
|
function Li(e, t, n, r) {
|
|
3431
3440
|
return Di(e), 0;
|
|
@@ -3447,7 +3456,7 @@ function Pi(e, t, n, r) {
|
|
|
3447
3456
|
remote_yuno_role: s,
|
|
3448
3457
|
remote_yuno_service: a
|
|
3449
3458
|
};
|
|
3450
|
-
kt(e) ?
|
|
3459
|
+
kt(e) ? Tn(At(e), "EV_ON_ID_NAK", t, e) : Pn(e, "EV_ON_ID_NAK", t);
|
|
3451
3460
|
} else {
|
|
3452
3461
|
if (_n(e, "ST_SESSION"), l.inside_on_open = !0, l.retry_ms = 0, !l.inform_on_close) {
|
|
3453
3462
|
l.inform_on_close = !0;
|
|
@@ -3458,7 +3467,7 @@ function Pi(e, t, n, r) {
|
|
|
3458
3467
|
remote_yuno_service: a,
|
|
3459
3468
|
services_roles: f
|
|
3460
3469
|
};
|
|
3461
|
-
kt(e) ?
|
|
3470
|
+
kt(e) ? Tn(At(e), "EV_ON_OPEN", t, e) : Pn(e, "EV_ON_OPEN", t);
|
|
3462
3471
|
}
|
|
3463
3472
|
l.inside_on_open = !1, function(e) {
|
|
3464
3473
|
let t = kn(e, null, null, null);
|
|
@@ -3486,14 +3495,14 @@ function Ui(e, t, n, r) {
|
|
|
3486
3495
|
} : (sr(`${$t(e)}: parsing inter_event: kw not a json object`), null) : (sr(`${$t(e)}: parsing inter_kw: no kw`), null);
|
|
3487
3496
|
}(e, n.data);
|
|
3488
3497
|
if (!o) return sr(`${$t(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
3489
|
-
if (
|
|
3498
|
+
if (Ti(e)) {
|
|
3490
3499
|
let e = jt(Ot()) + " <== " + l, t = n.data.length, r = zt(Ot(), "trace_ievent_callback");
|
|
3491
3500
|
r ? r(e, o, 2, t) : wi(0, e, o);
|
|
3492
3501
|
}
|
|
3493
3502
|
let i = o.event, s = o.kw;
|
|
3494
3503
|
if ("ST_SESSION" !== cn(e)) {
|
|
3495
3504
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3496
|
-
if (!(
|
|
3505
|
+
if (!(Tn(e, i, s, e) < 0)) return 0;
|
|
3497
3506
|
} else ir(`${$t(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3498
3507
|
return Ni(e), -1;
|
|
3499
3508
|
}
|
|
@@ -3503,12 +3512,12 @@ function Ui(e, t, n, r) {
|
|
|
3503
3512
|
let c = El(e, u, "dst_service", "");
|
|
3504
3513
|
if ("__subscribing__" === a) return sr(`${$t(e)}: subscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3505
3514
|
if ("__unsubscribing__" === a) return sr(`${$t(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3506
|
-
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return
|
|
3515
|
+
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return Tn(e, i, s, e), 0;
|
|
3507
3516
|
if (!tl(c)) {
|
|
3508
3517
|
let t = Ke(c, !1);
|
|
3509
|
-
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (
|
|
3518
|
+
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (Tn(t, i, s, e), 0) : (ir(`${$t(e)}: Service found but no event or not public, service '${$t(t)}', ev '${i}'`), -1) : (sr(`${$t(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3510
3519
|
}
|
|
3511
|
-
return kt(e) ?
|
|
3520
|
+
return kt(e) ? Tn(At(e), i, s, e) : Pn(e, i, s), 0;
|
|
3512
3521
|
}
|
|
3513
3522
|
function Fi(e, t, n, r) {
|
|
3514
3523
|
return 0;
|
|
@@ -3540,7 +3549,7 @@ var Gi = {
|
|
|
3540
3549
|
},
|
|
3541
3550
|
mt_start: function(e) {
|
|
3542
3551
|
let t = e.priv;
|
|
3543
|
-
return t.retry_ms = 0, "ST_DISCONNECTED" !== cn(e) && (
|
|
3552
|
+
return t.retry_ms = 0, "ST_DISCONNECTED" !== cn(e) && (Tn(e, "EV_ON_CLOSE", {
|
|
3544
3553
|
url: t.url,
|
|
3545
3554
|
ws_seq: t.ws_seq,
|
|
3546
3555
|
code: 1e3,
|
|
@@ -3573,7 +3582,7 @@ var Gi = {
|
|
|
3573
3582
|
},
|
|
3574
3583
|
mt_inject_event: function(e, t, n, r) {
|
|
3575
3584
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3576
|
-
if (n =
|
|
3585
|
+
if (n = Dr({}, Yr(n) ? n : {}), Yr(n.__md_iev__) && (n.__md_iev__ = jr(n.__md_iev__)), Ql(e, n, hi));
|
|
3577
3586
|
else {
|
|
3578
3587
|
let l = $i(e, jt(r), El(e, n, "__service__", 0, 0));
|
|
3579
3588
|
Cr(n, "__service__"), Hl(e, n, "__message__", t), Hl(e, n, hi, l);
|
|
@@ -3687,9 +3696,9 @@ function Mi() {
|
|
|
3687
3696
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3688
3697
|
["EV_TIMEOUT", 0],
|
|
3689
3698
|
[null, 0]
|
|
3690
|
-
], t, Gi, 0, Ei, vi, 0, 0,
|
|
3699
|
+
], t, Gi, 0, Ei, vi, 0, 0, yi, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3691
3700
|
}("C_IEVENT_CLI");
|
|
3692
3701
|
}
|
|
3693
|
-
export { k as GObj, N as SDATA, $ as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, R as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response, Ro as build_path, s as build_stats_response, No as clean_name, ai as clear_timeout, il as cmp_two_simple_json, l as command_parser, po as createElement2, bo as createOneHtml, uo as create_json_record, Zo as create_template_record,
|
|
3702
|
+
export { k as GObj, N as SDATA, $ as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, R as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response, Ro as build_path, s as build_stats_response, No as clean_name, ai as clear_timeout, il as cmp_two_simple_json, l as command_parser, po as createElement2, bo as createOneHtml, uo as create_json_record, Zo as create_template_record, To as current_timestamp, T as data_type_t, xo as db_list_persistent_attrs, Go as db_load_persistent_attrs, Wo as db_remove_persistent_attrs, Mo as db_save_persistent_attrs, jo as debounce, Bl as delete_from_list, Rr as duplicate_objects, Kr as empty_json, tl as empty_string, fo as escapeHtml, U as event_flag_t, Lo as flat2json, Fo as flat_apply, Uo as flat_diff, Io as flat_key_join, ko as flat_key_split, Pe 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, mo as getPositionRelativeToBody, wo as get_function_name, vo as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Un 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, yn 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, Dt as gobj_full_name, Rt 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, Re as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, Et as gobj_is_running, Tt as gobj_is_service, It as gobj_is_volatil, ze as gobj_list_persistent_attrs, Cn as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, jt 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, Pn 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, He as gobj_save_persistent_attrs, Ht as gobj_search_path, Tn as gobj_send_event, We as gobj_services, Pt as gobj_set_bottom_gobj, he as gobj_set_deep_trace, Te 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, ye as gobj_set_gobj_trace, x as gobj_set_trace_machine_format, $t 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, Dn 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, xl as id_index_in_obj_list, Oo as index_in_list, Br as is_array, Hr as is_boolean, Xr as is_date, Zr as is_function, el as is_gobj, al as is_metadata_key, Qr as is_null, qr as is_number, Yr as is_object, ul as is_private_key, zr as is_pure_number, br as is_secret_name, Jr as is_string, lo as jdb_delete, io as jdb_get, so as jdb_get_by_idx, oo as jdb_get_topic, no as jdb_init, ro as jdb_update, Co as json2flat, Ur as json_array_append, Fr as json_array_append_new, Gr as json_array_extend, Vr as json_array_remove, Wr as json_array_size, jr as json_deep_copy, $r as json_is_identical, Nr as json_mask_secrets, Cr as json_object_del, kr as json_object_get, Lr as json_object_set, Pr as json_object_set_new, Mr as json_object_size, Dr as json_object_update, Ar as json_object_update_existing, Ir as json_object_update_missing, xr as json_size, co as jwt2json, _o as jwtDecode, Al as kw_clone_by_keys, Il as kw_clone_by_not_keys, Dl as kw_collect, bl as kw_delete, Rl as kw_find_json_in_list, dl as kw_find_path, Vn as kw_flag_t, pl as kw_get_bool, Tl as kw_get_dict, vl as kw_get_dict_value, ml as kw_get_int, Ol as kw_get_list, kl as kw_get_local_storage_value, yl as kw_get_pointer, hl as kw_get_real, El as kw_get_str, cl as kw_has_key, jl as kw_match_simple, _l as kw_pop, Ll as kw_remove_local_storage_value, $l as kw_select, Sl as kw_set_dict_value, Cl as kw_set_local_storage_value, Nl as kw_set_subdict_value, Ul as kwid_collect, Gl as kwid_find_one_record, Ml as kwid_get_ids, Pl as kwid_match_id, Fl as kwid_new_dict, Vl as kwid_new_list, Wl as list2options, Zl as load_json_file, ur as log_debug, ir as log_error, ar as log_info, sr as log_warning, yr as mask_secrets_inline, Xl as msg_iev_get_msg_type, Ql as msg_iev_get_stack, Hl as msg_iev_push_stack, Jl as msg_iev_read_key, zl as msg_iev_set_msg_type, ql as msg_iev_write_key, So as node_uuid, nl as parseBoolean, ho as parseSVG, Eo as refresh_language, Mi as register_c_ievent_cli, oi as register_c_timer, mi as register_c_yuno, go as safeSrc, v as sdata_flag_t, eo as send_http_json_post, Qn as set_console_log_enabled, Xn as set_console_log_filter, qn as set_log_callback, rr as set_remote_log_functions, ii as set_timeout, si as set_timeout_periodic, t as sprintf, i as stats_parser, Kl as str_in_list, ol as strcasecmp, ll as strcmp, rl as strncmp, Yl as strs_in_list, sl as strstr, Xo as template_get_field_desc, yo as timeTracker, cr as trace_json, wr as trace_json_masked, B as trace_level_t, _r as trace_msg, Yo as treedb_decoder_fkey, Jo as treedb_decoder_hook, Bo as treedb_encoder_fkey, zo as treedb_get_field_desc, Ko as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3694
3703
|
|
|
3695
3704
|
//# sourceMappingURL=gobj-js.es.min.js.map
|