@yuneta/gobj-js 7.25.0 → 7.25.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 +6 -0
- package/dist/gobj-js.cjs.js +67 -34
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +141 -154
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +67 -34
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +224 -237
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +67 -34
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +216 -229
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +67 -34
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +313 -326
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -173,7 +173,7 @@ var S = class {
|
|
|
173
173
|
constructor(e, t, n = 0, r = null, l = "", o = null, i = null, s = 0, a = null, u = null, _ = null) {
|
|
174
174
|
this.type = e, this.name = t, this.alias = o, this.flag = n, this.default_value = r, this.header = i, this.fillspace = s, this.description = l, this.json_fn = a, this.schema = u, this.authpth = _;
|
|
175
175
|
}
|
|
176
|
-
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null), w = (e, t, n, r, l, o, i) => new S(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new S(e, t, n, r, l), D = (e, t, n, r, l, o) => new S(e, t, n, null, o, r, null, 0, null, l, null),
|
|
176
|
+
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null), w = (e, t, n, r, l, o, i) => new S(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new S(e, t, n, r, l), D = (e, t, n, r, l, o) => new S(e, t, n, null, o, r, null, 0, null, l, null), $ = (e, t, n, r, l) => new S(e, t, n, null, l, null, null, 0, null, null, r), A = (e, t, n, r, l, o) => new S(e, t, n, null, o, null, r, l), I = class {
|
|
177
177
|
constructor(e, t, n, r, l, o, i, s, a) {
|
|
178
178
|
this.gclass_name = e, this.dl_states = [], this.dl_events = [], this.gmt = t, this.lmt = n, this.attrs_table = r, this.priv = l, this.authz_table = o, this.command_table = i, this.s_user_trace_level = s, this.gclass_flag = Number(a) || 0, this.instances = 0, this.trace_level = 0, this.no_trace_level = 0, this.jn_trace_filter = null, this.fsm_checked = !1;
|
|
179
179
|
}
|
|
@@ -195,11 +195,11 @@ var S = class {
|
|
|
195
195
|
gobj_flag_pure_child: 16,
|
|
196
196
|
gobj_flag_autostart: 32,
|
|
197
197
|
gobj_flag_autoplay: 64
|
|
198
|
-
}),
|
|
198
|
+
}), U = Object.freeze({
|
|
199
199
|
obflag_destroying: 1,
|
|
200
200
|
obflag_destroyed: 2,
|
|
201
201
|
obflag_created: 4
|
|
202
|
-
}),
|
|
202
|
+
}), P = Object.freeze({
|
|
203
203
|
EVF_NO_WARN_SUBS: 1,
|
|
204
204
|
EVF_OUTPUT_EVENT: 2,
|
|
205
205
|
EVF_SYSTEM_EVENT: 4,
|
|
@@ -333,7 +333,7 @@ function z(e, t) {
|
|
|
333
333
|
return n;
|
|
334
334
|
}
|
|
335
335
|
function X(e, t, n) {
|
|
336
|
-
if (
|
|
336
|
+
if (Pr(e)) return void 0 === n ? 268369920 : 65535;
|
|
337
337
|
if (/^[0-9]+$/.test(String(e))) {
|
|
338
338
|
const t = Number(e);
|
|
339
339
|
if (t) return t;
|
|
@@ -452,10 +452,10 @@ function Se() {
|
|
|
452
452
|
}
|
|
453
453
|
function Oe(e, t, n, r, l, o, i) {
|
|
454
454
|
u = t, _ = n, c = r, f = l, g = o, d = i;
|
|
455
|
-
const s = [["EV_STATE_CHANGED",
|
|
455
|
+
const s = [["EV_STATE_CHANGED", P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS], [0, 0]];
|
|
456
456
|
for (let e = 0; e < s.length; e++) {
|
|
457
457
|
let t = s[e][0], n = s[e][1];
|
|
458
|
-
|
|
458
|
+
Pe(b, t, n);
|
|
459
459
|
}
|
|
460
460
|
return 0;
|
|
461
461
|
}
|
|
@@ -562,7 +562,7 @@ function we(e, t, n, r) {
|
|
|
562
562
|
break;
|
|
563
563
|
case y.DTP_POINTER: l = r;
|
|
564
564
|
}
|
|
565
|
-
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, wr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag &
|
|
565
|
+
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, wr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
566
566
|
}
|
|
567
567
|
function je(e) {
|
|
568
568
|
return e.jn_attrs;
|
|
@@ -570,7 +570,7 @@ function je(e) {
|
|
|
570
570
|
function De(e, t, n) {
|
|
571
571
|
return Qt(e, t) ? je(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n && rr(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`), null);
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function $e(e, t, n) {
|
|
574
574
|
if (!(e && e instanceof I)) return n && rr("gclass NULL"), null;
|
|
575
575
|
if (!t) return e.attrs_table;
|
|
576
576
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
@@ -579,8 +579,8 @@ function Ae(e, t, n) {
|
|
|
579
579
|
}
|
|
580
580
|
return n && rr(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
if (
|
|
582
|
+
function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
583
|
+
if (Pr(e)) return rr("gclass_name EMPTY"), null;
|
|
584
584
|
if (e.includes("`") || e.includes("^") || e.includes(".")) return rr(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
585
585
|
if (Me(e)) return rr(`GClass ALREADY exists: ${e}`), null;
|
|
586
586
|
let c = new I(e, r, l, o, i, s, a, u, _);
|
|
@@ -590,17 +590,17 @@ function $e(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
590
590
|
const f = n.length;
|
|
591
591
|
for (let e = 0; e < f; e++) {
|
|
592
592
|
let t = n[e][0], r = n[e][1];
|
|
593
|
-
if (
|
|
593
|
+
if (Pr(t)) continue;
|
|
594
594
|
if (Le(c, t) < 0) return Ie(c), null;
|
|
595
595
|
const l = r.length;
|
|
596
596
|
for (let e = 0; e < l; e++) {
|
|
597
597
|
let n = r[e][0], l = r[e][1], o = r[e][2];
|
|
598
|
-
|
|
598
|
+
Pr(n) || Ue(c, t, n, l, o);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
for (let e = 0; e < t.length; e++) {
|
|
602
602
|
let n = t[e][0], r = t[e][1];
|
|
603
|
-
if (!
|
|
603
|
+
if (!Pr(n)) {
|
|
604
604
|
if (Ge(c, n)) return rr(`SMachine: event repeated in input_events: ${n}`), Ie(c), null;
|
|
605
605
|
Fe(c, n, r);
|
|
606
606
|
}
|
|
@@ -640,17 +640,17 @@ function Ce(e, t) {
|
|
|
640
640
|
function Le(e, t) {
|
|
641
641
|
return e instanceof I ? ke(e, t) ? (rr(`state already exists: ${t}`), -1) : (e.dl_states.push(new V(t)), 0) : (rr("Cannot add state, typeof not GClass"), -1);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Ue(e, t, n, r, l) {
|
|
644
644
|
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), -1;
|
|
645
|
-
if (
|
|
645
|
+
if (Pr(t)) return rr("state_name EMPTY"), -1;
|
|
646
646
|
let o = ke(e, t);
|
|
647
647
|
return o ? Ce(o, n) ? (rr(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new G(n, r, l)), 0) : (rr(`state not found: ${t}`), -1);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
649
|
+
function Pe(e, t, n) {
|
|
650
|
+
Pr(t) || e.push(new M(t, n));
|
|
651
651
|
}
|
|
652
652
|
function Fe(e, t, n) {
|
|
653
|
-
return e instanceof I ?
|
|
653
|
+
return e instanceof I ? Pe(e.dl_events, t, n) : (rr("Cannot add state, typeof not GClass"), -1);
|
|
654
654
|
}
|
|
655
655
|
function Ge(e, t) {
|
|
656
656
|
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), 0;
|
|
@@ -667,18 +667,18 @@ function Ve(e) {
|
|
|
667
667
|
Or(e.dl_states) || (rr(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
668
668
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
669
669
|
let r = e.dl_states[n];
|
|
670
|
-
if (!
|
|
670
|
+
if (!Pr(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
671
671
|
let l = r.dl_actions[n];
|
|
672
|
-
|
|
672
|
+
Pr(l.event_name) || (Ge(e, l.event_name) || (rr(`SMachine: state's event NOT in input_events: gclass ${e.gclass_name}, state ${r.state_name}, event ${l.event_name}`), t += -1), l.next_state && (ke(e, l.next_state) || (rr(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${l.next_state}`), t += -1)));
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
676
676
|
let r = e.dl_events[n];
|
|
677
|
-
if (!
|
|
677
|
+
if (!Pr(r.event_name) && ($r(r.event_flag) || (rr(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & P.EVF_OUTPUT_EVENT))) {
|
|
678
678
|
let n = !1;
|
|
679
679
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
680
680
|
let l = e.dl_states[t];
|
|
681
|
-
|
|
681
|
+
Pr(l.state_name) || Ce(l, r.event_name) && (n = !0);
|
|
682
682
|
}
|
|
683
683
|
n || (rr(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
684
684
|
}
|
|
@@ -698,7 +698,7 @@ function We() {
|
|
|
698
698
|
return e;
|
|
699
699
|
}
|
|
700
700
|
function Ke() {
|
|
701
|
-
return !h || h.obflag &
|
|
701
|
+
return !h || h.obflag & U.obflag_destroyed ? null : h;
|
|
702
702
|
}
|
|
703
703
|
function xe(e, t) {
|
|
704
704
|
e = e.toLowerCase();
|
|
@@ -736,7 +736,7 @@ function Ze(e, t, n) {
|
|
|
736
736
|
if (!e || !t) return rr("hsdata or kw NULL"), -1;
|
|
737
737
|
let o = 0;
|
|
738
738
|
for (const [i, s] of Object.entries(t)) {
|
|
739
|
-
const t =
|
|
739
|
+
const t = $e(l.gclass, i, !1);
|
|
740
740
|
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && lr(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += we(l, e, t, s)) : r && (r(l, i), o--);
|
|
741
741
|
}
|
|
742
742
|
return o;
|
|
@@ -756,11 +756,11 @@ function et(e, n, r, l, o) {
|
|
|
756
756
|
if (h) return rr(`default service ALREADY registered: ${n}^${e}`), null;
|
|
757
757
|
o |= L.gobj_flag_service;
|
|
758
758
|
}
|
|
759
|
-
if (
|
|
759
|
+
if (Pr(n)) return rr("gclass_name must be a string"), null;
|
|
760
760
|
let i = Me(n, !1);
|
|
761
761
|
if (!i) return rr(`GClass not registered: ${n}^${e}`), null;
|
|
762
762
|
if (!Dr(e)) return rr(`gobj_name must be a string: ${n}`), null;
|
|
763
|
-
if (!
|
|
763
|
+
if (!Pr(e)) {
|
|
764
764
|
if (e.includes("`")) return rr(`gobj_name cannot contain char ': ${n}^${e}`), null;
|
|
765
765
|
if (e.includes("^")) return rr(`gobj_name cannot contain char ^: ${n}^${e}`), null;
|
|
766
766
|
}
|
|
@@ -768,7 +768,7 @@ function et(e, n, r, l, o) {
|
|
|
768
768
|
s.jn_attrs = Ne(s, i.attrs_table);
|
|
769
769
|
for (const [e, t] of Object.entries(s.jn_attrs)) e in s.priv && (s.priv[e] = t);
|
|
770
770
|
let a = te(s);
|
|
771
|
-
return a && Y(t("💙💙⏩ creating: %s^%s", i.gclass_name, e)), s.gobj_flag & L.gobj_flag_service && Ye(s), s.gobj_flag & L.gobj_flag_yuno && (E = s), s.gobj_flag & L.gobj_flag_default_service && (h = s), s.gobj_flag & L.gobj_flag_yuno || Be(l, s), s.obflag |=
|
|
771
|
+
return a && Y(t("💙💙⏩ creating: %s^%s", i.gclass_name, e)), s.gobj_flag & L.gobj_flag_service && Ye(s), s.gobj_flag & L.gobj_flag_yuno && (E = s), s.gobj_flag & L.gobj_flag_default_service && (h = s), s.gobj_flag & L.gobj_flag_yuno || Be(l, s), s.obflag |= U.obflag_created, s.gclass.instances++, Ze(s, r), s.gobj_flag & L.gobj_flag_service && u && u(s, null), s.gclass.gmt.mt_create2 ? s.gclass.gmt.mt_create2(s, r) : s.gclass.gmt.mt_create && s.gclass.gmt.mt_create(s), l && l.gclass.gmt.mt_child_added && (a && Y(t("👦👦🔵 child_added(%s): %s", $t(l), Dt(s))), l.gclass.gmt.mt_child_added(l, s)), a && Y(t("💙💙⏪ created: %s", $t(s))), s;
|
|
772
772
|
}
|
|
773
773
|
function tt(e, t, n) {
|
|
774
774
|
return et(e, t, n, null, L.gobj_flag_yuno);
|
|
@@ -790,30 +790,30 @@ function it(e, t, n, r) {
|
|
|
790
790
|
}
|
|
791
791
|
function st(e) {
|
|
792
792
|
if (Ct(e)) return void rr("gobj NULL or DESTROYED");
|
|
793
|
-
e.__refs__ > 0 && rr(`${Dt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (rr(`Destroying a PLAYING gobj: ${
|
|
793
|
+
e.__refs__ > 0 && rr(`${Dt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (rr(`Destroying a PLAYING gobj: ${$t(e)}`), Et(e)), e.running && (rr(`Destroying a RUNNING gobj: ${$t(e)}`), gt(e)), e.obflag |= U.obflag_destroying, function(e) {
|
|
794
794
|
if (0 === pn.length) return;
|
|
795
795
|
for (let t of pn) t.src === e && (t.src = null);
|
|
796
796
|
pn = pn.filter((t) => t.dst !== e);
|
|
797
797
|
}(e);
|
|
798
798
|
let n = te(e);
|
|
799
|
-
n && Y(t("💔💔⏩ destroying: %s",
|
|
800
|
-
let r =
|
|
801
|
-
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s",
|
|
799
|
+
n && Y(t("💔💔⏩ destroying: %s", $t(e)));
|
|
800
|
+
let r = At(e);
|
|
801
|
+
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s", $t(r), Dt(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & L.gobj_flag_service && function(e) {
|
|
802
802
|
let t = wt(e);
|
|
803
803
|
t = t.toLowerCase(), m[t] ? delete m[t] : rr(`"service NOT found in register": ${t}`);
|
|
804
|
-
}(e),
|
|
804
|
+
}(e), $n(e, e.dl_subscriptions, !0), $n(e, e.dl_subscribings, !0), r && (Je(r, e), It(e) && (Lt(r) !== e || Ct(r) || Ut(r, null))), function(e) {
|
|
805
805
|
let t = e.dl_children.slice();
|
|
806
806
|
for (let e = 0; e < t.length; e++) {
|
|
807
807
|
let n = t[e];
|
|
808
808
|
Ct(n) || st(n);
|
|
809
809
|
}
|
|
810
|
-
}(e), e.obflag &
|
|
810
|
+
}(e), e.obflag & U.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), n && Y(t("💔💔⏪ destroyed: %s", $t(e))), e.obflag |= U.obflag_destroyed, e.obflag & U.obflag_created && e.gclass.instances--;
|
|
811
811
|
}
|
|
812
812
|
function at(e) {
|
|
813
813
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
814
814
|
if (e.running) return rr(`${Dt(e)}: GObj ALREADY RUNNING`), -1;
|
|
815
815
|
if (e.disabled) return rr(`${Dt(e)}: GObj DISABLED`), -1;
|
|
816
|
-
re(e) && Y(t("⏺ ⏺ start: %s",
|
|
816
|
+
re(e) && Y(t("⏺ ⏺ start: %s", $t(e))), e.running = !0;
|
|
817
817
|
let n = 0;
|
|
818
818
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
819
819
|
}
|
|
@@ -827,12 +827,12 @@ function ct(e, t, n) {
|
|
|
827
827
|
return e.gclass.gclass_flag & C.gcflag_manual_start || Tt(e) ? 1 : (ht(e) || at(e), 0);
|
|
828
828
|
}
|
|
829
829
|
function ft(e) {
|
|
830
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s",
|
|
830
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", $t(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Gt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
831
831
|
}
|
|
832
832
|
function gt(e) {
|
|
833
833
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
834
834
|
if (!e.running) return rr(`${Dt(e)}: GObj NOT RUNNING`), -1;
|
|
835
|
-
e.playing && (lr(`${Dt(e)}: GObj stopping without previous pause`), Et(e)), re(e) && Y(t("⏹ ⏹ stop: %s",
|
|
835
|
+
e.playing && (lr(`${Dt(e)}: GObj stopping without previous pause`), Et(e)), re(e) && Y(t("⏹ ⏹ stop: %s", $t(e))), e.running = !1;
|
|
836
836
|
let n = 0;
|
|
837
837
|
return e.gclass.gmt.mt_stop && (n = e.gclass.gmt.mt_stop(e)), n;
|
|
838
838
|
}
|
|
@@ -843,7 +843,7 @@ function bt(e) {
|
|
|
843
843
|
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, dt, 0, 0);
|
|
844
844
|
}
|
|
845
845
|
function pt(e) {
|
|
846
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s",
|
|
846
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", $t(e))), ht(e) && gt(e), Gt(e, F.WALK_TOP2BOTTOM, dt, 0, 0));
|
|
847
847
|
}
|
|
848
848
|
function mt(e) {
|
|
849
849
|
if (Ct(e)) return rr(`gobj NULL or DESTROYED: ${Dt(e)}`), -1;
|
|
@@ -853,12 +853,12 @@ function mt(e) {
|
|
|
853
853
|
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return rr(`${Dt(e)}: Cannot play, start not done`), -1;
|
|
854
854
|
lr(`${Dt(e)}: GObj playing without previous start`), at(e);
|
|
855
855
|
}
|
|
856
|
-
re(e) && Y(t("⏯ ⏯ play: %s",
|
|
856
|
+
re(e) && Y(t("⏯ ⏯ play: %s", $t(e))), e.playing = !0;
|
|
857
857
|
let n = 0;
|
|
858
858
|
return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), (n < 0 || !1 === n) && (e.playing = !1)), n;
|
|
859
859
|
}
|
|
860
860
|
function Et(e) {
|
|
861
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s",
|
|
861
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", $t(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (rr(`${Dt(e)}: GObj NOT PLAYING`), -1);
|
|
862
862
|
}
|
|
863
863
|
function ht(e) {
|
|
864
864
|
return !Ct(e) && e.running;
|
|
@@ -873,7 +873,7 @@ function vt(e) {
|
|
|
873
873
|
return !Ct(e) && e.playing;
|
|
874
874
|
}
|
|
875
875
|
function St() {
|
|
876
|
-
return !E || E.obflag &
|
|
876
|
+
return !E || E.obflag & U.obflag_destroyed ? null : E;
|
|
877
877
|
}
|
|
878
878
|
function Ot() {
|
|
879
879
|
let e = St();
|
|
@@ -888,41 +888,41 @@ function Rt() {
|
|
|
888
888
|
return e ? tn(e, "yuno_id") : "";
|
|
889
889
|
}
|
|
890
890
|
function wt(e) {
|
|
891
|
-
return
|
|
891
|
+
return Ur(e) ? e.gobj_name : (rr("gobj bad type"), null);
|
|
892
892
|
}
|
|
893
893
|
function jt(e) {
|
|
894
|
-
return
|
|
894
|
+
return Ur(e) ? e.gclass.gclass_name : (rr("gobj NULL of bad type"), null);
|
|
895
895
|
}
|
|
896
896
|
function Dt(e) {
|
|
897
|
-
return
|
|
897
|
+
return Ur(e) ? e.gclass.gclass_name + "^" + wt(e) : (rr("gobj bad type"), null);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
if (!
|
|
901
|
-
let t = Dt(e), n =
|
|
902
|
-
for (; n;) t = Dt(n) + "`" + t, n =
|
|
899
|
+
function $t(e) {
|
|
900
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
901
|
+
let t = Dt(e), n = At(e);
|
|
902
|
+
for (; n;) t = Dt(n) + "`" + t, n = At(n);
|
|
903
903
|
return t;
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
905
|
+
function At(e) {
|
|
906
|
+
return Ur(e) ? e.parent : (rr("gobj NULL of bad type"), null);
|
|
907
907
|
}
|
|
908
908
|
function It(e) {
|
|
909
|
-
return
|
|
909
|
+
return Ur(e) ? !!(e.gobj_flag & L.gobj_flag_volatil) : (rr("gobj NULL of bad type"), null);
|
|
910
910
|
}
|
|
911
911
|
function kt(e) {
|
|
912
|
-
return
|
|
912
|
+
return Ur(e) ? !!(e.gobj_flag & L.gobj_flag_pure_child) : (rr("gobj NULL of bad type"), null);
|
|
913
913
|
}
|
|
914
914
|
function Ct(e) {
|
|
915
|
-
return !
|
|
915
|
+
return !Ur(e) || !!(e.obflag & (U.obflag_destroyed | U.obflag_destroying));
|
|
916
916
|
}
|
|
917
917
|
function Lt(e) {
|
|
918
|
-
return
|
|
918
|
+
return Ur(e) ? e.bottom_gobj : (rr("gobj NULL of bad type"), null);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
if (!
|
|
920
|
+
function Ut(e, t) {
|
|
921
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
922
922
|
e.bottom_gobj && lr(`${Dt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
924
|
+
function Pt(e, t, n) {
|
|
925
|
+
return Ur(e) ? t ? $e(e.gclass, t, n) : e.gclass.attrs_table : (rr("gobj NULL of bad type"), null);
|
|
926
926
|
}
|
|
927
927
|
function Ft(e, t, n, r, l) {
|
|
928
928
|
return Ct(e) ? (rr("gobj NULL, destroying, or bad type"), 0) : Mt(e.dl_children, t, n, r, l);
|
|
@@ -969,12 +969,12 @@ function Kt(e, t, n, r, l) {
|
|
|
969
969
|
return 0;
|
|
970
970
|
}
|
|
971
971
|
function xt(e, t) {
|
|
972
|
-
if (
|
|
972
|
+
if (Pr(t)) return null;
|
|
973
973
|
const n = t.toLowerCase();
|
|
974
974
|
return "__default_service__" === n ? h : "__yuno__" === n || "__root__" === n ? E : Ht(E, t);
|
|
975
975
|
}
|
|
976
976
|
function Yt(e, t) {
|
|
977
|
-
if (!
|
|
977
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), !1;
|
|
978
978
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
979
979
|
t.__disabled__;
|
|
980
980
|
let o = t.__state__;
|
|
@@ -1040,7 +1040,7 @@ function Ht(e, t) {
|
|
|
1040
1040
|
return o ? (n.splice(0, 1), n = n.join("`"), Ht(o, n)) : null;
|
|
1041
1041
|
}
|
|
1042
1042
|
function Qt(e, t) {
|
|
1043
|
-
return !
|
|
1043
|
+
return !Pr(t) && !!$e(e.gclass, t, !1);
|
|
1044
1044
|
}
|
|
1045
1045
|
function zt(e, t, n) {
|
|
1046
1046
|
let r = e.jn_attrs;
|
|
@@ -1056,7 +1056,7 @@ function Xt(e, t, n) {
|
|
|
1056
1056
|
const o = l[n];
|
|
1057
1057
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
1058
1058
|
let t;
|
|
1059
|
-
!e.gclass.gmt.mt_reading || e.obflag &
|
|
1059
|
+
!e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? t = br(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = br(e.jn_attrs, o.name))), mr(r, o.name, t);
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
return r;
|
|
@@ -1069,28 +1069,28 @@ function Zt(e, t) {
|
|
|
1069
1069
|
if (0 === Mr(t, "__service__")) return yt(e);
|
|
1070
1070
|
}
|
|
1071
1071
|
let n = De(e, t, !1);
|
|
1072
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1072
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1073
1073
|
}
|
|
1074
1074
|
function en(e, t) {
|
|
1075
1075
|
t && Mr(t, "__trace_level__");
|
|
1076
1076
|
let n = De(e, t, !1);
|
|
1077
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1077
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1078
1078
|
}
|
|
1079
1079
|
function tn(e, t) {
|
|
1080
1080
|
if (t && 0 === Mr(t, "__state__")) return cn(e);
|
|
1081
1081
|
let n = De(e, t, !1);
|
|
1082
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1082
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1083
1083
|
}
|
|
1084
1084
|
function nn(e, t) {
|
|
1085
1085
|
let n = De(e, t, !1);
|
|
1086
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1086
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1087
1087
|
}
|
|
1088
1088
|
function rn(e, n, r, l) {
|
|
1089
1089
|
if (!Dr(n)) return rr(t("gobj_write_attr(%s): path must be a string", Dt(e))), -1;
|
|
1090
1090
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1091
1091
|
if (s.length <= 1) {
|
|
1092
1092
|
let l = n;
|
|
1093
|
-
return l in i && i.hasOwnProperty(l) ? (i[l] = r, wr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag &
|
|
1093
|
+
return l in i && i.hasOwnProperty(l) ? (i[l] = r, wr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), l)), -1);
|
|
1094
1094
|
}
|
|
1095
1095
|
let a = s.length;
|
|
1096
1096
|
for (let t = 0; t < a; t++) {
|
|
@@ -1101,7 +1101,7 @@ function rn(e, n, r, l) {
|
|
|
1101
1101
|
continue;
|
|
1102
1102
|
}
|
|
1103
1103
|
let l = e.jn_attrs;
|
|
1104
|
-
if (o in l && l.hasOwnProperty(o)) return l[o] = r, wr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag &
|
|
1104
|
+
if (o in l && l.hasOwnProperty(o)) return l[o] = r, wr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
1105
1105
|
break;
|
|
1106
1106
|
}
|
|
1107
1107
|
return rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), o)), -1;
|
|
@@ -1123,22 +1123,22 @@ function ln(e) {
|
|
|
1123
1123
|
function on(e, t, n, r) {
|
|
1124
1124
|
let l = je(e), o = 0;
|
|
1125
1125
|
for (const [r, i] of Object.entries(t)) {
|
|
1126
|
-
let t =
|
|
1126
|
+
let t = Pt(e, r, !0);
|
|
1127
1127
|
t && (-1 === n || t.flag & n) && (o += we(e, l, t, i));
|
|
1128
1128
|
}
|
|
1129
1129
|
return o;
|
|
1130
1130
|
}
|
|
1131
1131
|
function sn(e, t, n) {
|
|
1132
1132
|
let r = De(e, t, !1);
|
|
1133
|
-
return r ? (r[t] = Fr(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag &
|
|
1133
|
+
return r ? (r[t] = Fr(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1134
1134
|
}
|
|
1135
1135
|
function an(e, t, n) {
|
|
1136
1136
|
let r = De(e, t, !1);
|
|
1137
|
-
return r ? (r[t] = parseInt(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag &
|
|
1137
|
+
return r ? (r[t] = parseInt(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1138
1138
|
}
|
|
1139
1139
|
function un(e, t, n) {
|
|
1140
1140
|
let r = De(e, t, !1);
|
|
1141
|
-
return r ? (r[t] = String(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag &
|
|
1141
|
+
return r ? (r[t] = String(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1142
1142
|
}
|
|
1143
1143
|
function _n(e, n) {
|
|
1144
1144
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), null;
|
|
@@ -1152,13 +1152,13 @@ function _n(e, n) {
|
|
|
1152
1152
|
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", jt(e), wt(e), cn(e), e.last_state.state_name))), !0;
|
|
1153
1153
|
}
|
|
1154
1154
|
function cn(e) {
|
|
1155
|
-
return
|
|
1155
|
+
return Ur(e) ? e.current_state.state_name : (rr("hgobj NULL"), "");
|
|
1156
1156
|
}
|
|
1157
1157
|
function fn(e, n) {
|
|
1158
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.mt_child_added && (te(e) && ir(t("👦👦🔵 child_added(%s): %s",
|
|
1158
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.mt_child_added && (te(e) && ir(t("👦👦🔵 child_added(%s): %s", $t(n), Dt(e))), n.mt_child_added(n, e)), 0) : (rr(`${Dt(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
1159
1159
|
}
|
|
1160
1160
|
function gn(e, t, n) {
|
|
1161
|
-
if (!
|
|
1161
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
1162
1162
|
let r = Ge(e.gclass, t);
|
|
1163
1163
|
if (r) return r;
|
|
1164
1164
|
if (n) {
|
|
@@ -1176,11 +1176,11 @@ function dn(e, t, n) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
function bn(e, t, n) {
|
|
1178
1178
|
let r = gn(e, t, !1);
|
|
1179
|
-
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag &
|
|
1179
|
+
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & P.EVF_OUTPUT_EVENT);
|
|
1180
1180
|
}
|
|
1181
1181
|
var pn = [], mn = !1;
|
|
1182
1182
|
function En(e, n, r, l) {
|
|
1183
|
-
return e && e instanceof k ? e.obflag & (
|
|
1183
|
+
return e && e instanceof k ? e.obflag & (U.obflag_destroyed | U.obflag_destroying) ? (rr(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) : Pr(n) ? (rr("gobj_post_event(): event EMPTY"), -1) : dn(e, n, 0) ? pn.length >= 1e4 ? (rr(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${n}, pending ${pn.length}`), -1) : (pn.push({
|
|
1184
1184
|
dst: e,
|
|
1185
1185
|
event: n,
|
|
1186
1186
|
kw: r,
|
|
@@ -1195,12 +1195,12 @@ function Tn() {
|
|
|
1195
1195
|
let e = pn;
|
|
1196
1196
|
pn = [];
|
|
1197
1197
|
let t = 0;
|
|
1198
|
-
for (let n of e) n.dst.obflag & (
|
|
1198
|
+
for (let n of e) n.dst.obflag & (U.obflag_destroyed | U.obflag_destroying) || (yn(n.dst, n.event, n.kw, n.src), t++);
|
|
1199
1199
|
return pn.length > 0 && !mn && (mn = !0, setTimeout(Tn, 0)), t;
|
|
1200
1200
|
}
|
|
1201
1201
|
function yn(e, n, r, l) {
|
|
1202
1202
|
if (!(e && e instanceof k)) return rr("gobj dst NULL"), -1;
|
|
1203
|
-
if (e.obflag & (
|
|
1203
|
+
if (e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return rr("gobj dst DESTROYED"), -1;
|
|
1204
1204
|
let o = e.current_state;
|
|
1205
1205
|
if (!o) return rr(`${Dt(e)}: current_state NULL`), -1;
|
|
1206
1206
|
let i = oe(e, n) && !ie(l, n);
|
|
@@ -1220,7 +1220,7 @@ function yn(e, n, r, l) {
|
|
|
1220
1220
|
try {
|
|
1221
1221
|
s.action && (a = s.action(e, n, r, l));
|
|
1222
1222
|
} finally {}
|
|
1223
|
-
return !i || 1 === W || e.obflag &
|
|
1223
|
+
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, n || "", $r(a) ? a : 0)), T--, a;
|
|
1224
1224
|
}
|
|
1225
1225
|
var vn = Object.freeze({
|
|
1226
1226
|
__hard_subscription__: 1,
|
|
@@ -1271,9 +1271,9 @@ function Rn(e, t, n, r, l) {
|
|
|
1271
1271
|
return -1;
|
|
1272
1272
|
}
|
|
1273
1273
|
function wn(e, n, r, l) {
|
|
1274
|
-
let o = el(e, n, "publisher", null,
|
|
1275
|
-
if (!!(zr(e, n, "subs_flag", null,
|
|
1276
|
-
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag &
|
|
1274
|
+
let o = el(e, n, "publisher", null, Pn.KW_REQUIRED), i = el(e, n, "subscriber", null, Pn.KW_REQUIRED), s = Zr(e, n, "event", "", Pn.KW_REQUIRED);
|
|
1275
|
+
if (!!(zr(e, n, "subs_flag", null, Pn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1276
|
+
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag & U.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1277
1277
|
let a = Rn(o.dl_subscriptions, o, s, n, i);
|
|
1278
1278
|
return a >= 0 ? yr(o.dl_subscriptions, a) : (rr(`${Dt(e)}: subscription in publisher not found`), ar(n)), a = Rn(i.dl_subscribings, o, s, n, i), a >= 0 ? yr(i.dl_subscribings, a) : (rr(`${Dt(e)}: subscription in subscriber not found`), ar(n)), 0;
|
|
1279
1279
|
}
|
|
@@ -1289,10 +1289,10 @@ function jn(e, n, r, l) {
|
|
|
1289
1289
|
]);
|
|
1290
1290
|
if (Object.keys(r).forEach((t) => {
|
|
1291
1291
|
o.has(t) || rr(`${Dt(e)}: key ignored in subscription (key: ${t}, event: ${n})`);
|
|
1292
|
-
}),
|
|
1293
|
-
else if (!(bn(e, n,
|
|
1292
|
+
}), Pr(n)) n = "";
|
|
1293
|
+
else if (!(bn(e, n, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ${n}`), 0;
|
|
1294
1294
|
let i = Nn(e.dl_subscriptions, e, n, r, l);
|
|
1295
|
-
Or(i) > 0 && (rr(`${Dt(e)}: ${Or(i)} subscription(s) REPEATED, will be deleted and override`), ar(i, "subscription REPEATED"),
|
|
1295
|
+
Or(i) > 0 && (rr(`${Dt(e)}: ${Or(i)} subscription(s) REPEATED, will be deleted and override`), ar(i, "subscription REPEATED"), $n(e, i, !1));
|
|
1296
1296
|
let s = function(e, t, n, r) {
|
|
1297
1297
|
let l = Ne(e, Sn);
|
|
1298
1298
|
Er(l, "event", t), Er(l, "subscriber", r), Er(l, "publisher", e);
|
|
@@ -1310,7 +1310,7 @@ function jn(e, n, r, l) {
|
|
|
1310
1310
|
pr(n, "__own_event__"), t && (o |= vn.__own_event__);
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
Nr(i) > 0 && Er(l, "__local__", ur(i)), Nr(s) > 0 && Er(l, "__filter__", ur(s)),
|
|
1313
|
+
Nr(i) > 0 && Er(l, "__local__", ur(i)), Nr(s) > 0 && Er(l, "__filter__", ur(s)), Pr(a) || Er(l, "__service__", a);
|
|
1314
1314
|
}
|
|
1315
1315
|
return Er(l, "subs_flag", o), l;
|
|
1316
1316
|
}(e, n, r, l);
|
|
@@ -1333,8 +1333,8 @@ function Dn(e, t, n, r) {
|
|
|
1333
1333
|
]);
|
|
1334
1334
|
if (Object.keys(n).forEach((n) => {
|
|
1335
1335
|
l.has(n) || rr(`${Dt(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1336
|
-
}),
|
|
1337
|
-
else if (!(bn(e, t,
|
|
1336
|
+
}), Pr(t)) t = "";
|
|
1337
|
+
else if (!(bn(e, t, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ev ${t}`), 0;
|
|
1338
1338
|
let o = Nn(e.dl_subscriptions, e, t, n, r), i = 0;
|
|
1339
1339
|
for (let t = 0; t < o.length; t++) {
|
|
1340
1340
|
let n = o[t];
|
|
@@ -1342,24 +1342,24 @@ function Dn(e, t, n, r) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
return i || (lr(`${Dt(e)}: No subscription found`), ar(n, "No subscription found")), 0;
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function $n(e, t, n) {
|
|
1346
1346
|
let r = [...t];
|
|
1347
1347
|
for (let t = 0; t < r.length; t++) wn(e, r[t], n, !1);
|
|
1348
1348
|
return 0;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function An(e, t, n, r) {
|
|
1351
1351
|
return null == n && (n = {}), Nn(e.dl_subscriptions, e, t, n, r);
|
|
1352
1352
|
}
|
|
1353
1353
|
function In(e) {
|
|
1354
|
-
let t =
|
|
1354
|
+
let t = An(e, null, null, null);
|
|
1355
1355
|
for (let n = 0; n < t.length; n++) {
|
|
1356
|
-
let r = t[n], l = el(e, r, "publisher", null,
|
|
1357
|
-
Er(r, "s_event", Zr(e, r, "event", "",
|
|
1356
|
+
let r = t[n], l = el(e, r, "publisher", null, Pn.KW_REQUIRED), o = el(e, r, "subscriber", null, Pn.KW_REQUIRED);
|
|
1357
|
+
Er(r, "s_event", Zr(e, r, "event", "", Pn.KW_REQUIRED)), Er(r, "s_publisher", Dt(l)), Er(r, "s_subscriber", Dt(o));
|
|
1358
1358
|
}
|
|
1359
1359
|
let n = kn(e, 0, null, 0);
|
|
1360
1360
|
for (let t = 0; t < n.length; t++) {
|
|
1361
|
-
let r = n[t], l = el(e, r, "publisher", null,
|
|
1362
|
-
Er(r, "s_event", Zr(e, r, "event", "",
|
|
1361
|
+
let r = n[t], l = el(e, r, "publisher", null, Pn.KW_REQUIRED), o = el(e, r, "subscriber", null, Pn.KW_REQUIRED);
|
|
1362
|
+
Er(r, "s_event", Zr(e, r, "event", "", Pn.KW_REQUIRED)), Er(r, "s_publisher", Dt(l)), Er(r, "s_subscriber", Dt(o));
|
|
1363
1363
|
}
|
|
1364
1364
|
return {
|
|
1365
1365
|
subscriptions: t,
|
|
@@ -1372,10 +1372,10 @@ function kn(e, t, n, r) {
|
|
|
1372
1372
|
return Nn(e.dl_subscribings, r, t, n, e);
|
|
1373
1373
|
}
|
|
1374
1374
|
function Cn(e, n, r) {
|
|
1375
|
-
if (wr(r) || (r = {}), !e || e.obflag & (
|
|
1376
|
-
if (
|
|
1375
|
+
if (wr(r) || (r = {}), !e || e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return rr("gobj NULL or DESTROYED"), -1;
|
|
1376
|
+
if (Pr(n)) return rr(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1377
|
let l = gn(e, n, !0);
|
|
1378
|
-
if (!(l && l.event_flag & (
|
|
1378
|
+
if (!(l && l.event_flag & (P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ev ${n}`), -1;
|
|
1379
1379
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1380
1380
|
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", n || "", "")), le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_publish_event) {
|
|
1381
1381
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
@@ -1389,16 +1389,16 @@ function Cn(e, n, r) {
|
|
|
1389
1389
|
if (t < 0) break;
|
|
1390
1390
|
if (!t) continue;
|
|
1391
1391
|
}
|
|
1392
|
-
let _ = el(e, u, "subscriber", null,
|
|
1392
|
+
let _ = el(e, u, "subscriber", null, Pn.KW_REQUIRED);
|
|
1393
1393
|
if (!_ || Ct(_)) continue;
|
|
1394
|
-
let c = zr(e, u, "subs_flag", 0,
|
|
1395
|
-
if (
|
|
1394
|
+
let c = zr(e, u, "subs_flag", 0, Pn.KW_REQUIRED), f = Zr(e, u, "event", "", Pn.KW_REQUIRED);
|
|
1395
|
+
if (Pr(f) || 0 === Mr(f, n)) {
|
|
1396
1396
|
tl(e, u, "__config__", null, 0);
|
|
1397
1397
|
let l = tl(e, u, "__global__", null, 0), i = tl(e, u, "__local__", null, 0), f = nl(e, u, "__filter__", null, 0), g = r, d = 1;
|
|
1398
1398
|
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, g, _) : Nr(f) > 0 && (d = sl(g, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Dt(_), Dt(e))), ar(f))), d < 0) break;
|
|
1399
1399
|
if (!d) continue;
|
|
1400
1400
|
let b = gn(_, n, !0);
|
|
1401
|
-
if (b && b.event_flag &
|
|
1401
|
+
if (b && b.event_flag & P.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1402
1402
|
i && Br(g, i), l && fr(g, l), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", n || "", _.running ? "" : "!!", Dt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", _.running ? "" : "!!", Dt(_), cn(_), n || "", e && !e.running ? "!!" : "", Dt(e))), le(e) && Sr(g) && ar(g));
|
|
1403
1403
|
let p = yn(_, n, g, e);
|
|
1404
1404
|
if (p < 0 && c & vn.__own_event__) {
|
|
@@ -1408,17 +1408,17 @@ function Cn(e, n, r) {
|
|
|
1408
1408
|
if (a += p, s++, Ct(e)) break;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
return s || l && l.event_flag &
|
|
1411
|
+
return s || l && l.event_flag & P.EVF_NO_WARN_SUBS || lr(`${Dt(e)}: Publish event WITHOUT subscribers, ev ${n}`), a;
|
|
1412
1412
|
}
|
|
1413
1413
|
function Ln(e, n, r, l) {
|
|
1414
1414
|
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : ((function(e) {
|
|
1415
1415
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1416
1416
|
}(e) || oe(e, null) && !ie(l, null)) && (Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", ht(e) ? "" : "!!", Dt(e), n, Dt(l))), le(e) && ar(r)), e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, n, r, l) : e.gclass.command_table ? g ? g(e, n, r, l) : o(0, -1, t("%s: global command parser not available", Dt(e)), 0, 0) : o(0, -1, t("%s: command table not available", Dt(e)), 0, 0));
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Un(e, n, r, l) {
|
|
1419
1419
|
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.gclass.gmt.mt_stats ? e.gclass.gmt.mt_stats(e, n, r, l) : d ? d(e, n, r, l) : s(0, -1, t("%s, stats parser not available", Dt(e)), 0, 0);
|
|
1420
1420
|
}
|
|
1421
|
-
var
|
|
1421
|
+
var Pn = Object.freeze({
|
|
1422
1422
|
KW_REQUIRED: 1,
|
|
1423
1423
|
KW_CREATE: 2,
|
|
1424
1424
|
KW_WILD_NUMBER: 4,
|
|
@@ -1542,7 +1542,7 @@ function sr(e) {
|
|
|
1542
1542
|
Wn && zn("msg", t) && Wn("%c" + n + " MSG: " + String(t), "color:cyan"), Zn("msg", t, n);
|
|
1543
1543
|
}
|
|
1544
1544
|
function ar(e, t) {
|
|
1545
|
-
zn("json", t) && (t &&
|
|
1545
|
+
zn("json", t) && (t && Fn.warn("=====> " + t), Fn.dir(e)), Zn("json", e, eo());
|
|
1546
1546
|
}
|
|
1547
1547
|
function ur(e) {
|
|
1548
1548
|
return structuredClone(e);
|
|
@@ -1636,17 +1636,17 @@ function jr(e) {
|
|
|
1636
1636
|
function Dr(e) {
|
|
1637
1637
|
return "string" == typeof e;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function $r(e) {
|
|
1640
1640
|
return "number" == typeof e && Number.isFinite(e);
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function Ar(e) {
|
|
1643
1643
|
return "boolean" == typeof e;
|
|
1644
1644
|
}
|
|
1645
1645
|
function Ir(e) {
|
|
1646
1646
|
return null == e;
|
|
1647
1647
|
}
|
|
1648
1648
|
function kr(e) {
|
|
1649
|
-
if (
|
|
1649
|
+
if ($r(e)) return !0;
|
|
1650
1650
|
if (!Dr(e)) return !1;
|
|
1651
1651
|
const t = Number(e);
|
|
1652
1652
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
@@ -1657,14 +1657,14 @@ function Cr(e) {
|
|
|
1657
1657
|
function Lr(e) {
|
|
1658
1658
|
return "function" == typeof e;
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function Ur(e) {
|
|
1661
1661
|
return e instanceof k;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function Pr(e) {
|
|
1664
1664
|
return !Dr(e) || 0 === e.length;
|
|
1665
1665
|
}
|
|
1666
1666
|
function Fr(e) {
|
|
1667
|
-
return
|
|
1667
|
+
return $r(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1668
1668
|
}
|
|
1669
1669
|
function Gr(e, t, n) {
|
|
1670
1670
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
@@ -1679,11 +1679,11 @@ function Mr(e, t) {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
function Wr(e, t) {
|
|
1681
1681
|
if (wr(e) || wr(t) || jr(e) || jr(t)) return 0;
|
|
1682
|
-
if (
|
|
1682
|
+
if ($r(e) || $r(t)) {
|
|
1683
1683
|
let n = Number(e), r = Number(t);
|
|
1684
1684
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1685
1685
|
}
|
|
1686
|
-
if (
|
|
1686
|
+
if (Ar(e) || Ar(t)) {
|
|
1687
1687
|
let n = Number(e), r = Number(t);
|
|
1688
1688
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1689
1689
|
}
|
|
@@ -1714,7 +1714,7 @@ function Jr(e, t) {
|
|
|
1714
1714
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1715
1715
|
}
|
|
1716
1716
|
function qr(e, t, n, r) {
|
|
1717
|
-
if (e && !
|
|
1717
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t) && !jr(t)) return rr(`${Dt(e)}: kw must be list or dict`), 0;
|
|
1718
1718
|
if (!Dr(n)) return rr(`${Dt(e)}: path must be a string: ${String(n)}`), 0;
|
|
1719
1719
|
let l = n.split("`");
|
|
1720
1720
|
if (l.length <= 1) return t[n];
|
|
@@ -1723,17 +1723,17 @@ function qr(e, t, n, r) {
|
|
|
1723
1723
|
return t;
|
|
1724
1724
|
}
|
|
1725
1725
|
function Hr(e, t, n) {
|
|
1726
|
-
e && !
|
|
1726
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1727
1727
|
let [r, l] = function(e, t) {
|
|
1728
1728
|
let n = e.lastIndexOf(t);
|
|
1729
1729
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
1730
1730
|
}(n, "`");
|
|
1731
|
-
return
|
|
1731
|
+
return Pr(l) ? pr(t, n) : pr(qr(e, t, r, !0), l), 0;
|
|
1732
1732
|
}
|
|
1733
1733
|
function Qr(e, t, n, r, l) {
|
|
1734
|
-
e && !
|
|
1734
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1735
1735
|
let o = qr(e, t, n, !1);
|
|
1736
|
-
const i = l && l &
|
|
1736
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT, u = l && l & Pn.KW_WILD_NUMBER;
|
|
1737
1737
|
if (void 0 === o) {
|
|
1738
1738
|
if (s) {
|
|
1739
1739
|
let l = Boolean(r);
|
|
@@ -1741,12 +1741,20 @@ function Qr(e, t, n, r, l) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
return i && (rr(`path not found: '${n}'`), ar(t)), Boolean(r);
|
|
1743
1743
|
}
|
|
1744
|
-
|
|
1744
|
+
let _;
|
|
1745
|
+
if (Ar(o)) _ = o;
|
|
1746
|
+
else if (u && $r(o)) _ = 0 !== o;
|
|
1747
|
+
else if (u && Dr(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o) || 0);
|
|
1748
|
+
else {
|
|
1749
|
+
if (!u || null !== o) return i && (rr(`${Dt(e)}: path value MUST BE a boolean: ${n}`), sr(t)), Boolean(r);
|
|
1750
|
+
_ = !1;
|
|
1751
|
+
}
|
|
1752
|
+
return a && Hr(e, t, n), _;
|
|
1745
1753
|
}
|
|
1746
1754
|
function zr(e, t, n, r, l) {
|
|
1747
|
-
e && !
|
|
1755
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1748
1756
|
let o = qr(e, t, n, !1);
|
|
1749
|
-
const i = l && l &
|
|
1757
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1750
1758
|
if (void 0 === o) {
|
|
1751
1759
|
if (s) {
|
|
1752
1760
|
let l = parseInt(r);
|
|
@@ -1754,12 +1762,12 @@ function zr(e, t, n, r, l) {
|
|
|
1754
1762
|
}
|
|
1755
1763
|
return i && (rr(`path not found: '${n}'`), ar(t)), parseInt(r);
|
|
1756
1764
|
}
|
|
1757
|
-
return a && Hr(e, t, n),
|
|
1765
|
+
return a && Hr(e, t, n), $r(o) ? parseInt(o) : (i && (rr(`path value MUST BE a number: ${n}`), sr(t)), parseInt(r));
|
|
1758
1766
|
}
|
|
1759
1767
|
function Xr(e, t, n, r, l) {
|
|
1760
|
-
e && !
|
|
1768
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1761
1769
|
let o = qr(e, t, n, !1);
|
|
1762
|
-
const i = l && l &
|
|
1770
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1763
1771
|
if (void 0 === o) {
|
|
1764
1772
|
if (s) {
|
|
1765
1773
|
let l = Number(r);
|
|
@@ -1767,25 +1775,18 @@ function Xr(e, t, n, r, l) {
|
|
|
1767
1775
|
}
|
|
1768
1776
|
return i && (rr(`path not found: '${n}'`), ar(t)), Number(r);
|
|
1769
1777
|
}
|
|
1770
|
-
return a && Hr(e, t, n),
|
|
1778
|
+
return a && Hr(e, t, n), $r(o) ? Number(o) : (i && (rr(`path value MUST BE a number: ${n}`), sr(t)), Number(r));
|
|
1771
1779
|
}
|
|
1772
1780
|
function Zr(e, t, n, r, l) {
|
|
1773
|
-
e && !
|
|
1781
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1774
1782
|
let o = qr(e, t, n, !1);
|
|
1775
|
-
const i = l && l &
|
|
1776
|
-
|
|
1777
|
-
if (s) {
|
|
1778
|
-
let l = String(r);
|
|
1779
|
-
return ll(e, t, n, l), l;
|
|
1780
|
-
}
|
|
1781
|
-
return i && (rr(`path not found: '${n}'`), ar(t)), String(r);
|
|
1782
|
-
}
|
|
1783
|
-
return a && Hr(e, t, n), Dr(o) ? String(o) : (i && (rr(`${Dt(e)}: path value MUST BE a string: ${n}`), sr(t)), String(r));
|
|
1783
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1784
|
+
return void 0 === o ? s ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : (a && Hr(e, t, n), Dr(o) ? o : (i && (rr(`${Dt(e)}: path value MUST BE a string: ${n}`), sr(t)), r));
|
|
1784
1785
|
}
|
|
1785
1786
|
function el(e, t, n, r, l) {
|
|
1786
|
-
e && !
|
|
1787
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1787
1788
|
let o = qr(e, t, n, !1);
|
|
1788
|
-
const i = l && l &
|
|
1789
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1789
1790
|
if (void 0 === o) {
|
|
1790
1791
|
if (s) {
|
|
1791
1792
|
let l = r;
|
|
@@ -1796,22 +1797,15 @@ function el(e, t, n, r, l) {
|
|
|
1796
1797
|
return a && Hr(e, t, n), o;
|
|
1797
1798
|
}
|
|
1798
1799
|
function tl(e, t, n, r, l) {
|
|
1799
|
-
e && !
|
|
1800
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1800
1801
|
let o = qr(e, t, n, !1);
|
|
1801
|
-
const i = l && l &
|
|
1802
|
-
|
|
1803
|
-
if (s) {
|
|
1804
|
-
let l = Object(r);
|
|
1805
|
-
return ll(e, t, n, l), l;
|
|
1806
|
-
}
|
|
1807
|
-
return i && (rr(`path not found: '${n}'`), ar(t)), Object(r);
|
|
1808
|
-
}
|
|
1809
|
-
return a && Hr(e, t, n), wr(o) ? Object(o) : (i && (rr(`path value MUST BE a dict: ${n}`), sr(t)), Object(r));
|
|
1802
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1803
|
+
return void 0 === o ? s && wr(r) && t ? (ll(e, t, n, r), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : wr(o) ? (a && Hr(e, t, n), o) : (i && (rr(`${Dt(e)}: path value MUST BE a dict: ${n}`), sr(t)), r);
|
|
1810
1804
|
}
|
|
1811
1805
|
function nl(e, t, n, r, l) {
|
|
1812
|
-
e && !
|
|
1806
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1813
1807
|
let o = qr(e, t, n, !1);
|
|
1814
|
-
const i = l && l &
|
|
1808
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1815
1809
|
if (void 0 === o) {
|
|
1816
1810
|
if (s) {
|
|
1817
1811
|
let l = r;
|
|
@@ -1822,20 +1816,13 @@ function nl(e, t, n, r, l) {
|
|
|
1822
1816
|
return a && Hr(e, t, n), o;
|
|
1823
1817
|
}
|
|
1824
1818
|
function rl(e, t, n, r, l) {
|
|
1825
|
-
e && !
|
|
1819
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1826
1820
|
let o = qr(e, t, n, !1);
|
|
1827
|
-
const i = l && l &
|
|
1828
|
-
|
|
1829
|
-
if (s) {
|
|
1830
|
-
let l = Array(r);
|
|
1831
|
-
return ll(e, t, n, l), l;
|
|
1832
|
-
}
|
|
1833
|
-
return i && (rr(`path not found: '${n}'`), ar(t)), Array(r);
|
|
1834
|
-
}
|
|
1835
|
-
return a && Hr(e, t, n), jr(o) ? Array(o) : (i && (rr(`path value MUST BE an array: ${n}`), sr(t)), Array(r));
|
|
1821
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1822
|
+
return void 0 === o ? s && jr(r) && t ? (ll(e, t, n, r), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : jr(o) ? (a && Hr(e, t, n), o) : (i && (rr(`${Dt(e)}: path value MUST BE an array: ${n}`), sr(t)), r);
|
|
1836
1823
|
}
|
|
1837
1824
|
function ll(e, t, n, r) {
|
|
1838
|
-
if (e && !
|
|
1825
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1839
1826
|
let l = n.split("`");
|
|
1840
1827
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1841
1828
|
let o = l.length;
|
|
@@ -1846,8 +1833,8 @@ function ll(e, t, n, r) {
|
|
|
1846
1833
|
return 0;
|
|
1847
1834
|
}
|
|
1848
1835
|
function ol(e, t, n, r, l) {
|
|
1849
|
-
if (e && !
|
|
1850
|
-
let o = tl(e, t, n, {},
|
|
1836
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1837
|
+
let o = tl(e, t, n, {}, Pn.KW_CREATE);
|
|
1851
1838
|
return wr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1852
1839
|
}
|
|
1853
1840
|
function il(e, n, r) {
|
|
@@ -1856,14 +1843,14 @@ function il(e, n, r) {
|
|
|
1856
1843
|
o = !1;
|
|
1857
1844
|
for (let i = 0; i < n.length; i++) {
|
|
1858
1845
|
let s = n[i];
|
|
1859
|
-
if (l =
|
|
1846
|
+
if (l = Pr(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1860
1847
|
}
|
|
1861
1848
|
} else if (wr(n)) {
|
|
1862
1849
|
o = !0;
|
|
1863
1850
|
let i = Object.keys(n);
|
|
1864
1851
|
for (let s = 0; s < i.length; s++) {
|
|
1865
1852
|
let a = i[s], u = n[a];
|
|
1866
|
-
if (l =
|
|
1853
|
+
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a), jr(u) || wr(u)) {
|
|
1867
1854
|
if (o = il(e, u, l), !o) break;
|
|
1868
1855
|
continue;
|
|
1869
1856
|
}
|
|
@@ -1889,7 +1876,7 @@ function al(e, t, n, r) {
|
|
|
1889
1876
|
return r && rr("item not found in this list"), -1;
|
|
1890
1877
|
}
|
|
1891
1878
|
function ul(e, t, n, r) {
|
|
1892
|
-
if (e && !
|
|
1879
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1893
1880
|
r || (r = sl);
|
|
1894
1881
|
let l = [];
|
|
1895
1882
|
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
@@ -1903,7 +1890,7 @@ function ul(e, t, n, r) {
|
|
|
1903
1890
|
return l;
|
|
1904
1891
|
}
|
|
1905
1892
|
function _l(e, t, n, r) {
|
|
1906
|
-
if (e && !
|
|
1893
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1907
1894
|
r || (r = sl);
|
|
1908
1895
|
let l = [];
|
|
1909
1896
|
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
@@ -1917,9 +1904,9 @@ function _l(e, t, n, r) {
|
|
|
1917
1904
|
return l;
|
|
1918
1905
|
}
|
|
1919
1906
|
function cl(e, t, n, r) {
|
|
1920
|
-
e && !
|
|
1907
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1921
1908
|
let l = {};
|
|
1922
|
-
if (Dr(n) && !
|
|
1909
|
+
if (Dr(n) && !Pr(n)) {
|
|
1923
1910
|
let o = n;
|
|
1924
1911
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1925
1912
|
} else if (wr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
@@ -1934,7 +1921,7 @@ function cl(e, t, n, r) {
|
|
|
1934
1921
|
}
|
|
1935
1922
|
function fl(e, t, n, r) {
|
|
1936
1923
|
let l = {};
|
|
1937
|
-
if (fr(l, t), Dr(n) && !
|
|
1924
|
+
if (fr(l, t), Dr(n) && !Pr(n)) {
|
|
1938
1925
|
let o = n;
|
|
1939
1926
|
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1940
1927
|
} else if (wr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
@@ -1984,7 +1971,7 @@ function pl(e, t) {
|
|
|
1984
1971
|
return !1;
|
|
1985
1972
|
}
|
|
1986
1973
|
function ml(e, t, n, r, l) {
|
|
1987
|
-
if (e && !
|
|
1974
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1988
1975
|
l || (l = sl);
|
|
1989
1976
|
let o = [];
|
|
1990
1977
|
if (jr(t)) for (let i = 0; i < t.length; i++) {
|
|
@@ -2006,18 +1993,18 @@ function ml(e, t, n, r, l) {
|
|
|
2006
1993
|
return o;
|
|
2007
1994
|
}
|
|
2008
1995
|
function El(e, t, n) {
|
|
2009
|
-
e && !
|
|
1996
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2010
1997
|
let r = {};
|
|
2011
|
-
if (
|
|
1998
|
+
if (Pr(n) || (t = qr(e, t, n)), wr(t)) r = t;
|
|
2012
1999
|
else if (jr(t)) for (let n = 0; n < t.length; n++) {
|
|
2013
|
-
let l = t[n], o = Zr(e, l, "id", "",
|
|
2014
|
-
|
|
2000
|
+
let l = t[n], o = Zr(e, l, "id", "", Pn.KW_REQUIRED);
|
|
2001
|
+
Pr(o) || (r[o] = l);
|
|
2015
2002
|
}
|
|
2016
2003
|
else rr(`${Dt(e)} kwid_new_dict: data type unknown`);
|
|
2017
2004
|
return r;
|
|
2018
2005
|
}
|
|
2019
2006
|
function hl(e, t, n) {
|
|
2020
|
-
if (e && !
|
|
2007
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)), jr(t)) return t;
|
|
2021
2008
|
if (wr(t)) {
|
|
2022
2009
|
let n = [];
|
|
2023
2010
|
for (let r of Object.keys(t)) {
|
|
@@ -2029,17 +2016,17 @@ function hl(e, t, n) {
|
|
|
2029
2016
|
return rr(`${Dt(e)} kwid_new_list: wrong type for list`), [];
|
|
2030
2017
|
}
|
|
2031
2018
|
function Tl(e, t, n, r, l) {
|
|
2032
|
-
e && !
|
|
2019
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2033
2020
|
let o = ml(e, t, n, r, l);
|
|
2034
2021
|
return o && 0 !== o.length ? o[0] : null;
|
|
2035
2022
|
}
|
|
2036
2023
|
function yl(e, t) {
|
|
2037
|
-
if (e && !
|
|
2024
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2038
2025
|
let n = [];
|
|
2039
2026
|
if (Dr(t)) n.push(t);
|
|
2040
2027
|
else if (wr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2041
2028
|
else jr(t) && t.forEach(function(t) {
|
|
2042
|
-
if (Dr(t))
|
|
2029
|
+
if (Dr(t)) Pr(t) || n.push(t);
|
|
2043
2030
|
else if (wr(t)) {
|
|
2044
2031
|
let r = Zr(e, t, "id", 0, 0);
|
|
2045
2032
|
r && n.push(r);
|
|
@@ -2124,7 +2111,7 @@ function jl(e, t, n) {
|
|
|
2124
2111
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2125
2112
|
}
|
|
2126
2113
|
function Dl(e, t, n, r) {
|
|
2127
|
-
if (!
|
|
2114
|
+
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2128
2115
|
if (!t) return;
|
|
2129
2116
|
let l = wl(t, n);
|
|
2130
2117
|
l || (l = [], jl(t, n, l));
|
|
@@ -2134,14 +2121,14 @@ function Dl(e, t, n, r) {
|
|
|
2134
2121
|
rr(e);
|
|
2135
2122
|
}
|
|
2136
2123
|
}
|
|
2137
|
-
function
|
|
2138
|
-
if (!
|
|
2124
|
+
function $l(e, t, n, r) {
|
|
2125
|
+
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2139
2126
|
if (!wr(t)) return rr("kw is not a dict"), null;
|
|
2140
2127
|
let l = wl(t, n);
|
|
2141
2128
|
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2142
2129
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return
|
|
2130
|
+
function Al(e, t, n) {
|
|
2131
|
+
return Pr(n) ? Hr(e, t, "__md_iev__`__msg_type__") : ol(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2145
2132
|
}
|
|
2146
2133
|
function Il(e, t) {
|
|
2147
2134
|
return Zr(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
@@ -2177,7 +2164,7 @@ function Ll(e, t, n) {
|
|
|
2177
2164
|
]), wr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2178
2165
|
}
|
|
2179
2166
|
}
|
|
2180
|
-
function
|
|
2167
|
+
function Ul(e, t, n) {
|
|
2181
2168
|
n && (e = ur(e));
|
|
2182
2169
|
let r = nl(null, e, "type", [], 1);
|
|
2183
2170
|
Zr(null, e, "hook", "data", 1);
|
|
@@ -2186,12 +2173,12 @@ function Pl(e, t, n) {
|
|
|
2186
2173
|
"__" !== t.substring(0, 2) && nl(null, o, l, ur(r), 1);
|
|
2187
2174
|
}, t), e;
|
|
2188
2175
|
}
|
|
2189
|
-
function
|
|
2176
|
+
function Pl(e, t, n, r) {
|
|
2190
2177
|
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2191
2178
|
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2192
|
-
if (
|
|
2179
|
+
if (Pr(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2193
2180
|
let o, i = n.split("`"), s = l;
|
|
2194
|
-
for (; (o = i.shift()) && !
|
|
2181
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2195
2182
|
if (0 === i.length && s) if (jr(s)) s.push(r);
|
|
2196
2183
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2197
2184
|
else {
|
|
@@ -2203,9 +2190,9 @@ function Ul(e, t, n, r) {
|
|
|
2203
2190
|
function Fl(e, t, n, r) {
|
|
2204
2191
|
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2205
2192
|
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2206
|
-
if (
|
|
2193
|
+
if (Pr(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2207
2194
|
let o, i = n.split("`"), s = l;
|
|
2208
|
-
for (; (o = i.shift()) && !
|
|
2195
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2209
2196
|
if (0 === i.length && s) if (jr(s)) {
|
|
2210
2197
|
let e = Sl(s, r.id);
|
|
2211
2198
|
e >= 0 && s.splice(e, 1);
|
|
@@ -2651,7 +2638,7 @@ var jo = [
|
|
|
2651
2638
|
"stats",
|
|
2652
2639
|
"rstats",
|
|
2653
2640
|
"pstats"
|
|
2654
|
-
],
|
|
2641
|
+
], $o = [
|
|
2655
2642
|
"hook",
|
|
2656
2643
|
"fkey",
|
|
2657
2644
|
"enum",
|
|
@@ -2680,7 +2667,7 @@ var jo = [
|
|
|
2680
2667
|
"coordinates",
|
|
2681
2668
|
"gbuffer"
|
|
2682
2669
|
];
|
|
2683
|
-
function
|
|
2670
|
+
function Ao(e) {
|
|
2684
2671
|
let t = {
|
|
2685
2672
|
name: e.id,
|
|
2686
2673
|
header: e.header,
|
|
@@ -2699,7 +2686,7 @@ function $o(e) {
|
|
|
2699
2686
|
if (!e.flag) return t;
|
|
2700
2687
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2701
2688
|
let r = e.flag[n];
|
|
2702
|
-
if (Ol(
|
|
2689
|
+
if (Ol($o, r)) {
|
|
2703
2690
|
switch (r) {
|
|
2704
2691
|
case "enum":
|
|
2705
2692
|
t.enum_list = e.enum;
|
|
@@ -2745,7 +2732,7 @@ function Io(e, t) {
|
|
|
2745
2732
|
for (let t = 0; t < e.length; t++) {
|
|
2746
2733
|
let r = e[t];
|
|
2747
2734
|
if (Ol(jo, r)) n.real_type || (n.real_type = r);
|
|
2748
|
-
else if (Ol(
|
|
2735
|
+
else if (Ol($o, r)) n.type || (n.type = r);
|
|
2749
2736
|
else if (Ol(Do, r)) switch (r) {
|
|
2750
2737
|
case "writable":
|
|
2751
2738
|
n.is_writable = !0;
|
|
@@ -2758,7 +2745,7 @@ function Io(e, t) {
|
|
|
2758
2745
|
}
|
|
2759
2746
|
}
|
|
2760
2747
|
n.real_type || (n.real_type = "string");
|
|
2761
|
-
} else wr(t) ? (n =
|
|
2748
|
+
} else wr(t) ? (n = Ao(t), n.name || (n.name = e), n.header || (n.header = e)) : jr(t) && (n.real_type = "array", n.enum_list = t);
|
|
2762
2749
|
return n.type || (n.type = n.real_type), n;
|
|
2763
2750
|
}
|
|
2764
2751
|
function ko(e, t) {
|
|
@@ -2779,12 +2766,12 @@ var Co = [
|
|
|
2779
2766
|
periodic: !1,
|
|
2780
2767
|
msec: 0,
|
|
2781
2768
|
timer_id: -1
|
|
2782
|
-
},
|
|
2783
|
-
function
|
|
2769
|
+
}, Uo = null;
|
|
2770
|
+
function Po(e, t, n, r) {
|
|
2784
2771
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2785
2772
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2786
2773
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2787
|
-
}, l.msec) : l.timer_id = -1, kt(e) ? yn(
|
|
2774
|
+
}, l.msec) : l.timer_id = -1, kt(e) ? yn(At(e), o, {}, e) : Cn(e, o, {}), l.periodic || -1 !== l.timer_id || ht(e) && gt(e), 0;
|
|
2788
2775
|
}
|
|
2789
2776
|
var Fo = {
|
|
2790
2777
|
mt_create: function(e) {
|
|
@@ -2813,15 +2800,15 @@ var Fo = {
|
|
|
2813
2800
|
};
|
|
2814
2801
|
function Go() {
|
|
2815
2802
|
return function(e) {
|
|
2816
|
-
if (
|
|
2803
|
+
if (Uo) return rr(`GClass ALREADY created: ${e}`), -1;
|
|
2817
2804
|
const t = [["ST_IDLE", [[
|
|
2818
2805
|
"EV_TIMEOUT",
|
|
2819
|
-
|
|
2806
|
+
Po,
|
|
2820
2807
|
null
|
|
2821
2808
|
]]]];
|
|
2822
|
-
return (
|
|
2823
|
-
["EV_TIMEOUT",
|
|
2824
|
-
["EV_TIMEOUT_PERIODIC",
|
|
2809
|
+
return (Uo = Ae(e, [
|
|
2810
|
+
["EV_TIMEOUT", P.EVF_OUTPUT_EVENT],
|
|
2811
|
+
["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT],
|
|
2825
2812
|
[0, 0]
|
|
2826
2813
|
], t, Fo, 0, Co, Lo, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
2827
2814
|
}("C_TIMER");
|
|
@@ -2952,7 +2939,7 @@ function zo() {
|
|
|
2952
2939
|
Ho,
|
|
2953
2940
|
null
|
|
2954
2941
|
]]]];
|
|
2955
|
-
return (Yo =
|
|
2942
|
+
return (Yo = Ae(e, [["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS], [0, 0]], t, Qo, 0, Ko, xo, 0, 0, 0, 0)) ? 0 : -1;
|
|
2956
2943
|
}("C_YUNO");
|
|
2957
2944
|
}
|
|
2958
2945
|
var Xo = "ievent_gate_stack", Zo = [
|
|
@@ -3054,11 +3041,11 @@ function ai(e, t, n, r) {
|
|
|
3054
3041
|
}
|
|
3055
3042
|
return 0;
|
|
3056
3043
|
}(e, function(e, t) {
|
|
3057
|
-
return
|
|
3044
|
+
return Pr(e) ? (rr("iev_create() event NULL"), null) : new si(e, t);
|
|
3058
3045
|
}(t, n));
|
|
3059
3046
|
}
|
|
3060
3047
|
function ui(e, t, n) {
|
|
3061
|
-
return
|
|
3048
|
+
return Pr(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3062
3049
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3063
3050
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3064
3051
|
dst_service: n,
|
|
@@ -3091,13 +3078,13 @@ function _i(e) {
|
|
|
3091
3078
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3092
3079
|
required_services: i
|
|
3093
3080
|
};
|
|
3094
|
-
return Dl(e, s, Xo, ui(e, wt(
|
|
3081
|
+
return Dl(e, s, Xo, ui(e, wt(At(e)), null)), Al(e, s, "__identity__"), Vo(t.gobj_timer, en(e, "timeout_idack")), ai(e, "EV_IDENTITY_CARD", s);
|
|
3095
3082
|
}
|
|
3096
3083
|
function ci(e, t) {
|
|
3097
|
-
if (
|
|
3084
|
+
if (Pr(t.event)) return -1;
|
|
3098
3085
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3099
3086
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3100
|
-
return Dl(e, n, Xo, ui(e, wt(s), i)),
|
|
3087
|
+
return Dl(e, n, Xo, ui(e, wt(s), i)), Al(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3101
3088
|
}
|
|
3102
3089
|
function fi(e, t, n, r) {
|
|
3103
3090
|
let l = e.priv;
|
|
@@ -3135,7 +3122,7 @@ function bi(e, t, n, r) {
|
|
|
3135
3122
|
function pi(e, t, n, r) {
|
|
3136
3123
|
let l = e.priv;
|
|
3137
3124
|
Wo(l.gobj_timer);
|
|
3138
|
-
let o =
|
|
3125
|
+
let o = $l(e, n, Xo, !0), i = Zr(e, o, "src_yuno", ""), s = Zr(e, o, "src_role", ""), a = Zr(e, o, "src_service", "");
|
|
3139
3126
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3140
3127
|
let u = zr(e, n, "result", -1, 0), _ = Zr(e, n, "comment", "", 0), c = Zr(e, n, "username", "", 0), f = nl(e, n, "services_roles", {});
|
|
3141
3128
|
if (u < 0) {
|
|
@@ -3149,7 +3136,7 @@ function pi(e, t, n, r) {
|
|
|
3149
3136
|
remote_yuno_role: s,
|
|
3150
3137
|
remote_yuno_service: a
|
|
3151
3138
|
};
|
|
3152
|
-
kt(e) ? yn(
|
|
3139
|
+
kt(e) ? yn(At(e), "EV_ON_ID_NAK", t, e) : Cn(e, "EV_ON_ID_NAK", t);
|
|
3153
3140
|
} else {
|
|
3154
3141
|
if (_n(e, "ST_SESSION"), l.inside_on_open = !0, l.retry_ms = 0, !l.inform_on_close) {
|
|
3155
3142
|
l.inform_on_close = !0;
|
|
@@ -3160,10 +3147,10 @@ function pi(e, t, n, r) {
|
|
|
3160
3147
|
remote_yuno_service: a,
|
|
3161
3148
|
services_roles: f
|
|
3162
3149
|
};
|
|
3163
|
-
kt(e) ? yn(
|
|
3150
|
+
kt(e) ? yn(At(e), "EV_ON_OPEN", t, e) : Cn(e, "EV_ON_OPEN", t);
|
|
3164
3151
|
}
|
|
3165
3152
|
l.inside_on_open = !1, function(e) {
|
|
3166
|
-
let t =
|
|
3153
|
+
let t = An(e, null, null, null);
|
|
3167
3154
|
for (let n = 0; n < t.length; n++) ci(e, t[n]);
|
|
3168
3155
|
}(e);
|
|
3169
3156
|
}
|
|
@@ -3193,23 +3180,23 @@ function mi(e, t, n, r) {
|
|
|
3193
3180
|
}
|
|
3194
3181
|
let i = o.event, s = o.kw;
|
|
3195
3182
|
if ("ST_SESSION" !== cn(e)) {
|
|
3196
|
-
if (dn(e, i,
|
|
3183
|
+
if (dn(e, i, P.EVF_PUBLIC_EVENT)) {
|
|
3197
3184
|
if (!(yn(e, i, s, e) < 0)) return 0;
|
|
3198
3185
|
} else rr(`${Dt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3199
3186
|
return oi(e), -1;
|
|
3200
3187
|
}
|
|
3201
3188
|
o = null;
|
|
3202
|
-
let a = Il(e, s), u =
|
|
3189
|
+
let a = Il(e, s), u = $l(e, s, Xo), _ = Zr(e, u, "dst_role", "");
|
|
3203
3190
|
if (_.toLowerCase() !== Nt().toLowerCase()) return rr(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3204
3191
|
let c = Zr(e, u, "dst_service", "");
|
|
3205
3192
|
if ("__subscribing__" === a) return -1;
|
|
3206
3193
|
if ("__unsubscribing__" === a) return -1;
|
|
3207
|
-
if (dn(e, i,
|
|
3208
|
-
if (!
|
|
3194
|
+
if (dn(e, i, P.EVF_PUBLIC_EVENT)) return yn(e, i, s, e), 0;
|
|
3195
|
+
if (!Pr(c)) {
|
|
3209
3196
|
let t = xe(c, !1);
|
|
3210
|
-
return t ? dn(t, i,
|
|
3197
|
+
return t ? dn(t, i, P.EVF_PUBLIC_EVENT) ? (yn(t, i, s, e), 0) : (rr(`${Dt(e)}: Service found but no event or not public, service '${Dt(t)}', ev '${i}'`), -1) : (lr(`${Dt(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3211
3198
|
}
|
|
3212
|
-
return kt(e) ? yn(
|
|
3199
|
+
return kt(e) ? yn(At(e), i, s, e) : Cn(e, i, s), 0;
|
|
3213
3200
|
}
|
|
3214
3201
|
function Ei(e, t, n, r) {
|
|
3215
3202
|
return 0;
|
|
@@ -3251,29 +3238,29 @@ var Ti = {
|
|
|
3251
3238
|
mt_stats: function(e, t, n, r) {
|
|
3252
3239
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3253
3240
|
n || (n = {});
|
|
3254
|
-
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null,
|
|
3241
|
+
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Pn.KW_EXTRACT);
|
|
3255
3242
|
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3256
3243
|
stats: t,
|
|
3257
3244
|
kw: o
|
|
3258
|
-
}), Dl(e, n, Xo, l), n.__stats__ = t,
|
|
3245
|
+
}), Dl(e, n, Xo, l), n.__stats__ = t, Al(e, n, "__stats__"), ai(e, "EV_MT_STATS", n, r), null;
|
|
3259
3246
|
},
|
|
3260
3247
|
mt_command_parser: function(e, t, n, r) {
|
|
3261
3248
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3262
3249
|
n || (n = {});
|
|
3263
|
-
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null,
|
|
3250
|
+
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Pn.KW_EXTRACT);
|
|
3264
3251
|
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3265
3252
|
command: t,
|
|
3266
3253
|
kw: o
|
|
3267
|
-
}), Dl(e, n, Xo, l), n.__command__ = t,
|
|
3254
|
+
}), Dl(e, n, Xo, l), n.__command__ = t, Al(e, n, "__command__"), ai(e, "EV_MT_COMMAND", n, r), null;
|
|
3268
3255
|
},
|
|
3269
3256
|
mt_inject_event: function(e, t, n, r) {
|
|
3270
3257
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3271
|
-
if (n || (n = {}),
|
|
3258
|
+
if (n || (n = {}), $l(e, n, Xo));
|
|
3272
3259
|
else {
|
|
3273
3260
|
let l = ui(e, wt(r), Zr(e, n, "__service__", 0, 0));
|
|
3274
3261
|
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3275
3262
|
}
|
|
3276
|
-
return
|
|
3263
|
+
return Al(e, n, "__message__"), ai(e, t, n, r);
|
|
3277
3264
|
},
|
|
3278
3265
|
mt_subscription_added: function(e, t) {
|
|
3279
3266
|
let n = e.priv;
|
|
@@ -3283,10 +3270,10 @@ var Ti = {
|
|
|
3283
3270
|
let n = e.priv;
|
|
3284
3271
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3285
3272
|
if (n.inside_on_open) return 0;
|
|
3286
|
-
if (
|
|
3273
|
+
if (Pr(t.event)) return 0;
|
|
3287
3274
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3288
3275
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3289
|
-
return Dl(e, r, Xo, ui(e, wt(a), s)),
|
|
3276
|
+
return Dl(e, r, Xo, ui(e, wt(a), s)), Al(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3290
3277
|
}
|
|
3291
3278
|
};
|
|
3292
3279
|
function yi() {
|
|
@@ -3371,20 +3358,20 @@ function yi() {
|
|
|
3371
3358
|
]],
|
|
3372
3359
|
[null, null]
|
|
3373
3360
|
];
|
|
3374
|
-
return (ri =
|
|
3375
|
-
["EV_ON_MESSAGE",
|
|
3376
|
-
["EV_IDENTITY_CARD_ACK",
|
|
3377
|
-
["EV_ON_ID_NAK",
|
|
3378
|
-
["EV_MT_STATS",
|
|
3379
|
-
["EV_MT_COMMAND",
|
|
3380
|
-
["EV_ON_OPEN",
|
|
3381
|
-
["EV_ON_CLOSE",
|
|
3382
|
-
["EV_ON_OPEN_ERROR",
|
|
3361
|
+
return (ri = Ae(e, [
|
|
3362
|
+
["EV_ON_MESSAGE", P.EVF_OUTPUT_EVENT],
|
|
3363
|
+
["EV_IDENTITY_CARD_ACK", P.EVF_PUBLIC_EVENT],
|
|
3364
|
+
["EV_ON_ID_NAK", P.EVF_PUBLIC_EVENT | P.EVF_OUTPUT_EVENT],
|
|
3365
|
+
["EV_MT_STATS", P.EVF_PUBLIC_EVENT],
|
|
3366
|
+
["EV_MT_COMMAND", P.EVF_PUBLIC_EVENT],
|
|
3367
|
+
["EV_ON_OPEN", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3368
|
+
["EV_ON_CLOSE", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3369
|
+
["EV_ON_OPEN_ERROR", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3383
3370
|
["EV_TIMEOUT", 0],
|
|
3384
3371
|
[null, 0]
|
|
3385
3372
|
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3386
3373
|
}("C_IEVENT_CLI");
|
|
3387
3374
|
}
|
|
3388
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2,
|
|
3375
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, A as SDATADF, j as SDATAPM, $ as SDATAPM0, O as SDATA_END, S as SDataDesc, a as YUNETA_VERSION, E as __yuno__, o as build_command_response, so as build_path, s as build_stats_response, lo as clean_name, Wo as clear_timeout, Wr as cmp_two_simple_json, l as command_parser, Hl as createElement2, ql as createOneHtml, Kl as create_json_record, ko as create_template_record, eo as current_timestamp, y as data_type_t, So as db_list_persistent_attrs, To as db_load_persistent_attrs, vo as db_remove_persistent_attrs, yo as db_save_persistent_attrs, io as debounce, Rl as delete_from_list, _r as duplicate_objects, Rr as empty_json, Pr as empty_string, Bl as escapeHtml, P as event_flag_t, bo as flat2json, Eo as flat_apply, mo as flat_diff, co as flat_key_join, fo as flat_key_split, Ue as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ve as gclass_check_fsm, Ae as gclass_create, Ge as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, Ql as getPositionRelativeToBody, oo as get_function_name, to as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Ln 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, Ke as gobj_default_service, Tn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, xt as gobj_find_gobj, xe as gobj_find_service, kn as gobj_find_subscribings, An as gobj_find_subscriptions, L as gobj_flag_t, $t as gobj_full_name, jt as gobj_gclass_name, be as gobj_get_gclass_trace_level, pe as gobj_get_gclass_trace_level2, me as gobj_get_gclass_trace_no_level, ge as gobj_get_global_trace_level, de as gobj_get_global_trace_no_level, ue as gobj_global_trace_level, _e as gobj_global_trace_no_level, Qt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, je as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, ht as gobj_is_running, yt as gobj_is_service, It as gobj_is_volatil, ze as gobj_list_persistent_attrs, In 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, wt as gobj_name, At as gobj_parent, Et as gobj_pause, mt as gobj_play, En as gobj_post_event, hn as gobj_posted_events_size, Cn 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, Se as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, yn as gobj_send_event, We as gobj_services, Ut as gobj_set_bottom_gobj, Ee as gobj_set_deep_trace, ye as gobj_set_gclass_no_trace, he as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, Te as gobj_set_gobj_trace, K as gobj_set_trace_machine_format, Dt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Oe as gobj_start_up, Un as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, jn as gobj_subscribe_event, Z as gobj_trace_level, x as gobj_trace_machine_format, ee as gobj_trace_no_level, Dn as gobj_unsubscribe_event, $n as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Gt 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, St as gobj_yuno, Rt as gobj_yuno_id, Ot as gobj_yuno_name, Nt as gobj_yuno_role, Sl as id_index_in_obj_list, no as index_in_list, jr as is_array, Ar as is_boolean, Cr as is_date, Lr as is_function, Ur as is_gobj, xr as is_metadata_key, Ir as is_null, $r as is_number, wr as is_object, Yr as is_private_key, kr as is_pure_number, Dr as is_string, Fl as jdb_delete, Vl as jdb_get, Ml as jdb_get_by_idx, Gl as jdb_get_topic, Ul as jdb_init, Pl as jdb_update, go as json2flat, hr as json_array_append, Tr as json_array_append_new, vr as json_array_extend, yr as json_array_remove, Or as json_array_size, ur as json_deep_copy, cr as json_is_identical, pr as json_object_del, br as json_object_get, mr as json_object_set, Er as json_object_set_new, Sr as json_object_size, fr as json_object_update, gr as json_object_update_existing, dr as json_object_update_missing, Nr as json_size, Yl as jwt2json, xl as jwtDecode, cl as kw_clone_by_keys, fl as kw_clone_by_not_keys, _l as kw_collect, Hr as kw_delete, al as kw_find_json_in_list, qr as kw_find_path, Pn as kw_flag_t, Qr as kw_get_bool, tl as kw_get_dict, nl as kw_get_dict_value, zr as kw_get_int, rl as kw_get_list, gl as kw_get_local_storage_value, el as kw_get_pointer, Xr as kw_get_real, Zr as kw_get_str, Jr as kw_has_key, sl as kw_match_simple, Br as kw_pop, bl as kw_remove_local_storage_value, ul as kw_select, ll as kw_set_dict_value, dl as kw_set_local_storage_value, ol as kw_set_subdict_value, ml as kwid_collect, Tl as kwid_find_one_record, yl as kwid_get_ids, pl as kwid_match_id, El as kwid_new_dict, hl as kwid_new_list, vl as list2options, kl as load_json_file, ir as log_debug, rr as log_error, or as log_info, lr as log_warning, Il as msg_iev_get_msg_type, $l as msg_iev_get_stack, Dl as msg_iev_push_stack, wl as msg_iev_read_key, Al as msg_iev_set_msg_type, jl as msg_iev_write_key, ro as node_uuid, Fr as parseBoolean, zl as parseSVG, Xl as refresh_language, yi as register_c_ievent_cli, Go as register_c_timer, zo as register_c_yuno, Jl as safeSrc, v as sdata_flag_t, Cl as send_http_json_post, qn as set_console_log_enabled, Qn as set_console_log_filter, Bn as set_log_callback, tr as set_remote_log_functions, Vo as set_timeout, Mo as set_timeout_periodic, t as sprintf, i as stats_parser, Ol as str_in_list, Mr as strcasecmp, Vr as strcmp, Gr as strncmp, Nl as strs_in_list, Kr as strstr, Io as template_get_field_desc, Zl as timeTracker, ar as trace_json, B as trace_level_t, sr as trace_msg, No as treedb_decoder_fkey, wo as treedb_decoder_hook, Ro as treedb_encoder_fkey, Ao as treedb_get_field_desc, Oo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3389
3376
|
|
|
3390
3377
|
//# sourceMappingURL=gobj-js.es.min.js.map
|