@yuneta/gobj-js 7.26.11 → 7.26.13
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 +16 -6
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +76 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +16 -6
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +165 -162
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +16 -6
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +90 -87
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +16 -6
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +90 -87
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.iife.min.js
CHANGED
|
@@ -191,11 +191,11 @@ var gobjJs = function(e) {
|
|
|
191
191
|
gobj_flag_pure_child: 16,
|
|
192
192
|
gobj_flag_autostart: 32,
|
|
193
193
|
gobj_flag_autoplay: 64
|
|
194
|
-
}),
|
|
194
|
+
}), $ = Object.freeze({
|
|
195
195
|
obflag_destroying: 1,
|
|
196
196
|
obflag_destroyed: 2,
|
|
197
197
|
obflag_created: 4
|
|
198
|
-
}),
|
|
198
|
+
}), R = Object.freeze({
|
|
199
199
|
EVF_NO_WARN_SUBS: 1,
|
|
200
200
|
EVF_OUTPUT_EVENT: 2,
|
|
201
201
|
EVF_SYSTEM_EVENT: 4,
|
|
@@ -518,7 +518,7 @@ var gobjJs = function(e) {
|
|
|
518
518
|
break;
|
|
519
519
|
case y.DTP_POINTER: l = r;
|
|
520
520
|
}
|
|
521
|
-
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 &
|
|
521
|
+
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;
|
|
522
522
|
}
|
|
523
523
|
function ce(e) {
|
|
524
524
|
return e.jn_attrs;
|
|
@@ -630,7 +630,7 @@ var gobjJs = function(e) {
|
|
|
630
630
|
}
|
|
631
631
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
632
632
|
let r = e.dl_events[n];
|
|
633
|
-
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 &
|
|
633
|
+
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))) {
|
|
634
634
|
let n = !1;
|
|
635
635
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
636
636
|
let l = e.dl_states[t];
|
|
@@ -649,7 +649,7 @@ var gobjJs = function(e) {
|
|
|
649
649
|
return n || (t && hn(`gclass not found: ${e}`), null);
|
|
650
650
|
}
|
|
651
651
|
function Se() {
|
|
652
|
-
return !m || m.obflag &
|
|
652
|
+
return !m || m.obflag & $.obflag_destroyed ? null : m;
|
|
653
653
|
}
|
|
654
654
|
function we(e, t) {
|
|
655
655
|
if (!tr(e)) return hn(`gobj_find_service(): service name must be a string: ${e}`), null;
|
|
@@ -660,10 +660,10 @@ var gobjJs = function(e) {
|
|
|
660
660
|
let t = Xe(e);
|
|
661
661
|
return t = t.toLowerCase(), b[t] && hn(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), b[t] = e, 0;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function $e(e, t) {
|
|
664
664
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function Re(e, t) {
|
|
667
667
|
let n = tl(e.dl_children, t);
|
|
668
668
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
669
669
|
}
|
|
@@ -714,14 +714,14 @@ var gobjJs = function(e) {
|
|
|
714
714
|
_.jn_attrs = _e(_, s.attrs_table);
|
|
715
715
|
for (const [e, t] of Object.entries(_.jn_attrs)) e in _.priv && (_.priv[e] = t);
|
|
716
716
|
let a = Y(_);
|
|
717
|
-
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 ||
|
|
717
|
+
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(_))), _;
|
|
718
718
|
}
|
|
719
719
|
function Ce(e, t, n, r) {
|
|
720
720
|
return Ie(e, t, n, r, N.gobj_flag_pure_child);
|
|
721
721
|
}
|
|
722
722
|
function Le(e) {
|
|
723
723
|
if (ot(e)) return void hn("gobj NULL or DESTROYED");
|
|
724
|
-
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 |=
|
|
724
|
+
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) {
|
|
725
725
|
if (0 === Lt.length) return;
|
|
726
726
|
for (let t of Lt) t.src === e && (t.src = null);
|
|
727
727
|
Lt = Lt.filter((t) => t.dst !== e);
|
|
@@ -732,13 +732,13 @@ var gobjJs = function(e) {
|
|
|
732
732
|
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) {
|
|
733
733
|
let t = Xe(e);
|
|
734
734
|
t = t.toLowerCase(), b[t] ? delete b[t] : hn(`"service NOT found in register": ${t}`);
|
|
735
|
-
}(e), e === m && (m = null), Ht(e, e.dl_subscriptions, !0), Ht(e, e.dl_subscribings, !0), r && (
|
|
735
|
+
}(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) {
|
|
736
736
|
let t = e.dl_children.slice();
|
|
737
737
|
for (let e = 0; e < t.length; e++) {
|
|
738
738
|
let n = t[e];
|
|
739
739
|
ot(n) || Le(n);
|
|
740
740
|
}
|
|
741
|
-
}(e), e.obflag &
|
|
741
|
+
}(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--;
|
|
742
742
|
}
|
|
743
743
|
function Pe(e) {
|
|
744
744
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
@@ -795,7 +795,7 @@ var gobjJs = function(e) {
|
|
|
795
795
|
return !ot(e) && e.playing;
|
|
796
796
|
}
|
|
797
797
|
function qe() {
|
|
798
|
-
return !p || p.obflag &
|
|
798
|
+
return !p || p.obflag & $.obflag_destroyed ? null : p;
|
|
799
799
|
}
|
|
800
800
|
function He() {
|
|
801
801
|
let e = qe();
|
|
@@ -834,7 +834,7 @@ var gobjJs = function(e) {
|
|
|
834
834
|
return sr(e) ? !!(e.gobj_flag & N.gobj_flag_pure_child) : (hn("gobj NULL of bad type"), null);
|
|
835
835
|
}
|
|
836
836
|
function ot(e) {
|
|
837
|
-
return !sr(e) || !!(e.obflag & (
|
|
837
|
+
return !sr(e) || !!(e.obflag & ($.obflag_destroyed | $.obflag_destroying));
|
|
838
838
|
}
|
|
839
839
|
function st(e) {
|
|
840
840
|
return sr(e) ? e.bottom_gobj : (hn("gobj NULL of bad type"), null);
|
|
@@ -951,7 +951,7 @@ var gobjJs = function(e) {
|
|
|
951
951
|
const o = l[n];
|
|
952
952
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
953
953
|
let t;
|
|
954
|
-
!e.gclass.gmt.mt_reading || e.obflag &
|
|
954
|
+
!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);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
return r;
|
|
@@ -964,28 +964,28 @@ var gobjJs = function(e) {
|
|
|
964
964
|
if (0 === ur(t, "__service__")) return Be(e);
|
|
965
965
|
}
|
|
966
966
|
let n = fe(e, t, !1);
|
|
967
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
967
|
+
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);
|
|
968
968
|
}
|
|
969
969
|
function vt(e, t) {
|
|
970
970
|
t && ur(t, "__trace_level__");
|
|
971
971
|
let n = fe(e, t, !1);
|
|
972
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
972
|
+
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);
|
|
973
973
|
}
|
|
974
974
|
function jt(e, t) {
|
|
975
975
|
if (t && 0 === ur(t, "__state__")) return kt(e);
|
|
976
976
|
let n = fe(e, t, !1);
|
|
977
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
977
|
+
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);
|
|
978
978
|
}
|
|
979
979
|
function Ot(e, t) {
|
|
980
980
|
let n = fe(e, t, !1);
|
|
981
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
981
|
+
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);
|
|
982
982
|
}
|
|
983
983
|
function St(e, t, r, l) {
|
|
984
984
|
if (!tr(t)) return hn(n("gobj_write_attr(%s): path must be a string", et(e))), -1;
|
|
985
985
|
let o, s = e.jn_attrs, i = t.split("`");
|
|
986
986
|
if (i.length <= 1) {
|
|
987
987
|
let l = t;
|
|
988
|
-
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 &
|
|
988
|
+
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);
|
|
989
989
|
}
|
|
990
990
|
let _ = i.length;
|
|
991
991
|
for (let t = 0; t < _; t++) {
|
|
@@ -996,7 +996,7 @@ var gobjJs = function(e) {
|
|
|
996
996
|
continue;
|
|
997
997
|
}
|
|
998
998
|
let l = e.jn_attrs;
|
|
999
|
-
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 &
|
|
999
|
+
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;
|
|
1000
1000
|
break;
|
|
1001
1001
|
}
|
|
1002
1002
|
return hn(n("gobj_write_attr(%s): attr not found '%s'", et(e), o)), -1;
|
|
@@ -1011,15 +1011,15 @@ var gobjJs = function(e) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
function Nt(e, t, n) {
|
|
1013
1013
|
let r = fe(e, t, !1);
|
|
1014
|
-
return r ? (r[t] = _r(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1014
|
+
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);
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function $t(e, t, n) {
|
|
1017
1017
|
let r = fe(e, t, !1);
|
|
1018
|
-
return r ? (r[t] = parseInt(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1018
|
+
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);
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function Rt(e, t, n) {
|
|
1021
1021
|
let r = fe(e, t, !1);
|
|
1022
|
-
return r ? (r[t] = String(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1022
|
+
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);
|
|
1023
1023
|
}
|
|
1024
1024
|
function Dt(e, t) {
|
|
1025
1025
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), null;
|
|
@@ -1054,11 +1054,11 @@ var gobjJs = function(e) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
function Ct(e, t, n) {
|
|
1056
1056
|
let r = At(e, t, !1);
|
|
1057
|
-
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag &
|
|
1057
|
+
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & R.EVF_OUTPUT_EVENT);
|
|
1058
1058
|
}
|
|
1059
1059
|
var Lt = [], Pt = !1;
|
|
1060
1060
|
function Ut(e, t, r, l) {
|
|
1061
|
-
return e && e instanceof S ? e.obflag & (
|
|
1061
|
+
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({
|
|
1062
1062
|
dst: e,
|
|
1063
1063
|
event: t,
|
|
1064
1064
|
kw: r,
|
|
@@ -1072,7 +1072,7 @@ var gobjJs = function(e) {
|
|
|
1072
1072
|
let t = 0;
|
|
1073
1073
|
for (let n = 0; n < e.length; n++) {
|
|
1074
1074
|
const r = e[n];
|
|
1075
|
-
if (!(r.dst.obflag & (
|
|
1075
|
+
if (!(r.dst.obflag & ($.obflag_destroyed | $.obflag_destroying))) {
|
|
1076
1076
|
try {
|
|
1077
1077
|
Vt(r.dst, r.event, r.kw, r.src);
|
|
1078
1078
|
} catch (t) {
|
|
@@ -1085,7 +1085,7 @@ var gobjJs = function(e) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
function Vt(e, t, r, l) {
|
|
1087
1087
|
if (!(e && e instanceof S)) return hn("gobj dst NULL"), -1;
|
|
1088
|
-
if (e.obflag & (
|
|
1088
|
+
if (e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj dst DESTROYED"), -1;
|
|
1089
1089
|
let o = e.current_state;
|
|
1090
1090
|
if (!o) return hn(`${et(e)}: current_state NULL`), -1;
|
|
1091
1091
|
let s = H(e, t) && !z(l, t);
|
|
@@ -1113,7 +1113,7 @@ var gobjJs = function(e) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
throw n;
|
|
1115
1115
|
}
|
|
1116
|
-
return !s || 1 === C || e.obflag &
|
|
1116
|
+
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--, _;
|
|
1117
1117
|
}
|
|
1118
1118
|
var Gt = Object.freeze({
|
|
1119
1119
|
__rename_event_name__: 1,
|
|
@@ -1194,7 +1194,7 @@ var gobjJs = function(e) {
|
|
|
1194
1194
|
if (!!(Er(e, t, "subs_flag", null, Zt.KW_REQUIRED) & Gt.__hard_subscription__) && !r) return -1;
|
|
1195
1195
|
let _ = B(s) || B(o);
|
|
1196
1196
|
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;
|
|
1197
|
-
_ && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", i || "", et(o), et(s))), vn(t)), o.obflag &
|
|
1197
|
+
_ && (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);
|
|
1198
1198
|
let a = Bt(o.dl_subscriptions, t);
|
|
1199
1199
|
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;
|
|
1200
1200
|
}
|
|
@@ -1211,7 +1211,7 @@ var gobjJs = function(e) {
|
|
|
1211
1211
|
if (Object.keys(r).forEach((n) => {
|
|
1212
1212
|
o.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1213
1213
|
}), ir(t)) t = "";
|
|
1214
|
-
else if (!(Ct(e, t,
|
|
1214
|
+
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;
|
|
1215
1215
|
let s = xt(r, t), i = Yt(e.dl_subscriptions, e, t, s.renamed_event, s.kw, l), _ = null;
|
|
1216
1216
|
for (let t = 0; t < i.length; t++) if (Er(e, i[t], "subs_flag", 0, Zt.KW_REQUIRED) & Gt.__hard_subscription__) {
|
|
1217
1217
|
_ = i[t];
|
|
@@ -1269,10 +1269,10 @@ var gobjJs = function(e) {
|
|
|
1269
1269
|
return Yt(e.dl_subscribings, r, t, null, n, e);
|
|
1270
1270
|
}
|
|
1271
1271
|
function Xt(e, t, r) {
|
|
1272
|
-
if (Zn(r) || (r = {}), !e || e.obflag & (
|
|
1272
|
+
if (Zn(r) || (r = {}), !e || e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj NULL or DESTROYED"), -1;
|
|
1273
1273
|
if (ir(t)) return hn(`${et(e)}: event EMPTY`), -1;
|
|
1274
1274
|
let l = At(e, t, !0);
|
|
1275
|
-
if (!(l && l.event_flag & (
|
|
1275
|
+
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;
|
|
1276
1276
|
let o = (B(e) || H(e, t)) && !z(e, t);
|
|
1277
1277
|
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) {
|
|
1278
1278
|
let n = e.gclass.gmt.mt_publish_event(e, t, r);
|
|
@@ -1294,10 +1294,10 @@ var gobjJs = function(e) {
|
|
|
1294
1294
|
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;
|
|
1295
1295
|
ir(g) && (g = t);
|
|
1296
1296
|
let d = 1;
|
|
1297
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, r, u) : Xn(f) > 0 && (d =
|
|
1297
|
+
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;
|
|
1298
1298
|
if (!d) continue;
|
|
1299
1299
|
let b = At(u, t, !0);
|
|
1300
|
-
if (b && b.event_flag &
|
|
1300
|
+
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !It(u, b.event_name, 0)) continue;
|
|
1301
1301
|
let p = r;
|
|
1302
1302
|
(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));
|
|
1303
1303
|
let m = Vt(u, g, p, e);
|
|
@@ -1308,7 +1308,7 @@ var gobjJs = function(e) {
|
|
|
1308
1308
|
if (_ += m, i++, ot(e)) break;
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
return i || l && l.event_flag &
|
|
1311
|
+
return i || l && l.event_flag & R.EVF_NO_WARN_SUBS || yn(`${et(e)}: Publish event WITHOUT subscribers, ev ${t}`), _;
|
|
1312
1312
|
}
|
|
1313
1313
|
var Zt = Object.freeze({
|
|
1314
1314
|
KW_REQUIRED: 1,
|
|
@@ -1495,10 +1495,10 @@ var gobjJs = function(e) {
|
|
|
1495
1495
|
o = t;
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
|
-
var
|
|
1498
|
+
var $n = 128, Rn = 4194304, Dn = "<not shown: too large to mask>";
|
|
1499
1499
|
function kn(e) {
|
|
1500
1500
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1501
|
-
if (e.length >
|
|
1501
|
+
if (e.length > Rn) return Dn;
|
|
1502
1502
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
1503
1503
|
for (; null !== (t = r.exec(e));) wn(t[2].slice(-128)) && (n = !0);
|
|
1504
1504
|
let l = [], o = 0, s = !1, i = "", _ = 0, a = 0;
|
|
@@ -1513,7 +1513,7 @@ var gobjJs = function(e) {
|
|
|
1513
1513
|
a++;
|
|
1514
1514
|
continue;
|
|
1515
1515
|
}
|
|
1516
|
-
let r = e.substring(Math.max(_, a -
|
|
1516
|
+
let r = e.substring(Math.max(_, a - $n), a);
|
|
1517
1517
|
if (_ = a + 1, !(wn(r) || n && "value" === r.toLowerCase())) {
|
|
1518
1518
|
a++;
|
|
1519
1519
|
continue;
|
|
@@ -1582,7 +1582,7 @@ var gobjJs = function(e) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
function Pn(e) {
|
|
1584
1584
|
try {
|
|
1585
|
-
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left:
|
|
1585
|
+
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left: Rn });
|
|
1586
1586
|
} catch (e) {
|
|
1587
1587
|
return In;
|
|
1588
1588
|
}
|
|
@@ -1863,6 +1863,7 @@ var gobjJs = function(e) {
|
|
|
1863
1863
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1864
1864
|
if (!tr(n)) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
1865
1865
|
if ("" === n) return hn((e ? et(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
1866
|
+
if (n.split("`").includes("")) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
1866
1867
|
let l = n.split("`"), o = l.length;
|
|
1867
1868
|
for (let s = 0; s < o; s++) {
|
|
1868
1869
|
let i = l[s];
|
|
@@ -1932,10 +1933,10 @@ var gobjJs = function(e) {
|
|
|
1932
1933
|
}
|
|
1933
1934
|
return o;
|
|
1934
1935
|
}
|
|
1935
|
-
function
|
|
1936
|
+
function $r(e, t) {
|
|
1936
1937
|
return 0 === Xn(t) || Nr(e, t, "");
|
|
1937
1938
|
}
|
|
1938
|
-
function
|
|
1939
|
+
function Rr(e, t, n, r) {
|
|
1939
1940
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1940
1941
|
let l = {};
|
|
1941
1942
|
if (tr(n) && !ir(n)) {
|
|
@@ -2005,7 +2006,7 @@ var gobjJs = function(e) {
|
|
|
2005
2006
|
}
|
|
2006
2007
|
function Lr(e, t, n, r, l) {
|
|
2007
2008
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
2008
|
-
l || (l =
|
|
2009
|
+
l || (l = $r);
|
|
2009
2010
|
let o = [];
|
|
2010
2011
|
if (er(t)) for (let s = 0; s < t.length; s++) {
|
|
2011
2012
|
let i, _ = t[s];
|
|
@@ -2373,18 +2374,18 @@ var gobjJs = function(e) {
|
|
|
2373
2374
|
return 0;
|
|
2374
2375
|
},
|
|
2375
2376
|
mt_stop: function(e) {
|
|
2376
|
-
return
|
|
2377
|
+
return $t(e, "msec", -1), 0;
|
|
2377
2378
|
},
|
|
2378
2379
|
mt_destroy: function(e) {}
|
|
2379
2380
|
};
|
|
2380
2381
|
function El(e, t) {
|
|
2381
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void
|
|
2382
|
+
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);
|
|
2382
2383
|
}
|
|
2383
2384
|
function Tl(e, t) {
|
|
2384
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void
|
|
2385
|
+
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);
|
|
2385
2386
|
}
|
|
2386
2387
|
function vl(e) {
|
|
2387
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void
|
|
2388
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2388
2389
|
}
|
|
2389
2390
|
var jl = [
|
|
2390
2391
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2416,16 +2417,16 @@ var gobjJs = function(e) {
|
|
|
2416
2417
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2417
2418
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2418
2419
|
}
|
|
2419
|
-
function
|
|
2420
|
+
function $l() {
|
|
2420
2421
|
return `${ze()}^${He()}`;
|
|
2421
2422
|
}
|
|
2422
|
-
function
|
|
2423
|
+
function Rl(e, t, n, r) {
|
|
2423
2424
|
return Xt(e, t, n), 0;
|
|
2424
2425
|
}
|
|
2425
2426
|
var Dl = {
|
|
2426
2427
|
mt_create: function(e) {
|
|
2427
2428
|
let t = e.priv;
|
|
2428
|
-
|
|
2429
|
+
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) {
|
|
2429
2430
|
let t = yt(e, "trace_levels");
|
|
2430
2431
|
if (!Zn(t)) return 0;
|
|
2431
2432
|
let n = t.__global_trace__;
|
|
@@ -2480,19 +2481,19 @@ var gobjJs = function(e) {
|
|
|
2480
2481
|
case "set-global-trace":
|
|
2481
2482
|
case "set-global-no-trace": {
|
|
2482
2483
|
let r = "set-global-no-trace" === t, o = n.level, s = Nl(n.set);
|
|
2483
|
-
return o ? null === s ? l(0, -1, `${
|
|
2484
|
+
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);
|
|
2484
2485
|
}
|
|
2485
2486
|
case "get-gclass-trace":
|
|
2486
2487
|
case "get-gclass-no-trace":
|
|
2487
2488
|
case "set-gclass-trace":
|
|
2488
2489
|
case "set-gclass-no-trace": {
|
|
2489
2490
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2490
|
-
if (!s) return l(0, -1, `${
|
|
2491
|
+
if (!s) return l(0, -1, `${$l()}: what gclass is '${o}'?`, null, null);
|
|
2491
2492
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2492
2493
|
let i = n.level, _ = Nl(n.set);
|
|
2493
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2494
|
+
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);
|
|
2494
2495
|
}
|
|
2495
|
-
default: return l(0, -1, `${
|
|
2496
|
+
default: return l(0, -1, `${$l()}: command not available: ${t}`, null, null);
|
|
2496
2497
|
}
|
|
2497
2498
|
}
|
|
2498
2499
|
};
|
|
@@ -2690,7 +2691,7 @@ var gobjJs = function(e) {
|
|
|
2690
2691
|
let l = e.priv;
|
|
2691
2692
|
vl(l.gobj_timer);
|
|
2692
2693
|
let o = Mr(e, n, kl, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2693
|
-
|
|
2694
|
+
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2694
2695
|
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", {});
|
|
2695
2696
|
if (a < 0) {
|
|
2696
2697
|
Fl(e);
|
|
@@ -2748,7 +2749,7 @@ var gobjJs = function(e) {
|
|
|
2748
2749
|
}
|
|
2749
2750
|
let s = o.event, i = o.kw;
|
|
2750
2751
|
if ("ST_SESSION" !== kt(e)) {
|
|
2751
|
-
if (It(e, s,
|
|
2752
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2752
2753
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2753
2754
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2754
2755
|
return Fl(e), -1;
|
|
@@ -2759,10 +2760,10 @@ var gobjJs = function(e) {
|
|
|
2759
2760
|
let c = Tr(e, a, "dst_service", "");
|
|
2760
2761
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2761
2762
|
if ("__unsubscribing__" === _) return yn(`${et(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2762
|
-
if (It(e, s,
|
|
2763
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) return Vt(e, s, i, e), 0;
|
|
2763
2764
|
if (!ir(c)) {
|
|
2764
2765
|
let t = we(c, !1);
|
|
2765
|
-
return t ? It(t, s,
|
|
2766
|
+
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);
|
|
2766
2767
|
}
|
|
2767
2768
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2768
2769
|
}
|
|
@@ -2775,7 +2776,7 @@ var gobjJs = function(e) {
|
|
|
2775
2776
|
var eo = {
|
|
2776
2777
|
mt_create: function(e) {
|
|
2777
2778
|
let t = e.priv;
|
|
2778
|
-
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"),
|
|
2779
|
+
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);
|
|
2779
2780
|
const n = Ot(e, "subscriber");
|
|
2780
2781
|
n && qt(e, null, {}, n);
|
|
2781
2782
|
},
|
|
@@ -2897,18 +2898,18 @@ var gobjJs = function(e) {
|
|
|
2897
2898
|
}), n;
|
|
2898
2899
|
}, e.current_timestamp = el, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2899
2900
|
let n = kr(al(e), null, !1), r = {};
|
|
2900
|
-
return n && Zn(n) && (r =
|
|
2901
|
+
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2901
2902
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2902
2903
|
let n = Et(e, E.SDF_PERSIST), r = kr(al(e), null, !1);
|
|
2903
2904
|
if (r && Zn(r)) {
|
|
2904
|
-
let l =
|
|
2905
|
-
l =
|
|
2905
|
+
let l = Rr(e, r, t, !1);
|
|
2906
|
+
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2906
2907
|
}
|
|
2907
2908
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2908
2909
|
let n = Dr(e, kr(al(e), null, !1), t, !1);
|
|
2909
2910
|
0 === zn(n) ? Ir(al(e)) : Ar(al(e), n);
|
|
2910
2911
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2911
|
-
let n =
|
|
2912
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(al(e), null, !1);
|
|
2912
2913
|
return r && Zn(r) && Wn(n, r), Ar(al(e), n);
|
|
2913
2914
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2914
2915
|
let r = null, l = null, o = null;
|
|
@@ -2933,7 +2934,7 @@ var gobjJs = function(e) {
|
|
|
2933
2934
|
return t;
|
|
2934
2935
|
}, e.empty_json = function(e) {
|
|
2935
2936
|
return 0 === Xn(e);
|
|
2936
|
-
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t =
|
|
2937
|
+
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2937
2938
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2938
2939
|
let t = null;
|
|
2939
2940
|
for (const n of Object.keys(e)) {
|
|
@@ -3016,7 +3017,7 @@ var gobjJs = function(e) {
|
|
|
3016
3017
|
}, e.get_function_name = rl, e.get_now = function() {
|
|
3017
3018
|
return Math.floor(Date.now() / 1e3);
|
|
3018
3019
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3019
|
-
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 && (
|
|
3020
|
+
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);
|
|
3020
3021
|
}, e.gobj_change_state = Dt, e.gobj_command = function(e, t, r, o) {
|
|
3021
3022
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
3022
3023
|
if (function(e) {
|
|
@@ -3128,7 +3129,7 @@ var gobjJs = function(e) {
|
|
|
3128
3129
|
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)));
|
|
3129
3130
|
}, e.gobj_start_up = function(e, t, n, r, l, o, s) {
|
|
3130
3131
|
i = t, _ = n, a = r, u = l, c = o, f = s;
|
|
3131
|
-
const d = [["EV_STATE_CHANGED",
|
|
3132
|
+
const d = [["EV_STATE_CHANGED", R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]];
|
|
3132
3133
|
for (let e = 0; e < d.length; e++) {
|
|
3133
3134
|
let t = d[e][0], n = d[e][1];
|
|
3134
3135
|
Ee(g, t, n);
|
|
@@ -3153,14 +3154,14 @@ var gobjJs = function(e) {
|
|
|
3153
3154
|
if (Object.keys(n).forEach((n) => {
|
|
3154
3155
|
l.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
3155
3156
|
}), ir(t)) t = "";
|
|
3156
|
-
else if (!(Ct(e, t,
|
|
3157
|
+
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;
|
|
3157
3158
|
let o = xt(n, t), s = Yt(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), i = 0, _ = 0, a = 0;
|
|
3158
3159
|
for (let t = 0; t < s.length; t++) {
|
|
3159
3160
|
let n = s[t], r = Jt(e, n, !1, !1);
|
|
3160
3161
|
0 === r ? i++ : r < 0 ? _++ : a++;
|
|
3161
3162
|
}
|
|
3162
3163
|
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;
|
|
3163
|
-
}, 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 =
|
|
3164
|
+
}, 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) {
|
|
3164
3165
|
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new qr("")) : new qr(e);
|
|
3165
3166
|
}, 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) {
|
|
3166
3167
|
return e instanceof Date && !isNaN(e);
|
|
@@ -3182,8 +3183,9 @@ var gobjJs = function(e) {
|
|
|
3182
3183
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3183
3184
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3184
3185
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3185
|
-
if (ir(r.id)) return hn(
|
|
3186
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${JSON.stringify(r)}`), null;
|
|
3186
3187
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3188
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3187
3189
|
let o, s = n.split("`"), i = l;
|
|
3188
3190
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3189
3191
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3210,8 +3212,9 @@ var gobjJs = function(e) {
|
|
|
3210
3212
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3211
3213
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3212
3214
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3213
|
-
if (ir(r.id)) return hn(
|
|
3215
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${JSON.stringify(r)}`), null;
|
|
3214
3216
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3217
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3215
3218
|
let o, s, i = n.split("`"), _ = l;
|
|
3216
3219
|
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Yr(_, null, o, !1);
|
|
3217
3220
|
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3257,9 +3260,9 @@ var gobjJs = function(e) {
|
|
|
3257
3260
|
} catch (e) {
|
|
3258
3261
|
return null;
|
|
3259
3262
|
}
|
|
3260
|
-
}, e.jwtDecode = Br, e.kw_clone_by_keys =
|
|
3263
|
+
}, e.jwtDecode = Br, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3261
3264
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3262
|
-
r || (r =
|
|
3265
|
+
r || (r = $r);
|
|
3263
3266
|
let l = [];
|
|
3264
3267
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3265
3268
|
let o = t[e];
|
|
@@ -3302,9 +3305,9 @@ var gobjJs = function(e) {
|
|
|
3302
3305
|
}
|
|
3303
3306
|
}
|
|
3304
3307
|
return _ && hr(e, t, n), u;
|
|
3305
|
-
}, e.kw_get_str = Tr, e.kw_has_key = gr, e.kw_match_simple =
|
|
3308
|
+
}, 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) {
|
|
3306
3309
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3307
|
-
r || (r =
|
|
3310
|
+
r || (r = $r);
|
|
3308
3311
|
let l = [];
|
|
3309
3312
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3310
3313
|
let o = t[e];
|
|
@@ -3511,14 +3514,14 @@ var gobjJs = function(e) {
|
|
|
3511
3514
|
[null, null]
|
|
3512
3515
|
];
|
|
3513
3516
|
return (Pl = de(e, [
|
|
3514
|
-
["EV_ON_MESSAGE",
|
|
3515
|
-
["EV_IDENTITY_CARD_ACK",
|
|
3516
|
-
["EV_ON_ID_NAK",
|
|
3517
|
-
["EV_MT_STATS",
|
|
3518
|
-
["EV_MT_COMMAND",
|
|
3519
|
-
["EV_ON_OPEN",
|
|
3520
|
-
["EV_ON_CLOSE",
|
|
3521
|
-
["EV_ON_OPEN_ERROR",
|
|
3517
|
+
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3518
|
+
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3519
|
+
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
3520
|
+
["EV_MT_STATS", R.EVF_PUBLIC_EVENT],
|
|
3521
|
+
["EV_MT_COMMAND", R.EVF_PUBLIC_EVENT],
|
|
3522
|
+
["EV_ON_OPEN", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3523
|
+
["EV_ON_CLOSE", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3524
|
+
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3522
3525
|
["EV_TIMEOUT", 0],
|
|
3523
3526
|
[null, 0]
|
|
3524
3527
|
], t, eo, 0, Al, Ll, 0, 0, Il, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
@@ -3532,8 +3535,8 @@ var gobjJs = function(e) {
|
|
|
3532
3535
|
null
|
|
3533
3536
|
]]]];
|
|
3534
3537
|
return (ml = de(e, [
|
|
3535
|
-
["EV_TIMEOUT",
|
|
3536
|
-
["EV_TIMEOUT_PERIODIC",
|
|
3538
|
+
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3539
|
+
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3537
3540
|
[0, 0]
|
|
3538
3541
|
], t, yl, 0, bl, pl, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3539
3542
|
}("C_TIMER");
|
|
@@ -3542,10 +3545,10 @@ var gobjJs = function(e) {
|
|
|
3542
3545
|
if (Sl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3543
3546
|
const t = [["ST_IDLE", [[
|
|
3544
3547
|
"EV_TIMEOUT_PERIODIC",
|
|
3545
|
-
|
|
3548
|
+
Rl,
|
|
3546
3549
|
null
|
|
3547
3550
|
]]]];
|
|
3548
|
-
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC",
|
|
3551
|
+
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;
|
|
3549
3552
|
}("C_YUNO");
|
|
3550
3553
|
}, e.safeSrc = function(e) {
|
|
3551
3554
|
if (!e) return "";
|