@yuneta/gobj-js 7.26.10 → 7.26.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gobj-js.cjs.js +29 -15
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +190 -187
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +29 -15
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +173 -170
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +29 -15
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +234 -231
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +29 -15
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +98 -95
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -193,11 +193,11 @@
|
|
|
193
193
|
gobj_flag_pure_child: 16,
|
|
194
194
|
gobj_flag_autostart: 32,
|
|
195
195
|
gobj_flag_autoplay: 64
|
|
196
|
-
}),
|
|
196
|
+
}), $ = Object.freeze({
|
|
197
197
|
obflag_destroying: 1,
|
|
198
198
|
obflag_destroyed: 2,
|
|
199
199
|
obflag_created: 4
|
|
200
|
-
}),
|
|
200
|
+
}), R = Object.freeze({
|
|
201
201
|
EVF_NO_WARN_SUBS: 1,
|
|
202
202
|
EVF_OUTPUT_EVENT: 2,
|
|
203
203
|
EVF_SYSTEM_EVENT: 4,
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
break;
|
|
521
521
|
case y.DTP_POINTER: l = r;
|
|
522
522
|
}
|
|
523
|
-
return void 0 === l && hn(`${et(e)}: attr undefined: ${n.name}`), t[n.name] = l, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag &
|
|
523
|
+
return void 0 === l && hn(`${et(e)}: attr undefined: ${n.name}`), t[n.name] = l, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
524
524
|
}
|
|
525
525
|
function ce(e) {
|
|
526
526
|
return e.jn_attrs;
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
}
|
|
633
633
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
634
634
|
let r = e.dl_events[n];
|
|
635
|
-
if (!ir(r.event_name) && (nr(r.event_flag) || (hn(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag &
|
|
635
|
+
if (!ir(r.event_name) && (nr(r.event_flag) || (hn(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & R.EVF_OUTPUT_EVENT))) {
|
|
636
636
|
let n = !1;
|
|
637
637
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
638
638
|
let l = e.dl_states[t];
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
return n || (t && hn(`gclass not found: ${e}`), null);
|
|
652
652
|
}
|
|
653
653
|
function Se() {
|
|
654
|
-
return !m || m.obflag &
|
|
654
|
+
return !m || m.obflag & $.obflag_destroyed ? null : m;
|
|
655
655
|
}
|
|
656
656
|
function we(e, t) {
|
|
657
657
|
if (!tr(e)) return hn(`gobj_find_service(): service name must be a string: ${e}`), null;
|
|
@@ -662,10 +662,10 @@
|
|
|
662
662
|
let t = Xe(e);
|
|
663
663
|
return t = t.toLowerCase(), b[t] && hn(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), b[t] = e, 0;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function $e(e, t) {
|
|
666
666
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Re(e, t) {
|
|
669
669
|
let n = tl(e.dl_children, t);
|
|
670
670
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
671
671
|
}
|
|
@@ -716,14 +716,14 @@
|
|
|
716
716
|
_.jn_attrs = _e(_, s.attrs_table);
|
|
717
717
|
for (const [e, t] of Object.entries(_.jn_attrs)) e in _.priv && (_.priv[e] = t);
|
|
718
718
|
let a = Y(_);
|
|
719
|
-
return a && L(n("💙💙⏩ creating: %s^%s", s.gclass_name, e)), _.gobj_flag & N.gobj_flag_service && Ne(_), _.gobj_flag & N.gobj_flag_yuno && (p = _), _.gobj_flag & N.gobj_flag_default_service && (m = _), _.gobj_flag & N.gobj_flag_yuno ||
|
|
719
|
+
return a && L(n("💙💙⏩ creating: %s^%s", s.gclass_name, e)), _.gobj_flag & N.gobj_flag_service && Ne(_), _.gobj_flag & N.gobj_flag_yuno && (p = _), _.gobj_flag & N.gobj_flag_default_service && (m = _), _.gobj_flag & N.gobj_flag_yuno || $e(l, _), _.obflag |= $.obflag_created, _.gclass.instances++, Ae(_, r), _.gobj_flag & N.gobj_flag_service && i && i(_, null), _.gclass.gmt.mt_create2 ? _.gclass.gmt.mt_create2(_, r) : _.gclass.gmt.mt_create && _.gclass.gmt.mt_create(_), l && l.gclass.gmt.mt_child_added && (a && L(n("👦👦🔵 child_added(%s): %s", tt(l), et(_))), l.gclass.gmt.mt_child_added(l, _)), a && L(n("💙💙⏪ created: %s", tt(_))), _;
|
|
720
720
|
}
|
|
721
721
|
function Ce(e, t, n, r) {
|
|
722
722
|
return Ie(e, t, n, r, N.gobj_flag_pure_child);
|
|
723
723
|
}
|
|
724
724
|
function Le(e) {
|
|
725
725
|
if (ot(e)) return void hn("gobj NULL or DESTROYED");
|
|
726
|
-
e.__refs__ > 0 && hn(`${et(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (hn(`Destroying a PLAYING gobj: ${tt(e)}`), xe(e)), e.running && (hn(`Destroying a RUNNING gobj: ${tt(e)}`), Ve(e)), e.obflag |=
|
|
726
|
+
e.__refs__ > 0 && hn(`${et(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (hn(`Destroying a PLAYING gobj: ${tt(e)}`), xe(e)), e.running && (hn(`Destroying a RUNNING gobj: ${tt(e)}`), Ve(e)), e.obflag |= $.obflag_destroying, function(e) {
|
|
727
727
|
if (0 === Lt.length) return;
|
|
728
728
|
for (let t of Lt) t.src === e && (t.src = null);
|
|
729
729
|
Lt = Lt.filter((t) => t.dst !== e);
|
|
@@ -734,13 +734,13 @@
|
|
|
734
734
|
r && r.gclass.gmt.mt_child_removed && (t && L(n("👦👦🔴 child_removed(%s): %s", tt(r), et(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & N.gobj_flag_service && function(e) {
|
|
735
735
|
let t = Xe(e);
|
|
736
736
|
t = t.toLowerCase(), b[t] ? delete b[t] : hn(`"service NOT found in register": ${t}`);
|
|
737
|
-
}(e), e === m && (m = null), Ht(e, e.dl_subscriptions, !0), Ht(e, e.dl_subscribings, !0), r && (
|
|
737
|
+
}(e), e === m && (m = null), Ht(e, e.dl_subscriptions, !0), Ht(e, e.dl_subscribings, !0), r && (Re(r, e), rt(e) && (st(r) !== e || ot(r) || it(r, null))), function(e) {
|
|
738
738
|
let t = e.dl_children.slice();
|
|
739
739
|
for (let e = 0; e < t.length; e++) {
|
|
740
740
|
let n = t[e];
|
|
741
741
|
ot(n) || Le(n);
|
|
742
742
|
}
|
|
743
|
-
}(e), e.obflag &
|
|
743
|
+
}(e), e.obflag & $.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), t && L(n("💔💔⏪ destroyed: %s", tt(e))), e.obflag |= $.obflag_destroyed, e.obflag & $.obflag_created && e.gclass.instances--;
|
|
744
744
|
}
|
|
745
745
|
function Pe(e) {
|
|
746
746
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
return !ot(e) && e.playing;
|
|
798
798
|
}
|
|
799
799
|
function qe() {
|
|
800
|
-
return !p || p.obflag &
|
|
800
|
+
return !p || p.obflag & $.obflag_destroyed ? null : p;
|
|
801
801
|
}
|
|
802
802
|
function He() {
|
|
803
803
|
let e = qe();
|
|
@@ -836,7 +836,7 @@
|
|
|
836
836
|
return sr(e) ? !!(e.gobj_flag & N.gobj_flag_pure_child) : (hn("gobj NULL of bad type"), null);
|
|
837
837
|
}
|
|
838
838
|
function ot(e) {
|
|
839
|
-
return !sr(e) || !!(e.obflag & (
|
|
839
|
+
return !sr(e) || !!(e.obflag & ($.obflag_destroyed | $.obflag_destroying));
|
|
840
840
|
}
|
|
841
841
|
function st(e) {
|
|
842
842
|
return sr(e) ? e.bottom_gobj : (hn("gobj NULL of bad type"), null);
|
|
@@ -953,7 +953,7 @@
|
|
|
953
953
|
const o = l[n];
|
|
954
954
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
955
955
|
let t;
|
|
956
|
-
!e.gclass.gmt.mt_reading || e.obflag &
|
|
956
|
+
!e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? t = xn(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = xn(e.jn_attrs, o.name))), Yn(r, o.name, t);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
return r;
|
|
@@ -966,28 +966,28 @@
|
|
|
966
966
|
if (0 === ur(t, "__service__")) return Be(e);
|
|
967
967
|
}
|
|
968
968
|
let n = fe(e, t, !1);
|
|
969
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
969
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
970
970
|
}
|
|
971
971
|
function vt(e, t) {
|
|
972
972
|
t && ur(t, "__trace_level__");
|
|
973
973
|
let n = fe(e, t, !1);
|
|
974
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
974
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
975
975
|
}
|
|
976
976
|
function jt(e, t) {
|
|
977
977
|
if (t && 0 === ur(t, "__state__")) return kt(e);
|
|
978
978
|
let n = fe(e, t, !1);
|
|
979
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
979
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
980
980
|
}
|
|
981
981
|
function Ot(e, t) {
|
|
982
982
|
let n = fe(e, t, !1);
|
|
983
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
983
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
984
984
|
}
|
|
985
985
|
function St(e, t, r, l) {
|
|
986
986
|
if (!tr(t)) return hn(n("gobj_write_attr(%s): path must be a string", et(e))), -1;
|
|
987
987
|
let o, s = e.jn_attrs, i = t.split("`");
|
|
988
988
|
if (i.length <= 1) {
|
|
989
989
|
let l = t;
|
|
990
|
-
return l in s && Object.prototype.hasOwnProperty.call(s, l) ? (s[l] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag &
|
|
990
|
+
return l in s && Object.prototype.hasOwnProperty.call(s, l) ? (s[l] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (hn(n("gobj_write_attr(%s): attr not found '%s'", et(e), l)), -1);
|
|
991
991
|
}
|
|
992
992
|
let _ = i.length;
|
|
993
993
|
for (let t = 0; t < _; t++) {
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
continue;
|
|
999
999
|
}
|
|
1000
1000
|
let l = e.jn_attrs;
|
|
1001
|
-
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag &
|
|
1001
|
+
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o), 0;
|
|
1002
1002
|
break;
|
|
1003
1003
|
}
|
|
1004
1004
|
return hn(n("gobj_write_attr(%s): attr not found '%s'", et(e), o)), -1;
|
|
@@ -1013,15 +1013,15 @@
|
|
|
1013
1013
|
}
|
|
1014
1014
|
function Nt(e, t, n) {
|
|
1015
1015
|
let r = fe(e, t, !1);
|
|
1016
|
-
return r ? (r[t] = _r(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1016
|
+
return r ? (r[t] = _r(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function $t(e, t, n) {
|
|
1019
1019
|
let r = fe(e, t, !1);
|
|
1020
|
-
return r ? (r[t] = parseInt(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1020
|
+
return r ? (r[t] = parseInt(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Rt(e, t, n) {
|
|
1023
1023
|
let r = fe(e, t, !1);
|
|
1024
|
-
return r ? (r[t] = String(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1024
|
+
return r ? (r[t] = String(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1025
1025
|
}
|
|
1026
1026
|
function Dt(e, t) {
|
|
1027
1027
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), null;
|
|
@@ -1056,11 +1056,11 @@
|
|
|
1056
1056
|
}
|
|
1057
1057
|
function Ct(e, t, n) {
|
|
1058
1058
|
let r = At(e, t, !1);
|
|
1059
|
-
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag &
|
|
1059
|
+
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & R.EVF_OUTPUT_EVENT);
|
|
1060
1060
|
}
|
|
1061
1061
|
var Lt = [], Pt = !1;
|
|
1062
1062
|
function Ut(e, t, r, l) {
|
|
1063
|
-
return e && e instanceof S ? e.obflag & (
|
|
1063
|
+
return e && e instanceof S ? e.obflag & ($.obflag_destroyed | $.obflag_destroying) ? (hn(`gobj_post_event(): gobj dst DESTROYING, event ${t}`), -1) : ir(t) ? (hn("gobj_post_event(): event EMPTY"), -1) : It(e, t, 0) ? Lt.length >= 1e4 ? (hn(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${t}, pending ${Lt.length}`), -1) : (Lt.push({
|
|
1064
1064
|
dst: e,
|
|
1065
1065
|
event: t,
|
|
1066
1066
|
kw: r,
|
|
@@ -1074,7 +1074,7 @@
|
|
|
1074
1074
|
let t = 0;
|
|
1075
1075
|
for (let n = 0; n < e.length; n++) {
|
|
1076
1076
|
const r = e[n];
|
|
1077
|
-
if (!(r.dst.obflag & (
|
|
1077
|
+
if (!(r.dst.obflag & ($.obflag_destroyed | $.obflag_destroying))) {
|
|
1078
1078
|
try {
|
|
1079
1079
|
Vt(r.dst, r.event, r.kw, r.src);
|
|
1080
1080
|
} catch (t) {
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
}
|
|
1088
1088
|
function Vt(e, t, r, l) {
|
|
1089
1089
|
if (!(e && e instanceof S)) return hn("gobj dst NULL"), -1;
|
|
1090
|
-
if (e.obflag & (
|
|
1090
|
+
if (e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj dst DESTROYED"), -1;
|
|
1091
1091
|
let o = e.current_state;
|
|
1092
1092
|
if (!o) return hn(`${et(e)}: current_state NULL`), -1;
|
|
1093
1093
|
let s = H(e, t) && !z(l, t);
|
|
@@ -1115,7 +1115,7 @@
|
|
|
1115
1115
|
}
|
|
1116
1116
|
throw n;
|
|
1117
1117
|
}
|
|
1118
|
-
return !s || 1 === C || e.obflag &
|
|
1118
|
+
return !s || 1 === C || e.obflag & $.obflag_destroyed || L(n("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Ze(e), Xe(e), e.current_state.state_name, t || "", nr(_) ? _ : 0)), h--, _;
|
|
1119
1119
|
}
|
|
1120
1120
|
var Gt = Object.freeze({
|
|
1121
1121
|
__rename_event_name__: 1,
|
|
@@ -1196,7 +1196,7 @@
|
|
|
1196
1196
|
if (!!(Er(e, t, "subs_flag", null, Zt.KW_REQUIRED) & Gt.__hard_subscription__) && !r) return -1;
|
|
1197
1197
|
let _ = B(s) || B(o);
|
|
1198
1198
|
if (Bt(o.dl_subscriptions, t) < 0) return _ && L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", i || "", et(o), et(s))), 1;
|
|
1199
|
-
_ && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", i || "", et(o), et(s))), vn(t)), o.obflag &
|
|
1199
|
+
_ && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", i || "", et(o), et(s))), vn(t)), o.obflag & $.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, t);
|
|
1200
1200
|
let a = Bt(o.dl_subscriptions, t);
|
|
1201
1201
|
return a >= 0 ? Hn(o.dl_subscriptions, a) : (hn(`${et(e)}: subscription in publisher not found`), vn(t)), a = Bt(s.dl_subscribings, t), a >= 0 ? Hn(s.dl_subscribings, a) : (hn(`${et(e)}: subscription in subscriber not found`), vn(t)), 0;
|
|
1202
1202
|
}
|
|
@@ -1213,7 +1213,7 @@
|
|
|
1213
1213
|
if (Object.keys(r).forEach((n) => {
|
|
1214
1214
|
o.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1215
1215
|
}), ir(t)) t = "";
|
|
1216
|
-
else if (!(Ct(e, t,
|
|
1216
|
+
else if (!(Ct(e, t, R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & w.gcflag_no_check_output_events)) return hn(`event NOT in output event list: ${et(e)}, ${t}`), 0;
|
|
1217
1217
|
let s = xt(r, t), i = Yt(e.dl_subscriptions, e, t, s.renamed_event, s.kw, l), _ = null;
|
|
1218
1218
|
for (let t = 0; t < i.length; t++) if (Er(e, i[t], "subs_flag", 0, Zt.KW_REQUIRED) & Gt.__hard_subscription__) {
|
|
1219
1219
|
_ = i[t];
|
|
@@ -1271,10 +1271,10 @@
|
|
|
1271
1271
|
return Yt(e.dl_subscribings, r, t, null, n, e);
|
|
1272
1272
|
}
|
|
1273
1273
|
function Xt(e, t, r) {
|
|
1274
|
-
if (Zn(r) || (r = {}), !e || e.obflag & (
|
|
1274
|
+
if (Zn(r) || (r = {}), !e || e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj NULL or DESTROYED"), -1;
|
|
1275
1275
|
if (ir(t)) return hn(`${et(e)}: event EMPTY`), -1;
|
|
1276
1276
|
let l = At(e, t, !0);
|
|
1277
|
-
if (!(l && l.event_flag & (
|
|
1277
|
+
if (!(l && l.event_flag & (R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & w.gcflag_no_check_output_events)) return hn(`event NOT in output event list: ${et(e)}, ev ${t}`), -1;
|
|
1278
1278
|
let o = (B(e) || H(e, t)) && !z(e, t);
|
|
1279
1279
|
if (o && (L(1 === C ? n("🔝🔝 %s %s%s %s", t || "", e.running ? "" : "!!", et(e), e.current_state.state_name) : n("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", Ze(e), Xe(e), e.current_state.state_name, "", t || "", "")), q(e) && zn(r) && Un(r)), e.gclass.gmt.mt_publish_event) {
|
|
1280
1280
|
let n = e.gclass.gmt.mt_publish_event(e, t, r);
|
|
@@ -1296,10 +1296,10 @@
|
|
|
1296
1296
|
let l = jr(e, a, "__global__", null, 0), s = jr(e, a, "__local__", null, 0), f = Or(e, a, "__filter__", null, 0), g = a.renamed_event;
|
|
1297
1297
|
ir(g) && (g = t);
|
|
1298
1298
|
let d = 1;
|
|
1299
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, r, u) : Xn(f) > 0 && (d =
|
|
1299
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, r, u) : Xn(f) > 0 && (d = $r(r, f) ? 1 : 0, o && (L(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", t || "", et(u), et(e))), vn(f))), d < 0) break;
|
|
1300
1300
|
if (!d) continue;
|
|
1301
1301
|
let b = At(u, t, !0);
|
|
1302
|
-
if (b && b.event_flag &
|
|
1302
|
+
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !It(u, b.event_name, 0)) continue;
|
|
1303
1303
|
let p = r;
|
|
1304
1304
|
(Xn(s) > 0 || Xn(l) > 0) && (p = Gn({}, r)), Xn(s) > 0 && fr(p, s), Xn(l) > 0 && Gn(p, Fn(l)), o && (L(1 === C ? n("🔝🔄 %s (%s) %s%s", t || "", g || "", u.running ? "" : "!!", et(u)) : n("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", u.running ? "" : "!!", et(u), kt(u), t || "", g || "", e && !e.running ? "!!" : "", et(e))), q(e) && zn(p) && Un(p));
|
|
1305
1305
|
let m = Vt(u, g, p, e);
|
|
@@ -1310,7 +1310,7 @@
|
|
|
1310
1310
|
if (_ += m, i++, ot(e)) break;
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
return i || l && l.event_flag &
|
|
1313
|
+
return i || l && l.event_flag & R.EVF_NO_WARN_SUBS || yn(`${et(e)}: Publish event WITHOUT subscribers, ev ${t}`), _;
|
|
1314
1314
|
}
|
|
1315
1315
|
var Zt = Object.freeze({
|
|
1316
1316
|
KW_REQUIRED: 1,
|
|
@@ -1497,10 +1497,10 @@
|
|
|
1497
1497
|
o = t;
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
var
|
|
1500
|
+
var $n = 128, Rn = 4194304, Dn = "<not shown: too large to mask>";
|
|
1501
1501
|
function kn(e) {
|
|
1502
1502
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1503
|
-
if (e.length >
|
|
1503
|
+
if (e.length > Rn) return Dn;
|
|
1504
1504
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
1505
1505
|
for (; null !== (t = r.exec(e));) wn(t[2].slice(-128)) && (n = !0);
|
|
1506
1506
|
let l = [], o = 0, s = !1, i = "", _ = 0, a = 0;
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
a++;
|
|
1516
1516
|
continue;
|
|
1517
1517
|
}
|
|
1518
|
-
let r = e.substring(Math.max(_, a -
|
|
1518
|
+
let r = e.substring(Math.max(_, a - $n), a);
|
|
1519
1519
|
if (_ = a + 1, !(wn(r) || n && "value" === r.toLowerCase())) {
|
|
1520
1520
|
a++;
|
|
1521
1521
|
continue;
|
|
@@ -1584,7 +1584,7 @@
|
|
|
1584
1584
|
}
|
|
1585
1585
|
function Pn(e) {
|
|
1586
1586
|
try {
|
|
1587
|
-
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left:
|
|
1587
|
+
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left: Rn });
|
|
1588
1588
|
} catch (e) {
|
|
1589
1589
|
return In;
|
|
1590
1590
|
}
|
|
@@ -1934,10 +1934,10 @@
|
|
|
1934
1934
|
}
|
|
1935
1935
|
return o;
|
|
1936
1936
|
}
|
|
1937
|
-
function
|
|
1937
|
+
function $r(e, t) {
|
|
1938
1938
|
return 0 === Xn(t) || Nr(e, t, "");
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function Rr(e, t, n, r) {
|
|
1941
1941
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1942
1942
|
let l = {};
|
|
1943
1943
|
if (tr(n) && !ir(n)) {
|
|
@@ -2007,7 +2007,7 @@
|
|
|
2007
2007
|
}
|
|
2008
2008
|
function Lr(e, t, n, r, l) {
|
|
2009
2009
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
2010
|
-
l || (l =
|
|
2010
|
+
l || (l = $r);
|
|
2011
2011
|
let o = [];
|
|
2012
2012
|
if (er(t)) for (let s = 0; s < t.length; s++) {
|
|
2013
2013
|
let i, _ = t[s];
|
|
@@ -2375,18 +2375,18 @@
|
|
|
2375
2375
|
return 0;
|
|
2376
2376
|
},
|
|
2377
2377
|
mt_stop: function(e) {
|
|
2378
|
-
return
|
|
2378
|
+
return $t(e, "msec", -1), 0;
|
|
2379
2379
|
},
|
|
2380
2380
|
mt_destroy: function(e) {}
|
|
2381
2381
|
};
|
|
2382
2382
|
function El(e, t) {
|
|
2383
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void
|
|
2383
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2384
2384
|
}
|
|
2385
2385
|
function Tl(e, t) {
|
|
2386
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void
|
|
2386
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2387
2387
|
}
|
|
2388
2388
|
function vl(e) {
|
|
2389
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void
|
|
2389
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2390
2390
|
}
|
|
2391
2391
|
var jl = [
|
|
2392
2392
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2418,16 +2418,16 @@
|
|
|
2418
2418
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2419
2419
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2420
2420
|
}
|
|
2421
|
-
function
|
|
2421
|
+
function $l() {
|
|
2422
2422
|
return `${ze()}^${He()}`;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function Rl(e, t, n, r) {
|
|
2425
2425
|
return Xt(e, t, n), 0;
|
|
2426
2426
|
}
|
|
2427
2427
|
var Dl = {
|
|
2428
2428
|
mt_create: function(e) {
|
|
2429
2429
|
let t = e.priv;
|
|
2430
|
-
|
|
2430
|
+
Rt(e, "start_date", el()), Rt(e, "node_uuid", nl()), e.priv.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.periodic_timeout = yt(e, "periodic_timeout"), function(e) {
|
|
2431
2431
|
let t = yt(e, "trace_levels");
|
|
2432
2432
|
if (!Zn(t)) return 0;
|
|
2433
2433
|
let n = t.__global_trace__;
|
|
@@ -2482,19 +2482,19 @@
|
|
|
2482
2482
|
case "set-global-trace":
|
|
2483
2483
|
case "set-global-no-trace": {
|
|
2484
2484
|
let r = "set-global-no-trace" === t, o = n.level, s = Nl(n.set);
|
|
2485
|
-
return o ? null === s ? l(0, -1, `${
|
|
2485
|
+
return o ? null === s ? l(0, -1, `${$l()}: bitmask set or re-set?`, null, null) : (r ? X(o, s) : Q(o, s)) < 0 ? l(0, -1, `${$l()}: global trace level not found: ${o}`, null, null) : r ? (wl(e, "no_trace_levels", "__global_no_trace__", ne()), l(0, 0, null, null, ne())) : (wl(e, "trace_levels", "__global_trace__", te()), l(0, 0, null, null, te())) : l(0, -1, `${$l()}: what level?`, null, null);
|
|
2486
2486
|
}
|
|
2487
2487
|
case "get-gclass-trace":
|
|
2488
2488
|
case "get-gclass-no-trace":
|
|
2489
2489
|
case "set-gclass-trace":
|
|
2490
2490
|
case "set-gclass-no-trace": {
|
|
2491
2491
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2492
|
-
if (!s) return l(0, -1, `${
|
|
2492
|
+
if (!s) return l(0, -1, `${$l()}: what gclass is '${o}'?`, null, null);
|
|
2493
2493
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2494
2494
|
let i = n.level, _ = Nl(n.set);
|
|
2495
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2495
|
+
return i ? null === _ ? l(0, -1, `${$l()}: bitmask set or re-set?`, null, null) : (r ? ie(s, i, _) : se(s, i, _)) < 0 ? l(0, -1, `${$l()}: trace level of ${o} not found: ${i}`, null, null) : r ? (wl(e, "no_trace_levels", o, oe(s)), l(0, 0, null, null, oe(s))) : (wl(e, "trace_levels", o, le(s)), l(0, 0, null, null, re(s))) : l(0, -1, `${$l()}: what level?`, null, null);
|
|
2496
2496
|
}
|
|
2497
|
-
default: return l(0, -1, `${
|
|
2497
|
+
default: return l(0, -1, `${$l()}: command not available: ${t}`, null, null);
|
|
2498
2498
|
}
|
|
2499
2499
|
}
|
|
2500
2500
|
};
|
|
@@ -2692,7 +2692,7 @@
|
|
|
2692
2692
|
let l = e.priv;
|
|
2693
2693
|
vl(l.gobj_timer);
|
|
2694
2694
|
let o = Mr(e, n, kl, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2695
|
-
|
|
2695
|
+
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2696
2696
|
let a = Er(e, n, "result", -1, 0), u = Tr(e, n, "comment", "", 0), c = Tr(e, n, "username", "", 0), f = Or(e, n, "services_roles", {});
|
|
2697
2697
|
if (a < 0) {
|
|
2698
2698
|
Fl(e);
|
|
@@ -2750,7 +2750,7 @@
|
|
|
2750
2750
|
}
|
|
2751
2751
|
let s = o.event, i = o.kw;
|
|
2752
2752
|
if ("ST_SESSION" !== kt(e)) {
|
|
2753
|
-
if (It(e, s,
|
|
2753
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2754
2754
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2755
2755
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2756
2756
|
return Fl(e), -1;
|
|
@@ -2761,10 +2761,10 @@
|
|
|
2761
2761
|
let c = Tr(e, a, "dst_service", "");
|
|
2762
2762
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2763
2763
|
if ("__unsubscribing__" === _) return yn(`${et(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2764
|
-
if (It(e, s,
|
|
2764
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) return Vt(e, s, i, e), 0;
|
|
2765
2765
|
if (!ir(c)) {
|
|
2766
2766
|
let t = we(c, !1);
|
|
2767
|
-
return t ? It(t, s,
|
|
2767
|
+
return t ? It(t, s, R.EVF_PUBLIC_EVENT) ? (Vt(t, s, i, e), 0) : (hn(`${et(e)}: Service found but no event or not public, service '${et(t)}', ev '${s}'`), -1) : (yn(`${et(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${s}'`), 0);
|
|
2768
2768
|
}
|
|
2769
2769
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2770
2770
|
}
|
|
@@ -2777,7 +2777,7 @@
|
|
|
2777
2777
|
var eo = {
|
|
2778
2778
|
mt_create: function(e) {
|
|
2779
2779
|
let t = e.priv;
|
|
2780
|
-
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"),
|
|
2780
|
+
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"), Rt(e, "wanted_yuno_name", t.remote_yuno_name), Rt(e, "wanted_yuno_role", t.remote_yuno_role), Rt(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
2781
2781
|
const n = Ot(e, "subscriber");
|
|
2782
2782
|
n && qt(e, null, {}, n);
|
|
2783
2783
|
},
|
|
@@ -2899,18 +2899,18 @@
|
|
|
2899
2899
|
}), n;
|
|
2900
2900
|
}, e.current_timestamp = el, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2901
2901
|
let n = kr(al(e), null, !1), r = {};
|
|
2902
|
-
return n && Zn(n) && (r =
|
|
2902
|
+
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2903
2903
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2904
2904
|
let n = Et(e, E.SDF_PERSIST), r = kr(al(e), null, !1);
|
|
2905
2905
|
if (r && Zn(r)) {
|
|
2906
|
-
let l =
|
|
2907
|
-
l =
|
|
2906
|
+
let l = Rr(e, r, t, !1);
|
|
2907
|
+
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2908
2908
|
}
|
|
2909
2909
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2910
2910
|
let n = Dr(e, kr(al(e), null, !1), t, !1);
|
|
2911
2911
|
0 === zn(n) ? Ir(al(e)) : Ar(al(e), n);
|
|
2912
2912
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2913
|
-
let n =
|
|
2913
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(al(e), null, !1);
|
|
2914
2914
|
return r && Zn(r) && Wn(n, r), Ar(al(e), n);
|
|
2915
2915
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2916
2916
|
let r = null, l = null, o = null;
|
|
@@ -2935,7 +2935,7 @@
|
|
|
2935
2935
|
return t;
|
|
2936
2936
|
}, e.empty_json = function(e) {
|
|
2937
2937
|
return 0 === Xn(e);
|
|
2938
|
-
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t =
|
|
2938
|
+
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2939
2939
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2940
2940
|
let t = null;
|
|
2941
2941
|
for (const n of Object.keys(e)) {
|
|
@@ -3018,7 +3018,7 @@
|
|
|
3018
3018
|
}, e.get_function_name = rl, e.get_now = function() {
|
|
3019
3019
|
return Math.floor(Date.now() / 1e3);
|
|
3020
3020
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3021
|
-
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (
|
|
3021
|
+
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Re(e.parent, e), e.parent = null), $e(t, e), t.gclass.gmt.mt_child_added && (Y(e) && En(n("👦👦🔵 child_added(%s): %s", tt(t), et(e))), t.gclass.gmt.mt_child_added(t, e)), 0) : (hn(`${et(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
3022
3022
|
}, e.gobj_change_state = Dt, e.gobj_command = function(e, t, r, o) {
|
|
3023
3023
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
3024
3024
|
if (function(e) {
|
|
@@ -3130,7 +3130,7 @@
|
|
|
3130
3130
|
return ot(e) ? (hn("gobj NULL or DESTROYED"), -1) : (J(e) && L(n("⏺ ⏺ ⏺ ⏺ start_tree: %s", tt(e))), e.gclass.gclass_flag & w.gcflag_manual_start || e.disabled ? 0 : (e.running || Pe(e), ut(e, D.WALK_TOP2BOTTOM, Fe, 0, 0)));
|
|
3131
3131
|
}, e.gobj_start_up = function(e, t, n, r, l, o, s) {
|
|
3132
3132
|
i = t, _ = n, a = r, u = l, c = o, f = s;
|
|
3133
|
-
const d = [["EV_STATE_CHANGED",
|
|
3133
|
+
const d = [["EV_STATE_CHANGED", R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]];
|
|
3134
3134
|
for (let e = 0; e < d.length; e++) {
|
|
3135
3135
|
let t = d[e][0], n = d[e][1];
|
|
3136
3136
|
Ee(g, t, n);
|
|
@@ -3155,14 +3155,14 @@
|
|
|
3155
3155
|
if (Object.keys(n).forEach((n) => {
|
|
3156
3156
|
l.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
3157
3157
|
}), ir(t)) t = "";
|
|
3158
|
-
else if (!(Ct(e, t,
|
|
3158
|
+
else if (!(Ct(e, t, R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & w.gcflag_no_check_output_events)) return hn(`event NOT in output event list: ${et(e)}, ev ${t}`), 0;
|
|
3159
3159
|
let o = xt(n, t), s = Yt(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), i = 0, _ = 0, a = 0;
|
|
3160
3160
|
for (let t = 0; t < s.length; t++) {
|
|
3161
3161
|
let n = s[t], r = Jt(e, n, !1, !1);
|
|
3162
3162
|
0 === r ? i++ : r < 0 ? _++ : a++;
|
|
3163
3163
|
}
|
|
3164
3164
|
return _ ? yn(`${et(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${_})`) : i || a || (yn(`${et(e)}: No subscription found`), Un(n, "No subscription found")), 0;
|
|
3165
|
-
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr =
|
|
3165
|
+
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr = $t, e.gobj_write_str_attr = Rt, e.gobj_yuno = qe, e.gobj_yuno_id = Qe, e.gobj_yuno_name = He, e.gobj_yuno_role = ze, e.html_markup = function(e) {
|
|
3166
3166
|
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new qr("")) : new qr(e);
|
|
3167
3167
|
}, e.id_index_in_obj_list = Pr, e.index_in_list = tl, e.is_array = er, e.is_boolean = rr, e.is_date = function(e) {
|
|
3168
3168
|
return e instanceof Date && !isNaN(e);
|
|
@@ -3184,8 +3184,9 @@
|
|
|
3184
3184
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3185
3185
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3186
3186
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3187
|
-
if (ir(r.id)) return hn(
|
|
3187
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${JSON.stringify(r)}`), null;
|
|
3188
3188
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3189
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3189
3190
|
let o, s = n.split("`"), i = l;
|
|
3190
3191
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3191
3192
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3212,18 +3213,20 @@
|
|
|
3212
3213
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3213
3214
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3214
3215
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3215
|
-
if (ir(r.id)) return hn(
|
|
3216
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${JSON.stringify(r)}`), null;
|
|
3216
3217
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
if (0
|
|
3221
|
-
|
|
3218
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3219
|
+
let o, s, i = n.split("`"), _ = l;
|
|
3220
|
+
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Yr(_, null, o, !1);
|
|
3221
|
+
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
3222
|
+
if (er(_)) s = _;
|
|
3222
3223
|
else {
|
|
3223
|
-
|
|
3224
|
-
|
|
3224
|
+
if (_.id === r.id) return Gn(_, r), l;
|
|
3225
|
+
if (s = Or(null, _, e.hook, null, 0), null == s) s = [], Yn(_, e.hook, s);
|
|
3226
|
+
else if (!er(s)) return hn(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
3225
3227
|
}
|
|
3226
|
-
|
|
3228
|
+
let a = Yr(s, e.hook, r.id, !1);
|
|
3229
|
+
return a ? Gn(a, r) : s.push(r), l;
|
|
3227
3230
|
}, e.json2flat = function(e) {
|
|
3228
3231
|
const t = {}, n = (e, r, l) => {
|
|
3229
3232
|
if (l > ll) throw new Error("json2flat: deeper than 256");
|
|
@@ -3258,9 +3261,9 @@
|
|
|
3258
3261
|
} catch (e) {
|
|
3259
3262
|
return null;
|
|
3260
3263
|
}
|
|
3261
|
-
}, e.jwtDecode = Br, e.kw_clone_by_keys =
|
|
3264
|
+
}, e.jwtDecode = Br, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3262
3265
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3263
|
-
r || (r =
|
|
3266
|
+
r || (r = $r);
|
|
3264
3267
|
let l = [];
|
|
3265
3268
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3266
3269
|
let o = t[e];
|
|
@@ -3303,9 +3306,9 @@
|
|
|
3303
3306
|
}
|
|
3304
3307
|
}
|
|
3305
3308
|
return _ && hr(e, t, n), u;
|
|
3306
|
-
}, e.kw_get_str = Tr, e.kw_has_key = gr, e.kw_match_simple =
|
|
3309
|
+
}, e.kw_get_str = Tr, e.kw_has_key = gr, e.kw_match_simple = $r, e.kw_pop = fr, e.kw_remove_local_storage_value = Ir, e.kw_select = function(e, t, n, r) {
|
|
3307
3310
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3308
|
-
r || (r =
|
|
3311
|
+
r || (r = $r);
|
|
3309
3312
|
let l = [];
|
|
3310
3313
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3311
3314
|
let o = t[e];
|
|
@@ -3512,14 +3515,14 @@
|
|
|
3512
3515
|
[null, null]
|
|
3513
3516
|
];
|
|
3514
3517
|
return (Pl = de(e, [
|
|
3515
|
-
["EV_ON_MESSAGE",
|
|
3516
|
-
["EV_IDENTITY_CARD_ACK",
|
|
3517
|
-
["EV_ON_ID_NAK",
|
|
3518
|
-
["EV_MT_STATS",
|
|
3519
|
-
["EV_MT_COMMAND",
|
|
3520
|
-
["EV_ON_OPEN",
|
|
3521
|
-
["EV_ON_CLOSE",
|
|
3522
|
-
["EV_ON_OPEN_ERROR",
|
|
3518
|
+
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3519
|
+
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3520
|
+
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
3521
|
+
["EV_MT_STATS", R.EVF_PUBLIC_EVENT],
|
|
3522
|
+
["EV_MT_COMMAND", R.EVF_PUBLIC_EVENT],
|
|
3523
|
+
["EV_ON_OPEN", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3524
|
+
["EV_ON_CLOSE", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3525
|
+
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3523
3526
|
["EV_TIMEOUT", 0],
|
|
3524
3527
|
[null, 0]
|
|
3525
3528
|
], t, eo, 0, Al, Ll, 0, 0, Il, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
@@ -3533,8 +3536,8 @@
|
|
|
3533
3536
|
null
|
|
3534
3537
|
]]]];
|
|
3535
3538
|
return (ml = de(e, [
|
|
3536
|
-
["EV_TIMEOUT",
|
|
3537
|
-
["EV_TIMEOUT_PERIODIC",
|
|
3539
|
+
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3540
|
+
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3538
3541
|
[0, 0]
|
|
3539
3542
|
], t, yl, 0, bl, pl, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3540
3543
|
}("C_TIMER");
|
|
@@ -3543,10 +3546,10 @@
|
|
|
3543
3546
|
if (Sl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3544
3547
|
const t = [["ST_IDLE", [[
|
|
3545
3548
|
"EV_TIMEOUT_PERIODIC",
|
|
3546
|
-
|
|
3549
|
+
Rl,
|
|
3547
3550
|
null
|
|
3548
3551
|
]]]];
|
|
3549
|
-
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC",
|
|
3552
|
+
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]], t, Dl, 0, jl, Ol, 0, 0, 0, 0)) ? 0 : -1;
|
|
3550
3553
|
}("C_YUNO");
|
|
3551
3554
|
}, e.safeSrc = function(e) {
|
|
3552
3555
|
if (!e) return "";
|