@yuneta/gobj-js 7.26.20 → 7.26.21
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 +19 -4
- package/dist/gobj-js.cjs.js +309 -69
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +944 -756
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +309 -69
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +950 -762
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +309 -69
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1116 -928
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +309 -69
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +1116 -928
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -178,7 +178,7 @@ var O = class {
|
|
|
178
178
|
}
|
|
179
179
|
}, I = class {
|
|
180
180
|
constructor(e, t, n, r, l) {
|
|
181
|
-
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(l) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv =
|
|
181
|
+
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(l) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv = Qr(t.priv), this.running = !1, this.playing = !1, this.disabled = !1, this.bottom_gobj = null, this.trace_level = 0, this.no_trace_level = 0;
|
|
182
182
|
}
|
|
183
183
|
}, C = Object.freeze({
|
|
184
184
|
gcflag_manual_start: 1,
|
|
@@ -230,7 +230,7 @@ function K() {
|
|
|
230
230
|
return W;
|
|
231
231
|
}
|
|
232
232
|
function Y(e) {
|
|
233
|
-
|
|
233
|
+
bl(e) && (e = JSON.stringify(e)), dr(" ".repeat(Math.max(1, 2 * y)) + String(e));
|
|
234
234
|
}
|
|
235
235
|
var B = Object.freeze({
|
|
236
236
|
TRACE_MACHINE: 65536,
|
|
@@ -332,7 +332,7 @@ function Q(e, t) {
|
|
|
332
332
|
return n;
|
|
333
333
|
}
|
|
334
334
|
function X(e, t, n) {
|
|
335
|
-
if (
|
|
335
|
+
if (Nl(e)) return void 0 === n ? 268369920 : 65535;
|
|
336
336
|
if (/^[0-9]+$/.test(String(e))) {
|
|
337
337
|
const t = Number(e);
|
|
338
338
|
if (t) return t;
|
|
@@ -405,22 +405,22 @@ function de() {
|
|
|
405
405
|
return Q(H, null);
|
|
406
406
|
}
|
|
407
407
|
function be(e) {
|
|
408
|
-
const t =
|
|
408
|
+
const t = ml(e) ? Me(e) : e;
|
|
409
409
|
return t ? Q(t.trace_level | q, t.s_user_trace_level) : (cr(`gobj_get_gclass_trace_level: gclass NOT FOUND: ${e}`), []);
|
|
410
410
|
}
|
|
411
411
|
function pe(e) {
|
|
412
|
-
const t =
|
|
412
|
+
const t = ml(e) ? Me(e) : e;
|
|
413
413
|
return t ? Q(t.trace_level, t.s_user_trace_level) : (cr(`gobj_get_gclass_trace_level2: gclass NOT FOUND: ${e}`), []);
|
|
414
414
|
}
|
|
415
415
|
function me(e) {
|
|
416
|
-
const t =
|
|
416
|
+
const t = ml(e) ? Me(e) : e;
|
|
417
417
|
return t ? Q(t.no_trace_level, t.s_user_trace_level) : (cr(`gobj_get_gclass_trace_no_level: gclass NOT FOUND: ${e}`), []);
|
|
418
418
|
}
|
|
419
419
|
function he(e) {
|
|
420
420
|
return z = Number(e) || 0, 0;
|
|
421
421
|
}
|
|
422
422
|
function Ee(e, t, n) {
|
|
423
|
-
const r =
|
|
423
|
+
const r = ml(e) ? Me(e) : e;
|
|
424
424
|
if (!r) return cr(`gobj_set_gclass_trace: gclass NOT FOUND: ${e}`), -1;
|
|
425
425
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
426
426
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
@@ -431,7 +431,7 @@ function ye(e, t, n) {
|
|
|
431
431
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
432
432
|
}
|
|
433
433
|
function Te(e, t, n) {
|
|
434
|
-
const r =
|
|
434
|
+
const r = ml(e) ? Me(e) : e;
|
|
435
435
|
if (!r) return cr(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
436
436
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_no_trace", r.s_user_trace_level || null);
|
|
437
437
|
return l ? (n ? r.no_trace_level |= l : r.no_trace_level &= ~l, 0) : -1;
|
|
@@ -460,7 +460,7 @@ function Se(e, t, n, r, l, o, i) {
|
|
|
460
460
|
}
|
|
461
461
|
function Ne(e, t) {
|
|
462
462
|
let n = {};
|
|
463
|
-
if (!
|
|
463
|
+
if (!pl(t)) return cr("sdata_desc MUST be an array"), pr(t), n;
|
|
464
464
|
for (let r = 0; r < t.length; r++) {
|
|
465
465
|
const l = t[r];
|
|
466
466
|
l.name && we(e, n, l);
|
|
@@ -474,7 +474,7 @@ function we(e, t, n) {
|
|
|
474
474
|
r = String(l);
|
|
475
475
|
break;
|
|
476
476
|
case T.DTP_BOOLEAN:
|
|
477
|
-
r =
|
|
477
|
+
r = wl(l);
|
|
478
478
|
break;
|
|
479
479
|
case T.DTP_INTEGER:
|
|
480
480
|
r = parseInt(l), isNaN(r) && cr(`${Rt(e)}: attr NaN: ${n.name}`);
|
|
@@ -483,26 +483,26 @@ function we(e, t, n) {
|
|
|
483
483
|
r = Number(l), isNaN(r) && cr(`${Rt(e)}: attr NaN: ${n.name}`);
|
|
484
484
|
break;
|
|
485
485
|
case T.DTP_LIST:
|
|
486
|
-
if (
|
|
486
|
+
if (ml(l)) try {
|
|
487
487
|
r = JSON.parse(l);
|
|
488
488
|
} catch (e) {
|
|
489
489
|
cr(`JSON parse error: ${e.message}`);
|
|
490
490
|
}
|
|
491
491
|
else r = l;
|
|
492
|
-
|
|
492
|
+
pl(r) || (r = []);
|
|
493
493
|
break;
|
|
494
494
|
case T.DTP_DICT:
|
|
495
|
-
if (
|
|
495
|
+
if (ml(l)) try {
|
|
496
496
|
r = JSON.parse(l);
|
|
497
497
|
} catch (e) {
|
|
498
498
|
cr(`JSON parse error: ${e.message}`);
|
|
499
499
|
}
|
|
500
500
|
else r = l;
|
|
501
|
-
|
|
501
|
+
bl(r) || (r = {});
|
|
502
502
|
break;
|
|
503
503
|
case T.DTP_JSON:
|
|
504
504
|
if ("" === l || void 0 === l) r = null;
|
|
505
|
-
else if (
|
|
505
|
+
else if (ml(l)) try {
|
|
506
506
|
r = JSON.parse(l);
|
|
507
507
|
} catch (e) {
|
|
508
508
|
cr(`JSON parse error: ${e.message}`);
|
|
@@ -518,14 +518,14 @@ function je(e, t, n, r) {
|
|
|
518
518
|
switch (n.type) {
|
|
519
519
|
case T.DTP_STRING:
|
|
520
520
|
if (null == r) l = "";
|
|
521
|
-
else if (
|
|
521
|
+
else if (ml(r)) l = String(r);
|
|
522
522
|
else {
|
|
523
523
|
let e = JSON.stringify(r);
|
|
524
524
|
e && (l = String(e));
|
|
525
525
|
}
|
|
526
526
|
break;
|
|
527
527
|
case T.DTP_BOOLEAN:
|
|
528
|
-
l =
|
|
528
|
+
l = wl(r);
|
|
529
529
|
break;
|
|
530
530
|
case T.DTP_INTEGER:
|
|
531
531
|
if (l = parseInt(r), isNaN(l)) return cr(`${Rt(e)}: attr NaN: ${n.name}`), -1;
|
|
@@ -534,25 +534,25 @@ function je(e, t, n, r) {
|
|
|
534
534
|
if (l = Number(r), isNaN(l)) return cr(`${Rt(e)}: attr NaN: ${n.name}`), -1;
|
|
535
535
|
break;
|
|
536
536
|
case T.DTP_LIST:
|
|
537
|
-
if (
|
|
537
|
+
if (ml(r)) try {
|
|
538
538
|
l = JSON.parse(r);
|
|
539
539
|
} catch (e) {
|
|
540
540
|
cr(`JSON parse error: ${e.message}`);
|
|
541
541
|
}
|
|
542
542
|
else l = r;
|
|
543
|
-
if (!
|
|
543
|
+
if (!pl(l)) return cr(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
545
|
case T.DTP_DICT:
|
|
546
|
-
if (
|
|
546
|
+
if (ml(r)) try {
|
|
547
547
|
l = JSON.parse(r);
|
|
548
548
|
} catch (e) {
|
|
549
549
|
cr(`JSON parse error: ${e.message}`);
|
|
550
550
|
}
|
|
551
551
|
else l = r;
|
|
552
|
-
if (!
|
|
552
|
+
if (!bl(l)) return cr(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
554
|
case T.DTP_JSON:
|
|
555
|
-
if (l = r,
|
|
555
|
+
if (l = r, ml(r)) {
|
|
556
556
|
const e = r.trim();
|
|
557
557
|
if (e.startsWith("{") || e.startsWith("[")) try {
|
|
558
558
|
l = JSON.parse(e);
|
|
@@ -563,7 +563,7 @@ function je(e, t, n, r) {
|
|
|
563
563
|
break;
|
|
564
564
|
case T.DTP_POINTER: l = r;
|
|
565
565
|
}
|
|
566
|
-
return void 0 === l && cr(`${Rt(e)}: attr undefined: ${n.name}`), t[n.name] = l,
|
|
566
|
+
return void 0 === l && cr(`${Rt(e)}: attr undefined: ${n.name}`), t[n.name] = l, bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
567
567
|
}
|
|
568
568
|
function $e(e) {
|
|
569
569
|
return e.jn_attrs;
|
|
@@ -581,7 +581,7 @@ function De(e, t, n) {
|
|
|
581
581
|
return n && cr(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
582
582
|
}
|
|
583
583
|
function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
584
|
-
if (
|
|
584
|
+
if (Nl(e)) return cr("gclass_name EMPTY"), null;
|
|
585
585
|
if (e.includes("`") || e.includes("^") || e.includes(".")) return cr(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
586
586
|
if (Me(e)) return cr(`GClass ALREADY exists: ${e}`), null;
|
|
587
587
|
let c = new k(e, r, l, o, i, s, a, u, _);
|
|
@@ -591,17 +591,17 @@ function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
591
591
|
const f = n.length;
|
|
592
592
|
for (let e = 0; e < f; e++) {
|
|
593
593
|
let t = n[e][0], r = n[e][1];
|
|
594
|
-
if (
|
|
594
|
+
if (Nl(t)) continue;
|
|
595
595
|
if (Le(c, t) < 0) return ke(c), null;
|
|
596
596
|
const l = r.length;
|
|
597
597
|
for (let e = 0; e < l; e++) {
|
|
598
598
|
let n = r[e][0], l = r[e][1], o = r[e][2];
|
|
599
|
-
|
|
599
|
+
Nl(n) || Pe(c, t, n, l, o);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
for (let e = 0; e < t.length; e++) {
|
|
603
603
|
let n = t[e][0], r = t[e][1];
|
|
604
|
-
if (!
|
|
604
|
+
if (!Nl(n)) {
|
|
605
605
|
if (Ve(c, n)) return cr(`SMachine: event repeated in input_events: ${n}`), ke(c), null;
|
|
606
606
|
Fe(c, n, r);
|
|
607
607
|
}
|
|
@@ -614,7 +614,7 @@ function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
614
614
|
}
|
|
615
615
|
function ke(e) {
|
|
616
616
|
let t;
|
|
617
|
-
if (
|
|
617
|
+
if (ml(e)) t = e;
|
|
618
618
|
else {
|
|
619
619
|
if (!(e instanceof k)) return cr("Cannot unregister gclass, type unknown"), -1;
|
|
620
620
|
t = e.gclass_name;
|
|
@@ -643,12 +643,12 @@ function Le(e, t) {
|
|
|
643
643
|
}
|
|
644
644
|
function Pe(e, t, n, r, l) {
|
|
645
645
|
if (!(e instanceof k)) return cr("Cannot add state, typeof not GClass"), -1;
|
|
646
|
-
if (
|
|
646
|
+
if (Nl(t)) return cr("state_name EMPTY"), -1;
|
|
647
647
|
let o = Ie(e, t);
|
|
648
648
|
return o ? Ce(o, n) ? (cr(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new V(n, r, l)), 0) : (cr(`state not found: ${t}`), -1);
|
|
649
649
|
}
|
|
650
650
|
function Ue(e, t, n) {
|
|
651
|
-
|
|
651
|
+
Nl(t) || e.push(new M(t, n));
|
|
652
652
|
}
|
|
653
653
|
function Fe(e, t, n) {
|
|
654
654
|
return e instanceof k ? Ue(e.dl_events, t, n) : (cr("Cannot add state, typeof not GClass"), -1);
|
|
@@ -665,21 +665,21 @@ function Ve(e, t) {
|
|
|
665
665
|
function Ge(e) {
|
|
666
666
|
if (!(e instanceof k)) return cr("Cannot add state, typeof not GClass"), -1;
|
|
667
667
|
let t = 0;
|
|
668
|
-
|
|
668
|
+
fl(e.dl_states) || (cr(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
669
669
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
670
670
|
let r = e.dl_states[n];
|
|
671
|
-
if (!
|
|
671
|
+
if (!Nl(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
672
672
|
let l = r.dl_actions[n];
|
|
673
|
-
|
|
673
|
+
Nl(l.event_name) || (Ve(e, l.event_name) || (cr(`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 && (Ie(e, l.next_state) || (cr(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${l.next_state}`), t += -1)));
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
677
677
|
let r = e.dl_events[n];
|
|
678
|
-
if (!
|
|
678
|
+
if (!Nl(r.event_name) && (hl(r.event_flag) || (cr(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & U.EVF_OUTPUT_EVENT))) {
|
|
679
679
|
let n = !1;
|
|
680
680
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
681
681
|
let l = e.dl_states[t];
|
|
682
|
-
|
|
682
|
+
Nl(l.state_name) || Ce(l, r.event_name) && (n = !0);
|
|
683
683
|
}
|
|
684
684
|
n || (cr(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
685
685
|
}
|
|
@@ -695,14 +695,14 @@ function Me(e, t) {
|
|
|
695
695
|
}
|
|
696
696
|
function We() {
|
|
697
697
|
let e = [];
|
|
698
|
-
for (const t of Object.keys(m))
|
|
698
|
+
for (const t of Object.keys(m)) al(e, t);
|
|
699
699
|
return e;
|
|
700
700
|
}
|
|
701
701
|
function xe() {
|
|
702
702
|
return !E || E.obflag & P.obflag_destroyed ? null : E;
|
|
703
703
|
}
|
|
704
704
|
function Ke(e, t) {
|
|
705
|
-
if (!
|
|
705
|
+
if (!ml(e)) return cr(`gobj_find_service(): service name must be a string: ${e}`), null;
|
|
706
706
|
e = e.toLowerCase();
|
|
707
707
|
return m[e] || (t && cr(`gobj service not found: ${e}`), null);
|
|
708
708
|
}
|
|
@@ -714,8 +714,8 @@ function Be(e, t) {
|
|
|
714
714
|
t.parent && cr(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
715
715
|
}
|
|
716
716
|
function Je(e, t) {
|
|
717
|
-
let n =
|
|
718
|
-
n >= 0 && (
|
|
717
|
+
let n = ni(e.dl_children, t);
|
|
718
|
+
n >= 0 && (ul(e.dl_children, n), t.parent = null);
|
|
719
719
|
}
|
|
720
720
|
function qe(e, t) {
|
|
721
721
|
return Tt(e) ? u ? u(e, t) : -1 : (cr(`${Rt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
@@ -742,7 +742,7 @@ function Ze(e, t, n) {
|
|
|
742
742
|
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && fr(`${Rt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += je(l, e, t, s)) : r && (r(l, i), o--);
|
|
743
743
|
}
|
|
744
744
|
return o;
|
|
745
|
-
})($e(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (cr(`${Rt(e)} json2data() FAILED`),
|
|
745
|
+
})($e(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (cr(`${Rt(e)} json2data() FAILED`), zr(r));
|
|
746
746
|
}
|
|
747
747
|
function et(e, n, r, l, o) {
|
|
748
748
|
if (o & L.gobj_flag_yuno) {
|
|
@@ -751,7 +751,7 @@ function et(e, n, r, l, o) {
|
|
|
751
751
|
} else {
|
|
752
752
|
if (!l) return cr("gobj NEEDS a parent!"), null;
|
|
753
753
|
if (!("string" == typeof l || l instanceof I)) return cr(`BAD TYPE of parent: ${l}`), null;
|
|
754
|
-
if (
|
|
754
|
+
if (ml(l)) {
|
|
755
755
|
const e = l;
|
|
756
756
|
if (!(l = Ke(e))) return fr(`parent service not found: ${e}`), null;
|
|
757
757
|
}
|
|
@@ -761,11 +761,11 @@ function et(e, n, r, l, o) {
|
|
|
761
761
|
if (E) return cr(`default service ALREADY registered: ${n}^${e}`), null;
|
|
762
762
|
o |= L.gobj_flag_service;
|
|
763
763
|
}
|
|
764
|
-
if (
|
|
764
|
+
if (Nl(n)) return cr("gclass_name must be a string"), null;
|
|
765
765
|
let i = Me(n, !1);
|
|
766
766
|
if (!i) return cr(`GClass not registered: ${n}^${e}`), null;
|
|
767
|
-
if (!
|
|
768
|
-
if (!
|
|
767
|
+
if (!ml(e)) return cr(`gobj_name must be a string: ${n}`), null;
|
|
768
|
+
if (!Nl(e)) {
|
|
769
769
|
if (e.includes("`")) return cr(`gobj_name cannot contain char ': ${n}^${e}`), null;
|
|
770
770
|
if (e.includes("^")) return cr(`gobj_name cannot contain char ^: ${n}^${e}`), null;
|
|
771
771
|
}
|
|
@@ -893,41 +893,41 @@ function wt() {
|
|
|
893
893
|
return e ? tn(e, "yuno_id") : "";
|
|
894
894
|
}
|
|
895
895
|
function jt(e) {
|
|
896
|
-
return
|
|
896
|
+
return Sl(e) ? e.gobj_name : (cr("gobj bad type"), null);
|
|
897
897
|
}
|
|
898
898
|
function $t(e) {
|
|
899
|
-
return
|
|
899
|
+
return Sl(e) ? e.gclass.gclass_name : (cr("gobj NULL of bad type"), null);
|
|
900
900
|
}
|
|
901
901
|
function Rt(e) {
|
|
902
|
-
return
|
|
902
|
+
return Sl(e) ? e.gclass.gclass_name + "^" + jt(e) : (cr("gobj bad type"), null);
|
|
903
903
|
}
|
|
904
904
|
function Dt(e) {
|
|
905
|
-
if (!
|
|
905
|
+
if (!Sl(e)) return cr("gobj NULL of bad type"), null;
|
|
906
906
|
let t = Rt(e), n = At(e);
|
|
907
907
|
for (; n;) t = Rt(n) + "`" + t, n = At(n);
|
|
908
908
|
return t;
|
|
909
909
|
}
|
|
910
910
|
function At(e) {
|
|
911
|
-
return
|
|
911
|
+
return Sl(e) ? e.parent : (cr("gobj NULL of bad type"), null);
|
|
912
912
|
}
|
|
913
913
|
function kt(e) {
|
|
914
|
-
return
|
|
914
|
+
return Sl(e) ? !!(e.gobj_flag & L.gobj_flag_volatil) : (cr("gobj NULL of bad type"), null);
|
|
915
915
|
}
|
|
916
916
|
function It(e) {
|
|
917
|
-
return
|
|
917
|
+
return Sl(e) ? !!(e.gobj_flag & L.gobj_flag_pure_child) : (cr("gobj NULL of bad type"), null);
|
|
918
918
|
}
|
|
919
919
|
function Ct(e) {
|
|
920
|
-
return !
|
|
920
|
+
return !Sl(e) || !!(e.obflag & (P.obflag_destroyed | P.obflag_destroying));
|
|
921
921
|
}
|
|
922
922
|
function Lt(e) {
|
|
923
|
-
return
|
|
923
|
+
return Sl(e) ? e.bottom_gobj : (cr("gobj NULL of bad type"), null);
|
|
924
924
|
}
|
|
925
925
|
function Pt(e, t) {
|
|
926
|
-
if (!
|
|
926
|
+
if (!Sl(e)) return cr("gobj NULL of bad type"), null;
|
|
927
927
|
e.bottom_gobj && t && fr(`${Rt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
928
928
|
}
|
|
929
929
|
function Ut(e, t, n) {
|
|
930
|
-
return
|
|
930
|
+
return Sl(e) ? t ? De(e.gclass, t, n) : e.gclass.attrs_table : (cr("gobj NULL of bad type"), null);
|
|
931
931
|
}
|
|
932
932
|
function Ft(e, t, n, r, l) {
|
|
933
933
|
return Ct(e) ? (cr("gobj NULL, destroying, or bad type"), 0) : Mt(e.dl_children, t, n, r, l);
|
|
@@ -974,12 +974,12 @@ function xt(e, t, n, r, l) {
|
|
|
974
974
|
return 0;
|
|
975
975
|
}
|
|
976
976
|
function Kt(e, t) {
|
|
977
|
-
if (
|
|
977
|
+
if (Nl(t)) return null;
|
|
978
978
|
const n = t.toLowerCase();
|
|
979
979
|
return "__default_service__" === n ? E : "__yuno__" === n || "__root__" === n ? h : Ht(h, t);
|
|
980
980
|
}
|
|
981
981
|
function Yt(e, t) {
|
|
982
|
-
if (!
|
|
982
|
+
if (!Sl(e)) return cr("gobj NULL of bad type"), !1;
|
|
983
983
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
984
984
|
t.__disabled__;
|
|
985
985
|
let o = t.__state__;
|
|
@@ -1045,7 +1045,7 @@ function Ht(e, t) {
|
|
|
1045
1045
|
return o ? (n.splice(0, 1), n = n.join("`"), Ht(o, n)) : null;
|
|
1046
1046
|
}
|
|
1047
1047
|
function zt(e, t) {
|
|
1048
|
-
return !
|
|
1048
|
+
return !Nl(t) && !!De(e.gclass, t, !1);
|
|
1049
1049
|
}
|
|
1050
1050
|
function Qt(e, t, n) {
|
|
1051
1051
|
let r = e.jn_attrs;
|
|
@@ -1061,41 +1061,41 @@ function Xt(e, t, n) {
|
|
|
1061
1061
|
const o = l[n];
|
|
1062
1062
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
1063
1063
|
let t;
|
|
1064
|
-
!e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? t =
|
|
1064
|
+
!e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? t = rl(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = rl(e.jn_attrs, o.name))), ol(r, o.name, t);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
return r;
|
|
1068
1068
|
}
|
|
1069
1069
|
function Zt(e, t) {
|
|
1070
1070
|
if (t) {
|
|
1071
|
-
if (0 ===
|
|
1072
|
-
if (0 ===
|
|
1073
|
-
if (0 ===
|
|
1074
|
-
if (0 ===
|
|
1071
|
+
if (0 === Rl(t, "__disabled__")) return yt(e);
|
|
1072
|
+
if (0 === Rl(t, "__running__")) return Et(e);
|
|
1073
|
+
if (0 === Rl(t, "__playing__")) return vt(e);
|
|
1074
|
+
if (0 === Rl(t, "__service__")) return Tt(e);
|
|
1075
1075
|
}
|
|
1076
1076
|
let n = Re(e, t, !1);
|
|
1077
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1077
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? rl(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1078
1078
|
}
|
|
1079
1079
|
function en(e, t) {
|
|
1080
|
-
t &&
|
|
1080
|
+
t && Rl(t, "__trace_level__");
|
|
1081
1081
|
let n = Re(e, t, !1);
|
|
1082
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1082
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? rl(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1083
1083
|
}
|
|
1084
1084
|
function tn(e, t) {
|
|
1085
|
-
if (t && 0 ===
|
|
1085
|
+
if (t && 0 === Rl(t, "__state__")) return cn(e);
|
|
1086
1086
|
let n = Re(e, t, !1);
|
|
1087
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1087
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? rl(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1088
1088
|
}
|
|
1089
1089
|
function nn(e, t) {
|
|
1090
1090
|
let n = Re(e, t, !1);
|
|
1091
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1091
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? rl(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1092
1092
|
}
|
|
1093
1093
|
function rn(e, n, r, l) {
|
|
1094
|
-
if (!
|
|
1094
|
+
if (!ml(n)) return cr(t("gobj_write_attr(%s): path must be a string", Rt(e))), -1;
|
|
1095
1095
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1096
1096
|
if (s.length <= 1) {
|
|
1097
1097
|
let l = n;
|
|
1098
|
-
return l in i && Object.prototype.hasOwnProperty.call(i, l) ? (i[l] = r,
|
|
1098
|
+
return l in i && Object.prototype.hasOwnProperty.call(i, l) ? (i[l] = r, bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (cr(t("gobj_write_attr(%s): attr not found '%s'", Rt(e), l)), -1);
|
|
1099
1099
|
}
|
|
1100
1100
|
let a = s.length;
|
|
1101
1101
|
for (let t = 0; t < a; t++) {
|
|
@@ -1106,7 +1106,7 @@ function rn(e, n, r, l) {
|
|
|
1106
1106
|
continue;
|
|
1107
1107
|
}
|
|
1108
1108
|
let l = e.jn_attrs;
|
|
1109
|
-
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r,
|
|
1109
|
+
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o), 0;
|
|
1110
1110
|
break;
|
|
1111
1111
|
}
|
|
1112
1112
|
return cr(t("gobj_write_attr(%s): attr not found '%s'", Rt(e), o)), -1;
|
|
@@ -1117,7 +1117,7 @@ function ln(e) {
|
|
|
1117
1117
|
let r = e.gclass.attrs_table;
|
|
1118
1118
|
for (let l = 0; l < r.length; l++) {
|
|
1119
1119
|
const o = r[l];
|
|
1120
|
-
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o),
|
|
1120
|
+
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o), bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o.name) && (e.priv[o.name] = e.jn_attrs[o.name]), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name)));
|
|
1121
1121
|
}
|
|
1122
1122
|
return 0;
|
|
1123
1123
|
}(e, v.SDF_VOLATIL, 0);
|
|
@@ -1132,15 +1132,15 @@ function on(e, t, n, r) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
function sn(e, t, n) {
|
|
1134
1134
|
let r = Re(e, t, !1);
|
|
1135
|
-
return r ? (r[t] =
|
|
1135
|
+
return r ? (r[t] = wl(n), bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1136
1136
|
}
|
|
1137
1137
|
function an(e, t, n) {
|
|
1138
1138
|
let r = Re(e, t, !1);
|
|
1139
|
-
return r ? (r[t] = parseInt(n),
|
|
1139
|
+
return r ? (r[t] = parseInt(n), bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1140
1140
|
}
|
|
1141
1141
|
function un(e, t, n) {
|
|
1142
1142
|
let r = Re(e, t, !1);
|
|
1143
|
-
return r ? (r[t] = String(n),
|
|
1143
|
+
return r ? (r[t] = String(n), bl(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1144
1144
|
}
|
|
1145
1145
|
function _n(e, n) {
|
|
1146
1146
|
if (Ct(e)) return cr("gobj NULL or DESTROYED"), null;
|
|
@@ -1154,13 +1154,13 @@ function _n(e, n) {
|
|
|
1154
1154
|
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", $t(e), jt(e), cn(e), e.last_state.state_name))), !0;
|
|
1155
1155
|
}
|
|
1156
1156
|
function cn(e) {
|
|
1157
|
-
return
|
|
1157
|
+
return Sl(e) ? e.current_state.state_name : (cr("hgobj NULL"), "");
|
|
1158
1158
|
}
|
|
1159
1159
|
function fn(e, n) {
|
|
1160
1160
|
return Ct(e) ? (cr("gobj NULL or DESTROYED"), null) : n instanceof I ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.gclass.gmt.mt_child_added && (te(e) && dr(t("👦👦🔵 child_added(%s): %s", Dt(n), Rt(e))), n.gclass.gmt.mt_child_added(n, e)), 0) : (cr(`${Rt(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
1161
1161
|
}
|
|
1162
1162
|
function gn(e, t, n) {
|
|
1163
|
-
if (!
|
|
1163
|
+
if (!Sl(e)) return cr("gobj NULL of bad type"), null;
|
|
1164
1164
|
let r = Ve(e.gclass, t);
|
|
1165
1165
|
if (r) return r;
|
|
1166
1166
|
if (n) {
|
|
@@ -1182,7 +1182,7 @@ function bn(e, t, n) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
var pn = [], mn = !1;
|
|
1184
1184
|
function hn(e, n, r, l) {
|
|
1185
|
-
return e && e instanceof I ? e.obflag & (P.obflag_destroyed | P.obflag_destroying) ? (cr(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) :
|
|
1185
|
+
return e && e instanceof I ? e.obflag & (P.obflag_destroyed | P.obflag_destroying) ? (cr(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) : Nl(n) ? (cr("gobj_post_event(): event EMPTY"), -1) : dn(e, n, 0) ? pn.length >= 1e4 ? (cr(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${n}, pending ${pn.length}`), -1) : (pn.push({
|
|
1186
1186
|
dst: e,
|
|
1187
1187
|
event: n,
|
|
1188
1188
|
kw: r,
|
|
@@ -1218,14 +1218,14 @@ function Tn(e, n, r, l) {
|
|
|
1218
1218
|
let i = oe(e, n) && !ie(l, n);
|
|
1219
1219
|
y++;
|
|
1220
1220
|
let s = Ce(o, n);
|
|
1221
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (y--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Rt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Rt(l))), r && le(e) &&
|
|
1221
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (y--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Rt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Rt(l))), r && le(e) && cl(r) && zr(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", $t(e), jt(e), o.state_name, n || "", l && !l.running ? "!!" : "", $t(l), jt(l))), cr(`📛📛 Event NOT DEFINED in state 📛📛: ${Rt(e)}, ${o.state_name}, ${n}`), y--, -1);
|
|
1222
1222
|
if (i) {
|
|
1223
1223
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Rt(e), o.state_name, l && !l.running ? "!!" : "", Rt(l)));
|
|
1224
1224
|
else {
|
|
1225
1225
|
let r = "";
|
|
1226
|
-
s.action && (r =
|
|
1226
|
+
s.action && (r = oi(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", $t(e), jt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", $t(l), jt(l)));
|
|
1227
1227
|
}
|
|
1228
|
-
r && le(e) &&
|
|
1228
|
+
r && le(e) && cl(r) && zr(r);
|
|
1229
1229
|
}
|
|
1230
1230
|
s.next_state && _n(e, s.next_state);
|
|
1231
1231
|
let a = -1;
|
|
@@ -1240,7 +1240,7 @@ function Tn(e, n, r, l) {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
throw t;
|
|
1242
1242
|
}
|
|
1243
|
-
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, n || "",
|
|
1243
|
+
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, n || "", hl(a) ? a : 0)), y--, a;
|
|
1244
1244
|
}
|
|
1245
1245
|
var vn = Object.freeze({
|
|
1246
1246
|
__rename_event_name__: 1,
|
|
@@ -1273,35 +1273,35 @@ var Sn = [
|
|
|
1273
1273
|
];
|
|
1274
1274
|
function Nn(e, t) {
|
|
1275
1275
|
let n = e ? e.__config__ : null;
|
|
1276
|
-
if (!
|
|
1276
|
+
if (!bl(n) || !Ll(n, "__hard_subscription__") && !Ll(n, "__own_event__") && !Ll(n, "__rename_event_name__")) return {
|
|
1277
1277
|
kw: e,
|
|
1278
1278
|
renamed_event: ""
|
|
1279
1279
|
};
|
|
1280
|
-
let r =
|
|
1280
|
+
let r = el({}, e), l = el({}, n);
|
|
1281
1281
|
r.__config__ = l;
|
|
1282
|
-
let o = "", i = l.__rename_event_name__, s = "string" != typeof i ||
|
|
1283
|
-
return s && (o = s.event_name, delete l.__rename_event_name__, t &&
|
|
1282
|
+
let o = "", i = l.__rename_event_name__, s = "string" != typeof i || Nl(i) ? null : On(i);
|
|
1283
|
+
return s && (o = s.event_name, delete l.__rename_event_name__, t && gl(r.__global__) > 0 && (r.__global__ = el(el({}, r.__global__), { __original_event_name__: t }))), delete l.__hard_subscription__, delete l.__own_event__, {
|
|
1284
1284
|
kw: r,
|
|
1285
1285
|
renamed_event: o
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
function wn(e, t, n, r, l, o) {
|
|
1289
|
-
let i =
|
|
1290
|
-
if (t && t !==
|
|
1291
|
-
let t =
|
|
1292
|
-
|
|
1289
|
+
let i = Bl(t, l, "__config__", null), s = Bl(t, l, "__global__", null), a = Bl(t, l, "__local__", null), u = Jl(t, l, "__filter__", null), _ = !0;
|
|
1290
|
+
if (t && t !== Yl(null, e, "publisher", null) && (_ = !1), o && o !== Yl(null, e, "subscriber", null) && (_ = !1), n && n !== Kl(null, e, "event", "") && (_ = !1), r && r !== Kl(null, e, "renamed_event", "") && (_ = !1), gl(i) > 0) {
|
|
1291
|
+
let t = Bl(null, e, "__config__", null);
|
|
1292
|
+
gl(t) > 0 && Zr(t, i) || (_ = !1);
|
|
1293
1293
|
}
|
|
1294
|
-
if (
|
|
1295
|
-
let t =
|
|
1296
|
-
|
|
1294
|
+
if (gl(s) > 0) {
|
|
1295
|
+
let t = Bl(null, e, "__global__", null);
|
|
1296
|
+
gl(t) > 0 && Zr(t, s) || (_ = !1);
|
|
1297
1297
|
}
|
|
1298
|
-
if (
|
|
1299
|
-
let t =
|
|
1300
|
-
|
|
1298
|
+
if (gl(a) > 0) {
|
|
1299
|
+
let t = Bl(null, e, "__local__", null);
|
|
1300
|
+
gl(t) > 0 && Zr(t, a) || (_ = !1);
|
|
1301
1301
|
}
|
|
1302
|
-
if (
|
|
1303
|
-
let t =
|
|
1304
|
-
|
|
1302
|
+
if (gl(u) > 0) {
|
|
1303
|
+
let t = Jl(null, e, "__filter__", null);
|
|
1304
|
+
gl(t) > 0 && Zr(t, u) || (_ = !1);
|
|
1305
1305
|
}
|
|
1306
1306
|
return _;
|
|
1307
1307
|
}
|
|
@@ -1309,7 +1309,7 @@ function jn(e, t, n, r, l, o) {
|
|
|
1309
1309
|
let i = [];
|
|
1310
1310
|
for (let s = 0; s < e.length; s++) {
|
|
1311
1311
|
let a = e[s];
|
|
1312
|
-
wn(a, t, n, r, l, o) &&
|
|
1312
|
+
wn(a, t, n, r, l, o) && sl(i, a);
|
|
1313
1313
|
}
|
|
1314
1314
|
return i;
|
|
1315
1315
|
}
|
|
@@ -1317,13 +1317,13 @@ function $n(e, t) {
|
|
|
1317
1317
|
return e.indexOf(t);
|
|
1318
1318
|
}
|
|
1319
1319
|
function Rn(e, n, r, l) {
|
|
1320
|
-
let o =
|
|
1321
|
-
if (!!(
|
|
1320
|
+
let o = Yl(e, n, "publisher", null, Vn.KW_REQUIRED), i = Yl(e, n, "subscriber", null, Vn.KW_REQUIRED), s = Kl(e, n, "event", "", Vn.KW_REQUIRED);
|
|
1321
|
+
if (!!(Wl(e, n, "subs_flag", null, Vn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1322
1322
|
let a = ne(i) || ne(o);
|
|
1323
1323
|
if ($n(o.dl_subscriptions, n) < 0) return a && Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", s || "", Rt(o), Rt(i))), 1;
|
|
1324
1324
|
a && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Rt(o), Rt(i))), pr(n)), o.obflag & P.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1325
1325
|
let u = $n(o.dl_subscriptions, n);
|
|
1326
|
-
return u >= 0 ?
|
|
1326
|
+
return u >= 0 ? ul(o.dl_subscriptions, u) : (cr(`${Rt(e)}: subscription in publisher not found`), pr(n)), u = $n(i.dl_subscribings, n), u >= 0 ? ul(i.dl_subscribings, u) : (cr(`${Rt(e)}: subscription in subscriber not found`), pr(n)), 0;
|
|
1327
1327
|
}
|
|
1328
1328
|
function Dn(e, n, r, l) {
|
|
1329
1329
|
if (null == r && (r = {}), !e) return cr(`publisher NULL: ev ${n}`), 0;
|
|
@@ -1337,48 +1337,48 @@ function Dn(e, n, r, l) {
|
|
|
1337
1337
|
]);
|
|
1338
1338
|
if (Object.keys(r).forEach((t) => {
|
|
1339
1339
|
o.has(t) || cr(`${Rt(e)}: key ignored in subscription (key: ${t}, event: ${n})`);
|
|
1340
|
-
}),
|
|
1340
|
+
}), Nl(n)) n = "";
|
|
1341
1341
|
else if (!(bn(e, n, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return cr(`event NOT in output event list: ${Rt(e)}, ${n}`), 0;
|
|
1342
1342
|
let i = Nn(r, n), s = jn(e.dl_subscriptions, e, n, i.renamed_event, i.kw, l), a = null;
|
|
1343
|
-
for (let t = 0; t < s.length; t++) if (
|
|
1343
|
+
for (let t = 0; t < s.length; t++) if (Wl(e, s[t], "subs_flag", 0, Vn.KW_REQUIRED) & vn.__hard_subscription__) {
|
|
1344
1344
|
a = s[t];
|
|
1345
1345
|
break;
|
|
1346
1346
|
}
|
|
1347
1347
|
if (a) return fr(`${Rt(e)}: Hard subscription REPEATED, the one there is kept and returned (event: ${n}, subscriber: ${Rt(l)})`), a;
|
|
1348
|
-
|
|
1348
|
+
fl(s) > 0 && (cr(`${Rt(e)}: ${fl(s)} subscription(s) REPEATED, will be deleted and override`), pr(s, "subscription REPEATED"), kn(e, s, !1));
|
|
1349
1349
|
let u = function(e, t, n, r) {
|
|
1350
1350
|
let l = Ne(e, Sn);
|
|
1351
|
-
|
|
1351
|
+
il(l, "event", t), il(l, "subscriber", r), il(l, "publisher", e);
|
|
1352
1352
|
let o = 0;
|
|
1353
1353
|
if (n) {
|
|
1354
|
-
let r =
|
|
1355
|
-
if (
|
|
1356
|
-
let n =
|
|
1357
|
-
|
|
1358
|
-
let i =
|
|
1359
|
-
if (!
|
|
1354
|
+
let r = Bl(e, n, "__config__", null), i = Bl(e, n, "__global__", null), s = Bl(e, n, "__local__", null), a = Jl(e, n, "__filter__", null), u = Kl(e, n, "__service__", "");
|
|
1355
|
+
if (gl(i) > 0 && il(l, "__global__", Qr(i)), gl(r) > 0) {
|
|
1356
|
+
let n = Qr(r);
|
|
1357
|
+
il(l, "__config__", n);
|
|
1358
|
+
let i = Kl(e, n, "__rename_event_name__", "");
|
|
1359
|
+
if (!Nl(i)) {
|
|
1360
1360
|
let r = On(i);
|
|
1361
1361
|
if (r) {
|
|
1362
|
-
|
|
1363
|
-
let i =
|
|
1364
|
-
|
|
1362
|
+
il(l, "renamed_event", r.event_name), delete n.__rename_event_name__, o |= vn.__rename_event_name__;
|
|
1363
|
+
let i = Bl(e, l, "__global__", null);
|
|
1364
|
+
bl(i) || (i = {}, il(l, "__global__", i)), i.__original_event_name__ = t;
|
|
1365
1365
|
} else cr(`${Rt(e)}: EVENT NOT FOUND (__rename_event_name__: ${i})`);
|
|
1366
1366
|
}
|
|
1367
|
-
if (
|
|
1368
|
-
let t =
|
|
1369
|
-
|
|
1367
|
+
if (Ll(n, "__hard_subscription__")) {
|
|
1368
|
+
let t = Ml(e, n, "__hard_subscription__", !1);
|
|
1369
|
+
ll(n, "__hard_subscription__"), t && (o |= vn.__hard_subscription__);
|
|
1370
1370
|
}
|
|
1371
|
-
if (
|
|
1372
|
-
let t =
|
|
1373
|
-
|
|
1371
|
+
if (Ll(n, "__own_event__")) {
|
|
1372
|
+
let t = Ml(e, n, "__own_event__", !1);
|
|
1373
|
+
ll(n, "__own_event__"), t && (o |= vn.__own_event__);
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
|
|
1376
|
+
gl(s) > 0 && il(l, "__local__", Qr(s)), gl(a) > 0 && il(l, "__filter__", Qr(a)), Nl(u) || il(l, "__service__", u);
|
|
1377
1377
|
}
|
|
1378
|
-
return
|
|
1378
|
+
return il(l, "subs_flag", o), l;
|
|
1379
1379
|
}(e, n, r, l);
|
|
1380
1380
|
if (!u) return cr(`${Rt(e)}: _create_subscription() FAILED`), 0;
|
|
1381
|
-
if (
|
|
1381
|
+
if (sl(e.dl_subscriptions, u), sl(l.dl_subscribings, u), (ne(l) || ne(e)) && (Y(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Rt(e), Rt(l))), r && (le(l) || le(e)) && zr(r)), e.gclass.gmt.mt_subscription_added) {
|
|
1382
1382
|
let t = e.gclass.gmt.mt_subscription_added(e, u);
|
|
1383
1383
|
(t < 0 || !1 === t) && (Rn(e, u, !0, !0), u = 0);
|
|
1384
1384
|
}
|
|
@@ -1396,14 +1396,14 @@ function An(e, t, n, r) {
|
|
|
1396
1396
|
]);
|
|
1397
1397
|
if (Object.keys(n).forEach((n) => {
|
|
1398
1398
|
l.has(n) || cr(`${Rt(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1399
|
-
}),
|
|
1399
|
+
}), Nl(t)) t = "";
|
|
1400
1400
|
else if (!(bn(e, t, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return cr(`event NOT in output event list: ${Rt(e)}, ev ${t}`), 0;
|
|
1401
1401
|
let o = Nn(n, t), i = jn(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), s = 0, a = 0, u = 0;
|
|
1402
1402
|
for (let t = 0; t < i.length; t++) {
|
|
1403
1403
|
let n = i[t], r = Rn(e, n, !1, !1);
|
|
1404
1404
|
0 === r ? s++ : r < 0 ? a++ : u++;
|
|
1405
1405
|
}
|
|
1406
|
-
return a ? fr(`${Rt(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${a})`) : s || u || (fr(`${Rt(e)}: No subscription found`),
|
|
1406
|
+
return a ? fr(`${Rt(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${a})`) : s || u || (fr(`${Rt(e)}: No subscription found`), zr(n, "No subscription found")), 0;
|
|
1407
1407
|
}
|
|
1408
1408
|
function kn(e, t, n) {
|
|
1409
1409
|
let r = [...t], l = 0;
|
|
@@ -1416,31 +1416,31 @@ function In(e, t, n, r) {
|
|
|
1416
1416
|
function Cn(e) {
|
|
1417
1417
|
let t = In(e, null, null, null);
|
|
1418
1418
|
for (let n = 0; n < t.length; n++) {
|
|
1419
|
-
let r = t[n], l =
|
|
1420
|
-
|
|
1419
|
+
let r = t[n], l = Yl(e, r, "publisher", null, Vn.KW_REQUIRED), o = Yl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1420
|
+
il(r, "s_event", Kl(e, r, "event", "", Vn.KW_REQUIRED)), il(r, "s_publisher", Rt(l)), il(r, "s_subscriber", Rt(o));
|
|
1421
1421
|
}
|
|
1422
1422
|
let n = Ln(e, 0, null, 0);
|
|
1423
1423
|
for (let t = 0; t < n.length; t++) {
|
|
1424
|
-
let r = n[t], l =
|
|
1425
|
-
|
|
1424
|
+
let r = n[t], l = Yl(e, r, "publisher", null, Vn.KW_REQUIRED), o = Yl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1425
|
+
il(r, "s_event", Kl(e, r, "event", "", Vn.KW_REQUIRED)), il(r, "s_publisher", Rt(l)), il(r, "s_subscriber", Rt(o));
|
|
1426
1426
|
}
|
|
1427
1427
|
return {
|
|
1428
1428
|
subscriptions: t,
|
|
1429
1429
|
subscribings: n,
|
|
1430
|
-
"total subscriptions":
|
|
1431
|
-
total_subscribings:
|
|
1430
|
+
"total subscriptions": fl(t),
|
|
1431
|
+
total_subscribings: fl(n)
|
|
1432
1432
|
};
|
|
1433
1433
|
}
|
|
1434
1434
|
function Ln(e, t, n, r) {
|
|
1435
1435
|
return jn(e.dl_subscribings, r, t, null, n, e);
|
|
1436
1436
|
}
|
|
1437
1437
|
function Pn(e, n, r) {
|
|
1438
|
-
if (
|
|
1439
|
-
if (
|
|
1438
|
+
if (bl(r) || (r = {}), !e || e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return cr("gobj NULL or DESTROYED"), -1;
|
|
1439
|
+
if (Nl(n)) return cr(`${Rt(e)}: event EMPTY`), -1;
|
|
1440
1440
|
let l = gn(e, n, !0);
|
|
1441
1441
|
if (!(l && l.event_flag & (U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return cr(`event NOT in output event list: ${Rt(e)}, ev ${n}`), -1;
|
|
1442
1442
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1443
|
-
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, "", n || "", "")), le(e) &&
|
|
1443
|
+
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, "", n || "", "")), le(e) && cl(r) && zr(r)), e.gclass.gmt.mt_publish_event) {
|
|
1444
1444
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
1445
1445
|
if (t <= 0) return t;
|
|
1446
1446
|
}
|
|
@@ -1452,20 +1452,20 @@ function Pn(e, n, r) {
|
|
|
1452
1452
|
if (t < 0) break;
|
|
1453
1453
|
if (!t) continue;
|
|
1454
1454
|
}
|
|
1455
|
-
let _ =
|
|
1455
|
+
let _ = Yl(e, u, "subscriber", null, Vn.KW_REQUIRED);
|
|
1456
1456
|
if (!_ || Ct(_)) continue;
|
|
1457
|
-
let c =
|
|
1458
|
-
if (
|
|
1459
|
-
|
|
1460
|
-
let l =
|
|
1461
|
-
|
|
1457
|
+
let c = Wl(e, u, "subs_flag", 0, Vn.KW_REQUIRED), f = Kl(e, u, "event", "", Vn.KW_REQUIRED);
|
|
1458
|
+
if (Nl(f) || 0 === Rl(f, n)) {
|
|
1459
|
+
Bl(e, u, "__config__", null, 0);
|
|
1460
|
+
let l = Bl(e, u, "__global__", null, 0), i = Bl(e, u, "__local__", null, 0), f = Jl(e, u, "__filter__", null, 0), g = u.renamed_event;
|
|
1461
|
+
Nl(g) && (g = n);
|
|
1462
1462
|
let d = 1;
|
|
1463
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) :
|
|
1463
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) : gl(f) > 0 && (d = Xl(r, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Rt(_), Rt(e))), pr(f))), d < 0) break;
|
|
1464
1464
|
if (!d) continue;
|
|
1465
1465
|
let b = gn(_, n, !0);
|
|
1466
1466
|
if (b && b.event_flag & U.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1467
1467
|
let p = r;
|
|
1468
|
-
(
|
|
1468
|
+
(gl(i) > 0 || gl(l) > 0) && (p = el({}, r)), gl(i) > 0 && Cl(p, i), gl(l) > 0 && el(p, Qr(l)), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", g || "", _.running ? "" : "!!", Rt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", _.running ? "" : "!!", Rt(_), cn(_), n || "", g || "", e && !e.running ? "!!" : "", Rt(e))), le(e) && cl(p) && zr(p));
|
|
1469
1469
|
let m = Tn(_, g, p, e);
|
|
1470
1470
|
if (m < 0 && c & vn.__own_event__) {
|
|
1471
1471
|
s = -1;
|
|
@@ -1481,8 +1481,8 @@ function Un(e, n, r, l) {
|
|
|
1481
1481
|
if (function(e) {
|
|
1482
1482
|
return z > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1483
1483
|
}(e) || oe(e, null) && !ie(l, null)) {
|
|
1484
|
-
let o =
|
|
1485
|
-
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", Rt(e), null !== o ? o : n, Rt(l))), le(e) &&
|
|
1484
|
+
let o = Kr(n);
|
|
1485
|
+
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", Rt(e), null !== o ? o : n, Rt(l))), le(e) && zr(r);
|
|
1486
1486
|
}
|
|
1487
1487
|
return e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, n, r, l) : e.gclass.command_table ? g ? g(e, n, r, l) : o(0, -1, t("%s: global command parser not available", Rt(e)), 0, 0) : o(0, -1, t("%s: command table not available", Rt(e)), 0, 0);
|
|
1488
1488
|
}
|
|
@@ -1636,27 +1636,27 @@ function _r(e, ...t) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
function cr(e, ...t) {
|
|
1639
|
-
let n = sr(e, ...t), r =
|
|
1639
|
+
let n = sr(e, ...t), r = ei();
|
|
1640
1640
|
Mn && (Mn === Gn.error ? Zn("error", n) && ar(Mn, "%c" + r + " ERROR: " + String(n), "color:red") : (Zn("error", n) && Gn.error("%c" + r + " ERROR: " + String(n), "color:red"), _r(Mn, `${r} ERROR: ${String(n)}`))), tr("error", n, r);
|
|
1641
1641
|
}
|
|
1642
1642
|
function fr(e, ...t) {
|
|
1643
|
-
let n = sr(e, ...t), r =
|
|
1643
|
+
let n = sr(e, ...t), r = ei();
|
|
1644
1644
|
Wn && (Wn === Gn.warn ? Zn("warning", n) && ar(Wn, "%c" + r + " WARNING: " + String(n), "color:yellow") : (Zn("warning", n) && Gn.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), _r(Wn, `${r} WARNING: ${String(n)}`))), tr("warning", n, r);
|
|
1645
1645
|
}
|
|
1646
1646
|
function gr(e, ...t) {
|
|
1647
|
-
let n = sr(e, ...t), r =
|
|
1647
|
+
let n = sr(e, ...t), r = ei();
|
|
1648
1648
|
xn && Zn("info", n) && ar(xn, "%c" + r + " INFO: " + String(n), "color:cyan"), tr("info", n, r);
|
|
1649
1649
|
}
|
|
1650
1650
|
function dr(e, ...t) {
|
|
1651
|
-
let n = sr(e, ...t), r =
|
|
1651
|
+
let n = sr(e, ...t), r = ei();
|
|
1652
1652
|
Kn && Zn("debug", n) && ar(Kn, "%c" + r + " DEBUG: " + String(n), "color:silver"), tr("debug", n, r);
|
|
1653
1653
|
}
|
|
1654
1654
|
function br(e, ...t) {
|
|
1655
|
-
let n = sr(e, ...t), r =
|
|
1655
|
+
let n = sr(e, ...t), r = ei();
|
|
1656
1656
|
Kn && Zn("msg", n) && ar(Kn, "%c" + r + " MSG: " + String(n), "color:cyan"), tr("msg", n, r);
|
|
1657
1657
|
}
|
|
1658
1658
|
function pr(e, t) {
|
|
1659
|
-
Zn("json", t) && (t && ar(Gn.warn, "=====> " + or(t)), ar(Gn.dir, e)), tr("json", e,
|
|
1659
|
+
Zn("json", t) && (t && ar(Gn.warn, "=====> " + or(t)), ar(Gn.dir, e)), tr("json", e, ei());
|
|
1660
1660
|
}
|
|
1661
1661
|
var mr = [
|
|
1662
1662
|
"passw",
|
|
@@ -1743,78 +1743,266 @@ function vr(e, t, n) {
|
|
|
1743
1743
|
o = t;
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
|
-
|
|
1746
|
+
var Or = 8, Sr = 24;
|
|
1747
|
+
function Nr(e) {
|
|
1747
1748
|
return e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
1748
1749
|
}
|
|
1749
|
-
function
|
|
1750
|
-
return
|
|
1750
|
+
function wr(e) {
|
|
1751
|
+
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
1751
1752
|
}
|
|
1752
|
-
function
|
|
1753
|
+
function jr(e) {
|
|
1754
|
+
return e >= 65 && e <= 90;
|
|
1755
|
+
}
|
|
1756
|
+
function $r(e) {
|
|
1757
|
+
return Nr(e) || 45 === e || 95 === e;
|
|
1758
|
+
}
|
|
1759
|
+
function Rr(e, t, n) {
|
|
1760
|
+
if (e.length - t < n.length) return !1;
|
|
1761
|
+
for (let r = 0; r < n.length; r++) {
|
|
1762
|
+
let l = e.charCodeAt(t + r);
|
|
1763
|
+
if (l >= 65 && l <= 90 && (l += 32), l !== n.charCodeAt(r)) return !1;
|
|
1764
|
+
}
|
|
1765
|
+
return !0;
|
|
1766
|
+
}
|
|
1767
|
+
function Dr(e, t) {
|
|
1753
1768
|
if (e.length - t < 3 || "e" !== e[t] || "y" !== e[t + 1] || "J" !== e[t + 2]) return 0;
|
|
1754
|
-
if (t > 0 && (
|
|
1755
|
-
let n = t, r =
|
|
1756
|
-
for (; n < e.length && (
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
function
|
|
1762
|
-
if (
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
if (
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1769
|
+
if (t > 0 && ($r(e.charCodeAt(t - 1)) || "." === e[t - 1])) return 0;
|
|
1770
|
+
let n = t, r = !1;
|
|
1771
|
+
for (; n < e.length && ($r(e.charCodeAt(n)) || "." === e[n]);) "." === e[n] && (r = !0), n++;
|
|
1772
|
+
if (!r) return 0;
|
|
1773
|
+
for (; "." === e[n - 1];) n--;
|
|
1774
|
+
return n - t;
|
|
1775
|
+
}
|
|
1776
|
+
function Ar(e, t) {
|
|
1777
|
+
if (t > 0 && Nr(e.charCodeAt(t - 1))) return 0;
|
|
1778
|
+
for (const n of ["bearer", "basic"]) {
|
|
1779
|
+
const r = n.length;
|
|
1780
|
+
if (e.length - t > r && Rr(e, t, n) && (" " === e[t + r] || " " === e[t + r])) return r;
|
|
1781
|
+
}
|
|
1782
|
+
return 0;
|
|
1783
|
+
}
|
|
1784
|
+
function kr(e) {
|
|
1785
|
+
return e >= 65 && e <= 90 ? e - 65 : e >= 97 && e <= 122 ? e - 97 + 26 : e >= 48 && e <= 57 ? e - 48 + 52 : 43 === e ? 62 : 47 === e ? 63 : -1;
|
|
1786
|
+
}
|
|
1787
|
+
var Ir = " \r\n\"',;}]\0";
|
|
1788
|
+
function Cr(e, t) {
|
|
1789
|
+
const n = Ar(e, t);
|
|
1790
|
+
if (!n) return [0, 0];
|
|
1791
|
+
const r = 5 === n ? "basic" : "bearer";
|
|
1792
|
+
let l = !1, o = t + n;
|
|
1793
|
+
for (; o < e.length && (" " === e[o] || " " === e[o]);) o++;
|
|
1794
|
+
if (o < e.length && Ar(e, o) === n && Rr(e, o, r)) for (o += n, l = !0; o < e.length && (" " === e[o] || " " === e[o]);) o++;
|
|
1795
|
+
if (o >= e.length) return [0, 0];
|
|
1796
|
+
if ("\"" === e[o] || "'" === e[o]) {
|
|
1797
|
+
let n = o + 1;
|
|
1798
|
+
for (; n < e.length && e[n] !== e[o] && " " !== e[n] && " " !== e[n] && "\r" !== e[n] && "\n" !== e[n] && "\0" !== e[n];) n++;
|
|
1799
|
+
return n < e.length && e[n] === e[o] && n > o + 1 ? [o - t, n + 1 - o] : [0, 0];
|
|
1800
|
+
}
|
|
1801
|
+
let i = o;
|
|
1802
|
+
for (; i < e.length && Ir.indexOf(e[i]) < 0;) i++;
|
|
1803
|
+
if (i === o) return [0, 0];
|
|
1804
|
+
if (!l) {
|
|
1805
|
+
let t = i;
|
|
1806
|
+
for (; t > o && "." === e[t - 1];) t--;
|
|
1807
|
+
const r = t - o;
|
|
1808
|
+
if (0 === r || function(e, t, n) {
|
|
1809
|
+
if (0 === n || n >= Sr) return !1;
|
|
1810
|
+
let r = t;
|
|
1811
|
+
const l = t + n;
|
|
1812
|
+
for (;;) {
|
|
1813
|
+
let t = r, n = !0, o = !0;
|
|
1814
|
+
for (; t < l && wr(e.charCodeAt(t));) t > r && (jr(e.charCodeAt(t)) ? o = !1 : n = !1), t++;
|
|
1815
|
+
if (t === r) return !1;
|
|
1816
|
+
if (!(o || n && jr(e.charCodeAt(r)))) return !1;
|
|
1817
|
+
if (t === l) return !0;
|
|
1818
|
+
if ("-" !== e[t] && "." !== e[t] && "/" !== e[t] || t + 1 === l) return !1;
|
|
1819
|
+
r = t + 1;
|
|
1820
|
+
}
|
|
1821
|
+
}(e, o, r)) return [0, 0];
|
|
1822
|
+
if (5 === n) {
|
|
1823
|
+
if (!function(e, t, n) {
|
|
1824
|
+
let r = 0, l = 0;
|
|
1825
|
+
for (let o = 0; o < n; o++) {
|
|
1826
|
+
const n = kr(e.charCodeAt(t + o));
|
|
1827
|
+
if (n < 0) return !1;
|
|
1828
|
+
if (r = 16383 & (r << 6 | n), l += 6, l >= 8 && (l -= 8, 58 == (r >> l & 255))) return !0;
|
|
1829
|
+
}
|
|
1830
|
+
return !1;
|
|
1831
|
+
}(e, o, r)) return [0, 0];
|
|
1832
|
+
} else if (function(e, t, n) {
|
|
1833
|
+
let r = 0;
|
|
1834
|
+
for (let l = t; l < t + n; l++) {
|
|
1835
|
+
const t = e.charCodeAt(l);
|
|
1836
|
+
(t < 56320 || t > 57343) && r++;
|
|
1837
|
+
}
|
|
1838
|
+
return r;
|
|
1839
|
+
}(e, o, r) < Or) return [0, 0];
|
|
1840
|
+
}
|
|
1841
|
+
return [o - t, i - o];
|
|
1842
|
+
}
|
|
1843
|
+
function Lr(e, t) {
|
|
1844
|
+
const n = e[t];
|
|
1845
|
+
return "e" === n ? [0, Dr(e, t)] : "b" === n || "B" === n ? Cr(e, t) : [0, 0];
|
|
1846
|
+
}
|
|
1847
|
+
function Pr(e, t) {
|
|
1848
|
+
const n = e[t];
|
|
1849
|
+
if ("e" === n) {
|
|
1850
|
+
if (e.length - t < 3 || "y" !== e[t + 1] || "J" !== e[t + 2]) return [0, 0];
|
|
1851
|
+
if (t > 0 && ($r(e.charCodeAt(t - 1)) || "." === e[t - 1])) return [0, 0];
|
|
1852
|
+
let n = t, r = 0;
|
|
1853
|
+
for (; n < e.length && ($r(e.charCodeAt(n)) || "." === e[n]);) "." === e[n] && r++, n++;
|
|
1854
|
+
for (; "." === e[n - 1];) n--, r--;
|
|
1855
|
+
return 2 === r ? [0, n - t] : [0, 0];
|
|
1856
|
+
}
|
|
1857
|
+
if ("b" === n || "B" === n) {
|
|
1858
|
+
if (e.length - t <= 6 || !Rr(e, t, "bearer")) return [0, 0];
|
|
1859
|
+
if (t > 0 && Nr(e.charCodeAt(t - 1))) return [0, 0];
|
|
1860
|
+
let n = t + 6;
|
|
1861
|
+
if (" " !== e[n] && " " !== e[n]) return [0, 0];
|
|
1862
|
+
for (; n < e.length && (" " === e[n] || " " === e[n]);) n++;
|
|
1863
|
+
let r = n;
|
|
1864
|
+
for (; r < e.length && " \r\n'\",;}]\0".indexOf(e[r]) < 0;) r++;
|
|
1865
|
+
return [n - t, r - n];
|
|
1866
|
+
}
|
|
1867
|
+
return [0, 0];
|
|
1868
|
+
}
|
|
1869
|
+
var Ur = " \r\n,;&)]}<>\"'\0";
|
|
1870
|
+
function Fr(e, t) {
|
|
1871
|
+
if (t >= e.length) return t;
|
|
1872
|
+
const n = e[t];
|
|
1873
|
+
if ("\"" === n || "'" === n) {
|
|
1874
|
+
let r = t + 1;
|
|
1875
|
+
for (; r < e.length && e[r] !== n;) "\\" === e[r] && r + 1 < e.length && r++, r++;
|
|
1876
|
+
return r < e.length ? r + 1 : e.length;
|
|
1877
|
+
}
|
|
1878
|
+
if ("{" === n || "[" === n) {
|
|
1879
|
+
let n = 0, r = !1;
|
|
1880
|
+
for (let l = t; l < e.length; l++) if (r) "\\" === e[l] && l + 1 < e.length ? l++ : "\"" === e[l] && (r = !1);
|
|
1881
|
+
else if ("\"" === e[l]) r = !0;
|
|
1882
|
+
else if ("{" === e[l] || "[" === e[l]) n++;
|
|
1883
|
+
else if (("}" === e[l] || "]" === e[l]) && (n--, 0 === n)) return l + 1;
|
|
1884
|
+
return e.length;
|
|
1885
|
+
}
|
|
1886
|
+
if ("\\" === n) {
|
|
1887
|
+
let n = t;
|
|
1888
|
+
for (; n < e.length && "\\" === e[n];) n++;
|
|
1889
|
+
if (n < e.length && ("\"" === e[n] || "'" === e[n])) {
|
|
1890
|
+
const r = n - t;
|
|
1891
|
+
let l = 0;
|
|
1892
|
+
for (let t = n + 1; t < e.length; t++) if ("\\" !== e[t]) {
|
|
1893
|
+
if (e[t] === e[n] && l === r) return t + 1;
|
|
1894
|
+
l = 0;
|
|
1895
|
+
} else l++;
|
|
1896
|
+
return e.length;
|
|
1785
1897
|
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1898
|
+
}
|
|
1899
|
+
let r = t;
|
|
1900
|
+
const l = Ar(e, t);
|
|
1901
|
+
if (l) {
|
|
1902
|
+
for (r = t + l; r < e.length && (" " === e[r] || " " === e[r]);) r++;
|
|
1903
|
+
if (r < e.length && ("\"" === e[r] || "'" === e[r])) return Fr(e, r);
|
|
1904
|
+
}
|
|
1905
|
+
for (; r < e.length && Ur.indexOf(e[r]) < 0;) r++;
|
|
1906
|
+
return r;
|
|
1907
|
+
}
|
|
1908
|
+
var Vr = 128, Gr = 4194304, Mr = "<not shown: too large to mask>";
|
|
1909
|
+
function Wr(e, t, n) {
|
|
1910
|
+
for (let r = t; r < n; r++) e[r] = 1;
|
|
1911
|
+
}
|
|
1912
|
+
function xr(e, t, n, r) {
|
|
1913
|
+
const l = (t) => t >= e.length || " " === e[t] || " " === e[t] || "\0" === e[t];
|
|
1914
|
+
let o = "", i = 0, s = 0;
|
|
1915
|
+
for (; s < e.length;) {
|
|
1916
|
+
const a = e[s];
|
|
1917
|
+
if (" " === a || " " === a || "\0" === a) {
|
|
1918
|
+
s++, i = s;
|
|
1790
1919
|
continue;
|
|
1791
1920
|
}
|
|
1792
|
-
if ("=" !==
|
|
1793
|
-
|
|
1921
|
+
if ("\"" !== a && "'" !== a || (o || 0 !== s && " " !== e[s - 1] && " " !== e[s - 1] && "=" !== e[s - 1] ? a === o && l(s + 1) && (o = "") : o = a), n) {
|
|
1922
|
+
const [t, n] = Pr(e, s);
|
|
1923
|
+
if (n) {
|
|
1924
|
+
s += t + n, i = s;
|
|
1925
|
+
continue;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
if ("=" !== a) {
|
|
1929
|
+
s++;
|
|
1794
1930
|
continue;
|
|
1795
1931
|
}
|
|
1796
|
-
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
1932
|
+
const u = Math.max(i, s - Vr), _ = e.substring(u, s);
|
|
1933
|
+
if (i = s + 1, !(Tr(_) || t && 5 === _.length && Rr(e, u, "value"))) {
|
|
1934
|
+
s++;
|
|
1799
1935
|
continue;
|
|
1800
1936
|
}
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
e[
|
|
1806
|
-
|
|
1807
|
-
|
|
1937
|
+
let c;
|
|
1938
|
+
s++;
|
|
1939
|
+
const f = s < e.length && ("\"" === e[s] || "'" === e[s]) ? e[s] : "";
|
|
1940
|
+
if (f) {
|
|
1941
|
+
for (c = s + 1; c < e.length && e[c] !== f && "\0" !== e[c];) c++;
|
|
1942
|
+
c < e.length && e[c] === f && c++;
|
|
1943
|
+
} else c = vr(e, s, o);
|
|
1944
|
+
Wr(r, s, c), s = c, i = s;
|
|
1808
1945
|
}
|
|
1809
|
-
return i ? (l.push(e.substring(o)), l.join("")) : null;
|
|
1810
1946
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1947
|
+
function Kr(e) {
|
|
1948
|
+
if ("string" != typeof e) return null;
|
|
1949
|
+
if (e.indexOf("=") < 0 && e.indexOf(":") < 0 && e.indexOf("eyJ") < 0 && !/bearer|basic/i.test(e)) return null;
|
|
1950
|
+
if (e.length > Gr) return Mr;
|
|
1951
|
+
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"'\u0000]*)/g;
|
|
1952
|
+
for (; null !== (t = r.exec(e));) Tr(t[2].slice(-128)) && (n = !0);
|
|
1953
|
+
const l = new Uint8Array(e.length);
|
|
1954
|
+
xr(e, n, !0, l), xr(e, n, !1, l), function(e, t) {
|
|
1955
|
+
for (let n = 0; n < e.length; n++) {
|
|
1956
|
+
const r = e[n];
|
|
1957
|
+
if ("e" !== r && "b" !== r && "B" !== r) continue;
|
|
1958
|
+
const [l, o] = Lr(e, n);
|
|
1959
|
+
o && Wr(t, n + l, n + l + o);
|
|
1960
|
+
}
|
|
1961
|
+
}(e, l), function(e, t) {
|
|
1962
|
+
let n = 0, r = 0;
|
|
1963
|
+
for (; r < e.length;) {
|
|
1964
|
+
const l = e[r];
|
|
1965
|
+
if (" " === l || " " === l || "\0" === l || "=" === l) {
|
|
1966
|
+
r++, n = r;
|
|
1967
|
+
continue;
|
|
1968
|
+
}
|
|
1969
|
+
if (":" !== l) {
|
|
1970
|
+
r++;
|
|
1971
|
+
continue;
|
|
1972
|
+
}
|
|
1973
|
+
if (!Tr(e.substring(Math.max(n, r - Vr), r))) {
|
|
1974
|
+
r++, n = r;
|
|
1975
|
+
continue;
|
|
1976
|
+
}
|
|
1977
|
+
let o = r + 1;
|
|
1978
|
+
for (; o < e.length && (" " === e[o] || " " === e[o]);) o++;
|
|
1979
|
+
const i = Fr(e, o);
|
|
1980
|
+
Wr(t, o, i);
|
|
1981
|
+
const s = Ar(e, o);
|
|
1982
|
+
r = s ? o + s : i > o ? i : r + 1, n = r;
|
|
1983
|
+
}
|
|
1984
|
+
}(e, l);
|
|
1985
|
+
let o = [], i = !1, s = 0;
|
|
1986
|
+
for (; s < e.length;) {
|
|
1987
|
+
let t = s;
|
|
1988
|
+
if (l[s]) {
|
|
1989
|
+
for (; t < e.length && l[t];) t++;
|
|
1990
|
+
o.push("********"), i = !0;
|
|
1991
|
+
} else {
|
|
1992
|
+
for (; t < e.length && !l[t];) t++;
|
|
1993
|
+
o.push(e.substring(s, t));
|
|
1994
|
+
}
|
|
1995
|
+
s = t;
|
|
1996
|
+
}
|
|
1997
|
+
return i ? o.join("") : null;
|
|
1998
|
+
}
|
|
1999
|
+
var Yr = 64, Br = "<not shown: the masking failed>";
|
|
2000
|
+
var Jr = Symbol("mask-in-progress");
|
|
2001
|
+
function qr(e, t, n, r) {
|
|
1814
2002
|
if ("string" == typeof e) {
|
|
1815
|
-
if (e.length > r.left) return r.left = 0,
|
|
2003
|
+
if (e.length > r.left) return r.left = 0, Mr;
|
|
1816
2004
|
r.left -= e.length;
|
|
1817
|
-
let t =
|
|
2005
|
+
let t = Kr(e.indexOf("\0") >= 0 ? e.replace(/\u0000/g, " ") : e);
|
|
1818
2006
|
return null !== t ? t : e;
|
|
1819
2007
|
}
|
|
1820
2008
|
let l = Array.isArray(e);
|
|
@@ -1823,13 +2011,13 @@ function Lr(e, t, n, r) {
|
|
|
1823
2011
|
let t = Object.getPrototypeOf(e);
|
|
1824
2012
|
return t === Object.prototype || null === t;
|
|
1825
2013
|
}(e)) return e;
|
|
1826
|
-
if (r.left <= 0) return
|
|
2014
|
+
if (r.left <= 0) return Mr;
|
|
1827
2015
|
if (t.has(e)) {
|
|
1828
2016
|
let n = t.get(e);
|
|
1829
|
-
return n ===
|
|
2017
|
+
return n === Jr ? "<cycle>" : n;
|
|
1830
2018
|
}
|
|
1831
|
-
if (n >=
|
|
1832
|
-
r.left -= 1, t.set(e,
|
|
2019
|
+
if (n >= Yr) return "<deeper not shown>";
|
|
2020
|
+
r.left -= 1, t.set(e, Jr);
|
|
1833
2021
|
let o, i = !1, s = !1;
|
|
1834
2022
|
if (l) {
|
|
1835
2023
|
o = [];
|
|
@@ -1839,10 +2027,10 @@ function Lr(e, t, n, r) {
|
|
|
1839
2027
|
break;
|
|
1840
2028
|
}
|
|
1841
2029
|
r.left -= 1;
|
|
1842
|
-
let a =
|
|
2030
|
+
let a = qr(e[l], t, n + 1, r);
|
|
1843
2031
|
a !== e[l] && (i = !0), o.push(a);
|
|
1844
2032
|
}
|
|
1845
|
-
s && o.push(
|
|
2033
|
+
s && o.push(Mr);
|
|
1846
2034
|
} else {
|
|
1847
2035
|
o = Object.create(Object.getPrototypeOf(e));
|
|
1848
2036
|
let l = "string" == typeof e.attribute && Tr(e.attribute.slice(-128));
|
|
@@ -1854,38 +2042,38 @@ function Lr(e, t, n, r) {
|
|
|
1854
2042
|
}
|
|
1855
2043
|
r.left -= 1 + a.length;
|
|
1856
2044
|
let u, _ = e[a];
|
|
1857
|
-
u = (Tr(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" :
|
|
2045
|
+
u = (Tr(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" : qr(_, t, n + 1, r), u !== _ && (i = !0), Ul(o, a, u);
|
|
1858
2046
|
}
|
|
1859
|
-
s && (o["<more>"] =
|
|
2047
|
+
s && (o["<more>"] = Mr);
|
|
1860
2048
|
}
|
|
1861
2049
|
return i || s || (o = e), t.set(e, o), o;
|
|
1862
2050
|
}
|
|
1863
|
-
function
|
|
2051
|
+
function Hr(e) {
|
|
1864
2052
|
try {
|
|
1865
|
-
return
|
|
2053
|
+
return qr(e, /* @__PURE__ */ new WeakMap(), 0, { left: Gr });
|
|
1866
2054
|
} catch (e) {
|
|
1867
|
-
return
|
|
2055
|
+
return Br;
|
|
1868
2056
|
}
|
|
1869
2057
|
}
|
|
1870
|
-
function
|
|
1871
|
-
pr(
|
|
2058
|
+
function zr(e, t) {
|
|
2059
|
+
pr(Hr(e), t);
|
|
1872
2060
|
}
|
|
1873
|
-
function
|
|
2061
|
+
function Qr(e) {
|
|
1874
2062
|
return structuredClone(e);
|
|
1875
2063
|
}
|
|
1876
|
-
function
|
|
2064
|
+
function Xr(...e) {
|
|
1877
2065
|
const t = {};
|
|
1878
|
-
for (const n of e)
|
|
2066
|
+
for (const n of e) el(t, structuredClone(n));
|
|
1879
2067
|
return t;
|
|
1880
2068
|
}
|
|
1881
|
-
function
|
|
2069
|
+
function Zr(e, t) {
|
|
1882
2070
|
if (e === t) return !0;
|
|
1883
2071
|
if (null === e || null === t) return e === t;
|
|
1884
2072
|
if (typeof e != typeof t) return !1;
|
|
1885
2073
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1886
2074
|
if (Array.isArray(e)) {
|
|
1887
2075
|
if (e.length !== t.length) return !1;
|
|
1888
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
2076
|
+
for (let n = 0; n < e.length; n++) if (!Zr(e[n], t[n])) return !1;
|
|
1889
2077
|
return !0;
|
|
1890
2078
|
}
|
|
1891
2079
|
if ("object" == typeof e) {
|
|
@@ -1893,153 +2081,153 @@ function Gr(e, t) {
|
|
|
1893
2081
|
if (n.length !== r.length) return !1;
|
|
1894
2082
|
for (let l = 0; l < n.length; l++) {
|
|
1895
2083
|
if (n[l] !== r[l]) return !1;
|
|
1896
|
-
if (!
|
|
2084
|
+
if (!Zr(e[n[l]], t[r[l]])) return !1;
|
|
1897
2085
|
}
|
|
1898
2086
|
return !0;
|
|
1899
2087
|
}
|
|
1900
2088
|
return e === t;
|
|
1901
2089
|
}
|
|
1902
|
-
function
|
|
2090
|
+
function el(e, t) {
|
|
1903
2091
|
if (!t) return e;
|
|
1904
|
-
for (let n of Object.keys(t))
|
|
2092
|
+
for (let n of Object.keys(t)) Ul(e, n, t[n]);
|
|
1905
2093
|
return e;
|
|
1906
2094
|
}
|
|
1907
|
-
function
|
|
2095
|
+
function tl(e, t) {
|
|
1908
2096
|
if (!t) return e;
|
|
1909
|
-
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && Object.prototype.hasOwnProperty.call(e, n) &&
|
|
2097
|
+
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && Object.prototype.hasOwnProperty.call(e, n) && Ul(e, n, t[n]);
|
|
1910
2098
|
return e;
|
|
1911
2099
|
}
|
|
1912
|
-
function
|
|
2100
|
+
function nl(e, t) {
|
|
1913
2101
|
if (!t) return e;
|
|
1914
|
-
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) &&
|
|
2102
|
+
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) && Ul(e, n, t[n]);
|
|
1915
2103
|
return e;
|
|
1916
2104
|
}
|
|
1917
|
-
function
|
|
2105
|
+
function rl(e, t) {
|
|
1918
2106
|
if (e && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
1919
2107
|
}
|
|
1920
|
-
function
|
|
2108
|
+
function ll(e, t) {
|
|
1921
2109
|
e && Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
|
|
1922
2110
|
}
|
|
1923
|
-
function
|
|
1924
|
-
|
|
2111
|
+
function ol(e, t, n) {
|
|
2112
|
+
Ul(e, t, n);
|
|
1925
2113
|
}
|
|
1926
|
-
function
|
|
1927
|
-
|
|
2114
|
+
function il(e, t, n) {
|
|
2115
|
+
Ul(e, t, n);
|
|
1928
2116
|
}
|
|
1929
|
-
function
|
|
2117
|
+
function sl(e, t) {
|
|
1930
2118
|
e.push(t);
|
|
1931
2119
|
}
|
|
1932
|
-
function
|
|
2120
|
+
function al(e, t) {
|
|
1933
2121
|
e.push(t);
|
|
1934
2122
|
}
|
|
1935
|
-
function
|
|
2123
|
+
function ul(e, t) {
|
|
1936
2124
|
e.splice(t, 1);
|
|
1937
2125
|
}
|
|
1938
|
-
function
|
|
2126
|
+
function _l(e, t) {
|
|
1939
2127
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1940
2128
|
}
|
|
1941
|
-
function
|
|
1942
|
-
return
|
|
2129
|
+
function cl(e) {
|
|
2130
|
+
return bl(e) ? Object.keys(e).length : 0;
|
|
1943
2131
|
}
|
|
1944
|
-
function
|
|
1945
|
-
return
|
|
2132
|
+
function fl(e) {
|
|
2133
|
+
return pl(e) ? e.length : 0;
|
|
1946
2134
|
}
|
|
1947
|
-
function
|
|
1948
|
-
return
|
|
2135
|
+
function gl(e) {
|
|
2136
|
+
return bl(e) ? Object.keys(e).length : pl(e) ? e.length : ml(e) && e.length > 0 ? 1 : 0;
|
|
1949
2137
|
}
|
|
1950
|
-
function
|
|
1951
|
-
return 0 ===
|
|
2138
|
+
function dl(e) {
|
|
2139
|
+
return 0 === gl(e);
|
|
1952
2140
|
}
|
|
1953
|
-
function
|
|
2141
|
+
function bl(e) {
|
|
1954
2142
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1955
2143
|
}
|
|
1956
|
-
function
|
|
2144
|
+
function pl(e) {
|
|
1957
2145
|
return Array.isArray(e);
|
|
1958
2146
|
}
|
|
1959
|
-
function
|
|
2147
|
+
function ml(e) {
|
|
1960
2148
|
return "string" == typeof e;
|
|
1961
2149
|
}
|
|
1962
|
-
function
|
|
2150
|
+
function hl(e) {
|
|
1963
2151
|
return "number" == typeof e && Number.isFinite(e);
|
|
1964
2152
|
}
|
|
1965
|
-
function
|
|
2153
|
+
function El(e) {
|
|
1966
2154
|
return "boolean" == typeof e;
|
|
1967
2155
|
}
|
|
1968
|
-
function
|
|
2156
|
+
function yl(e) {
|
|
1969
2157
|
return null == e;
|
|
1970
2158
|
}
|
|
1971
|
-
function
|
|
1972
|
-
if (
|
|
1973
|
-
if (!
|
|
2159
|
+
function Tl(e) {
|
|
2160
|
+
if (hl(e)) return !0;
|
|
2161
|
+
if (!ml(e)) return !1;
|
|
1974
2162
|
const t = Number(e);
|
|
1975
2163
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1976
2164
|
}
|
|
1977
|
-
function
|
|
2165
|
+
function vl(e) {
|
|
1978
2166
|
return e instanceof Date && !isNaN(e);
|
|
1979
2167
|
}
|
|
1980
|
-
function
|
|
2168
|
+
function Ol(e) {
|
|
1981
2169
|
return "function" == typeof e;
|
|
1982
2170
|
}
|
|
1983
|
-
function
|
|
2171
|
+
function Sl(e) {
|
|
1984
2172
|
return e instanceof I;
|
|
1985
2173
|
}
|
|
1986
|
-
function
|
|
1987
|
-
return !
|
|
2174
|
+
function Nl(e) {
|
|
2175
|
+
return !ml(e) || 0 === e.length;
|
|
1988
2176
|
}
|
|
1989
|
-
function
|
|
1990
|
-
return
|
|
2177
|
+
function wl(e) {
|
|
2178
|
+
return hl(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1991
2179
|
}
|
|
1992
|
-
function
|
|
2180
|
+
function jl(e, t, n) {
|
|
1993
2181
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1994
2182
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1995
2183
|
}
|
|
1996
|
-
function
|
|
2184
|
+
function $l(e, t) {
|
|
1997
2185
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1998
2186
|
}
|
|
1999
|
-
function
|
|
2187
|
+
function Rl(e, t) {
|
|
2000
2188
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
2001
2189
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
2002
2190
|
}
|
|
2003
|
-
function
|
|
2004
|
-
if (
|
|
2005
|
-
if (
|
|
2191
|
+
function Dl(e, t) {
|
|
2192
|
+
if (bl(e) || bl(t) || pl(e) || pl(t)) return 0;
|
|
2193
|
+
if (hl(e) || hl(t)) {
|
|
2006
2194
|
let n = Number(e), r = Number(t);
|
|
2007
2195
|
return Number.isNaN(n) && (n = 0), Number.isNaN(r) && (r = 0), n > r ? 1 : n < r ? -1 : 0;
|
|
2008
2196
|
}
|
|
2009
|
-
if (
|
|
2197
|
+
if (El(e) || El(t)) {
|
|
2010
2198
|
let n = Number(e), r = Number(t);
|
|
2011
2199
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
2012
2200
|
}
|
|
2013
|
-
return
|
|
2201
|
+
return $l(String(e), String(t));
|
|
2014
2202
|
}
|
|
2015
|
-
function
|
|
2203
|
+
function Al(e, t, n) {
|
|
2016
2204
|
var r;
|
|
2017
2205
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
2018
2206
|
}
|
|
2019
|
-
function
|
|
2020
|
-
if (!
|
|
2207
|
+
function kl(e) {
|
|
2208
|
+
if (!ml(e)) return !1;
|
|
2021
2209
|
let t = 0;
|
|
2022
2210
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
2023
2211
|
return 2 === t;
|
|
2024
2212
|
}
|
|
2025
|
-
function
|
|
2026
|
-
if (!
|
|
2213
|
+
function Il(e) {
|
|
2214
|
+
if (!ml(e)) return !1;
|
|
2027
2215
|
let t = 0;
|
|
2028
2216
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
2029
2217
|
return 1 === t;
|
|
2030
2218
|
}
|
|
2031
|
-
function
|
|
2032
|
-
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t)
|
|
2219
|
+
function Cl(e, t) {
|
|
2220
|
+
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t) Cl(e, n);
|
|
2033
2221
|
else "string" == typeof t && delete e[t];
|
|
2034
2222
|
else for (const n of Object.keys(t)) delete e[n];
|
|
2035
2223
|
}
|
|
2036
|
-
function
|
|
2224
|
+
function Ll(e, t) {
|
|
2037
2225
|
return !(!(t in e) || !Object.prototype.hasOwnProperty.call(e, t));
|
|
2038
2226
|
}
|
|
2039
|
-
function
|
|
2227
|
+
function Pl(e, t) {
|
|
2040
2228
|
return !Object.prototype.hasOwnProperty.call(e, t);
|
|
2041
2229
|
}
|
|
2042
|
-
function
|
|
2230
|
+
function Ul(e, t, n) {
|
|
2043
2231
|
"__proto__" === t ? Object.defineProperty(e, t, {
|
|
2044
2232
|
value: n,
|
|
2045
2233
|
writable: !0,
|
|
@@ -2047,235 +2235,235 @@ function Sl(e, t, n) {
|
|
|
2047
2235
|
configurable: !0
|
|
2048
2236
|
}) : e[t] = n;
|
|
2049
2237
|
}
|
|
2050
|
-
function
|
|
2238
|
+
function Fl(e, t) {
|
|
2051
2239
|
if (!/^[0-9]+$/.test(t)) return -1;
|
|
2052
2240
|
const n = Number(t);
|
|
2053
2241
|
return n >= e.length ? -1 : n;
|
|
2054
2242
|
}
|
|
2055
|
-
function
|
|
2056
|
-
e && !
|
|
2243
|
+
function Vl(e, t, n, r) {
|
|
2244
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2057
2245
|
const l = e ? `${Rt(e)}: ` : "";
|
|
2058
|
-
if (!
|
|
2059
|
-
if (!
|
|
2246
|
+
if (!bl(t) && !pl(t)) return void cr(`${l}kw must be list or dict: '${String(n)}'`);
|
|
2247
|
+
if (!ml(n)) return void cr(`${l}path must be a string: ${String(n)}`);
|
|
2060
2248
|
let o = n.split("`"), i = o.length;
|
|
2061
2249
|
for (let e = 0; e < i; e++) {
|
|
2062
|
-
if (
|
|
2063
|
-
const i =
|
|
2250
|
+
if (pl(t)) {
|
|
2251
|
+
const i = Fl(t, o[e]);
|
|
2064
2252
|
if (i < 0) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2065
2253
|
o[e] = String(i);
|
|
2066
2254
|
}
|
|
2067
|
-
if (
|
|
2255
|
+
if (Pl(t, o[e])) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2068
2256
|
if (e === i - 1) break;
|
|
2069
2257
|
if (null == (t = t[o[e]])) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2070
|
-
if (!
|
|
2258
|
+
if (!bl(t) && !pl(t)) return void cr(`${l}kw must be list or dict: '${n}'`);
|
|
2071
2259
|
}
|
|
2072
2260
|
let s = t[o[i - 1]];
|
|
2073
2261
|
return void 0 === s && r && cr(`${l}path not found: '${n}'`), s;
|
|
2074
2262
|
}
|
|
2075
|
-
function
|
|
2076
|
-
e && !
|
|
2263
|
+
function Gl(e, t, n) {
|
|
2264
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2077
2265
|
const r = e ? Rt(e) + ": " : "";
|
|
2078
|
-
if (!
|
|
2266
|
+
if (!ml(n)) return cr(`${r}kw_delete(): path must be a string: ${String(n)}`), -1;
|
|
2079
2267
|
let [l, o] = function(e, t) {
|
|
2080
2268
|
let n = e.lastIndexOf(t);
|
|
2081
2269
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
2082
2270
|
}(n, "`"), i = t;
|
|
2083
|
-
if (
|
|
2084
|
-
else if (i =
|
|
2085
|
-
return
|
|
2271
|
+
if (Nl(o)) o = n;
|
|
2272
|
+
else if (i = Vl(e, t, l, !0), void 0 === i) return -1;
|
|
2273
|
+
return pl(i) ? (cr(`${r}kw_delete(): cannot delete an item of a list: '${n}'`), -1) : bl(i) && Object.prototype.hasOwnProperty.call(i, o) ? (delete i[o], 0) : (cr(`${r}kw_delete(): path not found: '${n}'`), -1);
|
|
2086
2274
|
}
|
|
2087
|
-
function
|
|
2088
|
-
e && !
|
|
2089
|
-
let o =
|
|
2275
|
+
function Ml(e, t, n, r, l) {
|
|
2276
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2277
|
+
let o = Vl(e, t, n, !1);
|
|
2090
2278
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
2091
2279
|
if (void 0 === o) {
|
|
2092
2280
|
if (s && t) {
|
|
2093
2281
|
let l = Boolean(r);
|
|
2094
|
-
return
|
|
2282
|
+
return Hl(e, t, n, l), l;
|
|
2095
2283
|
}
|
|
2096
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2284
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), Boolean(r);
|
|
2097
2285
|
}
|
|
2098
2286
|
let _;
|
|
2099
|
-
if (
|
|
2100
|
-
else if (u &&
|
|
2101
|
-
else if (u &&
|
|
2287
|
+
if (El(o)) _ = o;
|
|
2288
|
+
else if (u && hl(o)) _ = 0 !== o;
|
|
2289
|
+
else if (u && ml(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o, 10) || 0);
|
|
2102
2290
|
else {
|
|
2103
|
-
if (!u || null !== o) return u ? (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`),
|
|
2291
|
+
if (!u || null !== o) return u ? (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), zr(t), !1) : (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json boolean: '${n}'`), zr(t), Boolean(r));
|
|
2104
2292
|
_ = !1;
|
|
2105
2293
|
}
|
|
2106
|
-
return a &&
|
|
2294
|
+
return a && Gl(e, t, n), _;
|
|
2107
2295
|
}
|
|
2108
|
-
function
|
|
2109
|
-
e && !
|
|
2110
|
-
let o =
|
|
2296
|
+
function Wl(e, t, n, r, l) {
|
|
2297
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2298
|
+
let o = Vl(e, t, n, !1);
|
|
2111
2299
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
2112
2300
|
if (void 0 === o) {
|
|
2113
2301
|
if (s && t) {
|
|
2114
2302
|
let l = parseInt(r);
|
|
2115
|
-
return
|
|
2303
|
+
return Hl(e, t, n, l), l;
|
|
2116
2304
|
}
|
|
2117
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2305
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), parseInt(r);
|
|
2118
2306
|
}
|
|
2119
2307
|
let _;
|
|
2120
|
-
if (
|
|
2308
|
+
if (hl(o)) _ = Math.trunc(o);
|
|
2121
2309
|
else {
|
|
2122
|
-
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json integer: '${n}'`),
|
|
2123
|
-
if (
|
|
2124
|
-
else if (
|
|
2310
|
+
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json integer: '${n}'`), zr(t), parseInt(r);
|
|
2311
|
+
if (El(o)) _ = o ? 1 : 0;
|
|
2312
|
+
else if (ml(o)) _ = function(e) {
|
|
2125
2313
|
const t = /^\s*([+-]?)(0[xX][0-9a-fA-F]+|0[0-7]*|[1-9][0-9]*)/.exec(e);
|
|
2126
2314
|
if (!t) return 0;
|
|
2127
2315
|
let n, r = t[2];
|
|
2128
2316
|
return n = r.length > 1 && ("x" === r[1] || "X" === r[1]) ? parseInt(r.substring(2), 16) : "0" === r[0] ? parseInt(r, 8) : parseInt(r, 10), "-" === t[1] ? -n : n;
|
|
2129
2317
|
}(o);
|
|
2130
2318
|
else {
|
|
2131
|
-
if (null !== o) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`),
|
|
2319
|
+
if (null !== o) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), zr(t), 0;
|
|
2132
2320
|
_ = 0;
|
|
2133
2321
|
}
|
|
2134
2322
|
}
|
|
2135
|
-
return a &&
|
|
2323
|
+
return a && Gl(e, t, n), _;
|
|
2136
2324
|
}
|
|
2137
|
-
function
|
|
2138
|
-
e && !
|
|
2139
|
-
let o =
|
|
2325
|
+
function xl(e, t, n, r, l) {
|
|
2326
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2327
|
+
let o = Vl(e, t, n, !1);
|
|
2140
2328
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
2141
2329
|
if (void 0 === o) {
|
|
2142
2330
|
if (s && t) {
|
|
2143
2331
|
let l = Number(r);
|
|
2144
|
-
return
|
|
2332
|
+
return Hl(e, t, n, l), l;
|
|
2145
2333
|
}
|
|
2146
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2334
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), Number(r);
|
|
2147
2335
|
}
|
|
2148
2336
|
let _;
|
|
2149
|
-
if (
|
|
2337
|
+
if (hl(o)) _ = o;
|
|
2150
2338
|
else {
|
|
2151
|
-
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json real: '${n}'`),
|
|
2152
|
-
if (
|
|
2153
|
-
else if (
|
|
2339
|
+
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json real: '${n}'`), zr(t), Number(r);
|
|
2340
|
+
if (El(o)) _ = o ? 1 : 0;
|
|
2341
|
+
else if (ml(o)) _ = parseFloat(o), Number.isNaN(_) && (_ = 0);
|
|
2154
2342
|
else {
|
|
2155
|
-
if (null !== o) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`),
|
|
2343
|
+
if (null !== o) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), zr(t), 0;
|
|
2156
2344
|
_ = 0;
|
|
2157
2345
|
}
|
|
2158
2346
|
}
|
|
2159
|
-
return a &&
|
|
2347
|
+
return a && Gl(e, t, n), _;
|
|
2160
2348
|
}
|
|
2161
|
-
function
|
|
2162
|
-
e && !
|
|
2163
|
-
let o =
|
|
2349
|
+
function Kl(e, t, n, r, l) {
|
|
2350
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2351
|
+
let o = Vl(e, t, n, !1);
|
|
2164
2352
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2165
|
-
return void 0 === o ? s && t ? (
|
|
2166
|
-
let n =
|
|
2353
|
+
return void 0 === o ? s && t ? (Hl(e, t, n, ml(r) ? r : null), r) : (i && !function(e, t) {
|
|
2354
|
+
let n = ml(t) ? t.split("`") : [], r = e;
|
|
2167
2355
|
for (let e = 0; e < n.length - 1; e++) {
|
|
2168
|
-
if (!
|
|
2356
|
+
if (!bl(r) && !pl(r)) return !1;
|
|
2169
2357
|
r = r[n[e]];
|
|
2170
2358
|
}
|
|
2171
|
-
return !(!
|
|
2172
|
-
}(t, n) && (cr(`path not found: '${n}'`),
|
|
2359
|
+
return !(!bl(r) && !pl(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
2360
|
+
}(t, n) && (cr(`path not found: '${n}'`), zr(t)), r) : ml(o) ? (a && Gl(e, t, n), o) : (null !== o && (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json str: '${n}'`), zr(t)), r);
|
|
2173
2361
|
}
|
|
2174
|
-
function
|
|
2175
|
-
e && !
|
|
2176
|
-
let o =
|
|
2362
|
+
function Yl(e, t, n, r, l) {
|
|
2363
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2364
|
+
let o = Vl(e, t, n, !1);
|
|
2177
2365
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2178
2366
|
if (void 0 === o) {
|
|
2179
2367
|
if (s) {
|
|
2180
2368
|
let l = r;
|
|
2181
|
-
return
|
|
2369
|
+
return Hl(e, t, n, l), l;
|
|
2182
2370
|
}
|
|
2183
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2371
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), r;
|
|
2184
2372
|
}
|
|
2185
|
-
return a &&
|
|
2373
|
+
return a && Gl(e, t, n), o;
|
|
2186
2374
|
}
|
|
2187
|
-
function
|
|
2188
|
-
e && !
|
|
2189
|
-
let o =
|
|
2375
|
+
function Bl(e, t, n, r, l) {
|
|
2376
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2377
|
+
let o = Vl(e, t, n, !1);
|
|
2190
2378
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2191
|
-
return void 0 === o ? s &&
|
|
2379
|
+
return void 0 === o ? s && bl(r) && t ? (Hl(e, t, n, r), r) : (i && (cr(`path not found: '${n}'`), zr(t)), r) : bl(o) ? (a && Gl(e, t, n), o) : s && null === o && bl(r) ? (Hl(e, t, n, r), r) : s && null === o ? (i && (cr(`path not found: '${n}'`), zr(t)), r) : ((i || s) && (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json dict: '${n}'` + (s ? ", cannot create" : "")), zr(t)), r);
|
|
2192
2380
|
}
|
|
2193
|
-
function
|
|
2194
|
-
e && !
|
|
2195
|
-
let o =
|
|
2381
|
+
function Jl(e, t, n, r, l) {
|
|
2382
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2383
|
+
let o = Vl(e, t, n, !1);
|
|
2196
2384
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2197
2385
|
if (void 0 === o) {
|
|
2198
2386
|
if (s) {
|
|
2199
2387
|
let l = r;
|
|
2200
|
-
return
|
|
2388
|
+
return Hl(e, t, n, l), l;
|
|
2201
2389
|
}
|
|
2202
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2390
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), r;
|
|
2203
2391
|
}
|
|
2204
|
-
return a &&
|
|
2392
|
+
return a && Gl(e, t, n), o;
|
|
2205
2393
|
}
|
|
2206
|
-
function
|
|
2207
|
-
e && !
|
|
2208
|
-
let o =
|
|
2394
|
+
function ql(e, t, n, r, l) {
|
|
2395
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2396
|
+
let o = Vl(e, t, n, !1);
|
|
2209
2397
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2210
|
-
return void 0 === o ? s &&
|
|
2398
|
+
return void 0 === o ? s && pl(r) && t ? (Hl(e, t, n, r), r) : (i && (cr(`path not found: '${n}'`), zr(t)), r) : pl(o) ? (a && Gl(e, t, n), o) : s && null === o && pl(r) ? (Hl(e, t, n, r), r) : s && null === o ? (i && (cr(`path not found: '${n}'`), zr(t)), r) : ((i || s) && (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json list: '${n}'` + (s ? ", cannot create" : "")), zr(t)), r);
|
|
2211
2399
|
}
|
|
2212
|
-
function
|
|
2213
|
-
if (e && !
|
|
2214
|
-
if (!
|
|
2400
|
+
function Hl(e, t, n, r) {
|
|
2401
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !bl(t)) return cr("kw is not an object"), -1;
|
|
2402
|
+
if (!ml(n)) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
2215
2403
|
if ("" === n) return cr((e ? Rt(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
2216
2404
|
if (n.split("`").includes("")) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
2217
2405
|
let l = n.split("`"), o = l.length;
|
|
2218
2406
|
for (let i = 0; i < o; i++) {
|
|
2219
2407
|
let s = l[i];
|
|
2220
|
-
if (
|
|
2221
|
-
const r =
|
|
2408
|
+
if (pl(t)) {
|
|
2409
|
+
const r = Fl(t, s);
|
|
2222
2410
|
if (r < 0) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not an index of its list: '${n}'`), -1;
|
|
2223
2411
|
s = String(r);
|
|
2224
2412
|
}
|
|
2225
|
-
if (i === o - 1)
|
|
2413
|
+
if (i === o - 1) Ul(t, s, r);
|
|
2226
2414
|
else {
|
|
2227
|
-
let r =
|
|
2228
|
-
if (void 0 === r)
|
|
2229
|
-
else if (!
|
|
2415
|
+
let r = Pl(t, s) ? void 0 : t[s];
|
|
2416
|
+
if (void 0 === r) Ul(t, s, {});
|
|
2417
|
+
else if (!bl(r) && !pl(r)) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not a dict or a list: '${n}'`), -1;
|
|
2230
2418
|
t = t[s];
|
|
2231
2419
|
}
|
|
2232
2420
|
}
|
|
2233
2421
|
return 0;
|
|
2234
2422
|
}
|
|
2235
|
-
function
|
|
2236
|
-
if (e && !
|
|
2237
|
-
let o =
|
|
2423
|
+
function zl(e, t, n, r, l) {
|
|
2424
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !bl(t)) return cr("kw is not an object"), -1;
|
|
2425
|
+
let o = Vl(e, t, n, !1);
|
|
2238
2426
|
if (void 0 === o) {
|
|
2239
|
-
if (!
|
|
2427
|
+
if (!ml(n) || function(e, t) {
|
|
2240
2428
|
let n = t.split("`"), r = e;
|
|
2241
2429
|
for (let e = 0; e < n.length - 1; e++) {
|
|
2242
|
-
if (
|
|
2243
|
-
const t =
|
|
2430
|
+
if (pl(r)) {
|
|
2431
|
+
const t = Fl(r, n[e]);
|
|
2244
2432
|
if (t < 0) return !1;
|
|
2245
2433
|
r = r[t];
|
|
2246
2434
|
} else r = Object.prototype.hasOwnProperty.call(r, n[e]) ? r[n[e]] : void 0;
|
|
2247
2435
|
if (null == r) return !1;
|
|
2248
|
-
if (!
|
|
2436
|
+
if (!bl(r) && !pl(r)) return !0;
|
|
2249
2437
|
}
|
|
2250
2438
|
return !1;
|
|
2251
2439
|
}(t, n)) return -1;
|
|
2252
|
-
if (o = {},
|
|
2440
|
+
if (o = {}, Hl(e, t, n, o) < 0) return -1;
|
|
2253
2441
|
}
|
|
2254
|
-
return
|
|
2442
|
+
return bl(o) ? (Ul(o, r, l), 0) : (cr(`subdict is not an object: '${n}'`), -1);
|
|
2255
2443
|
}
|
|
2256
|
-
function
|
|
2444
|
+
function Ql(e, n, r) {
|
|
2257
2445
|
let l = "", o = !1;
|
|
2258
|
-
if (
|
|
2446
|
+
if (pl(n)) {
|
|
2259
2447
|
o = !1;
|
|
2260
2448
|
for (let i = 0; i < n.length; i++) {
|
|
2261
2449
|
let s = n[i];
|
|
2262
|
-
if (l =
|
|
2450
|
+
if (l = Nl(r) ? t("%s", r) : t("%s`%d", r, i), o = Ql(e, s, l), o) break;
|
|
2263
2451
|
}
|
|
2264
|
-
} else if (
|
|
2452
|
+
} else if (bl(n)) {
|
|
2265
2453
|
o = !0;
|
|
2266
2454
|
let i = Object.keys(n);
|
|
2267
2455
|
for (let s = 0; s < i.length; s++) {
|
|
2268
2456
|
let a = i[s], u = n[a];
|
|
2269
|
-
if (l =
|
|
2270
|
-
if (o =
|
|
2457
|
+
if (l = Nl(r) ? t("%s", a) : t("%s`%s", r, a), pl(u) || bl(u)) {
|
|
2458
|
+
if (o = Ql(e, u, l), !o) break;
|
|
2271
2459
|
continue;
|
|
2272
2460
|
}
|
|
2273
|
-
let _ =
|
|
2274
|
-
if (void 0 === _ && (_ =
|
|
2461
|
+
let _ = Jl(0, e, l, void 0, 0);
|
|
2462
|
+
if (void 0 === _ && (_ = rl(e, l)), void 0 === _) {
|
|
2275
2463
|
o = !1;
|
|
2276
2464
|
break;
|
|
2277
2465
|
}
|
|
2278
|
-
if (0 !==
|
|
2466
|
+
if (0 !== Dl(_, u)) {
|
|
2279
2467
|
o = !1;
|
|
2280
2468
|
break;
|
|
2281
2469
|
}
|
|
@@ -2283,83 +2471,83 @@ function Fl(e, n, r) {
|
|
|
2283
2471
|
}
|
|
2284
2472
|
return o;
|
|
2285
2473
|
}
|
|
2286
|
-
function
|
|
2287
|
-
return 0 ===
|
|
2474
|
+
function Xl(e, t) {
|
|
2475
|
+
return 0 === gl(t) || Ql(e, t, "");
|
|
2288
2476
|
}
|
|
2289
|
-
function
|
|
2290
|
-
if (!n || !
|
|
2291
|
-
for (let e = 0; e < t.length; e++) if (
|
|
2477
|
+
function Zl(e, t, n, r) {
|
|
2478
|
+
if (!n || !pl(t)) return r && cr("item NULL or kw_list is not a list"), -1;
|
|
2479
|
+
for (let e = 0; e < t.length; e++) if (Zr(n, t[e])) return e;
|
|
2292
2480
|
return r && cr("item not found in this list"), -1;
|
|
2293
2481
|
}
|
|
2294
|
-
function
|
|
2295
|
-
if (e && !
|
|
2296
|
-
r || (r =
|
|
2482
|
+
function eo(e, t, n, r) {
|
|
2483
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !t) return null;
|
|
2484
|
+
r || (r = Xl);
|
|
2297
2485
|
let l = [];
|
|
2298
|
-
if (
|
|
2486
|
+
if (pl(t)) for (let e = 0; e < t.length; e++) {
|
|
2299
2487
|
let o = t[e];
|
|
2300
|
-
r(o, n) && l.push(
|
|
2488
|
+
r(o, n) && l.push(Qr(o));
|
|
2301
2489
|
}
|
|
2302
2490
|
else {
|
|
2303
|
-
if (!
|
|
2304
|
-
r(t, n) && l.push(
|
|
2491
|
+
if (!bl(t)) return cr("kw_select() BAD kw parameter"), null;
|
|
2492
|
+
r(t, n) && l.push(Qr(t));
|
|
2305
2493
|
}
|
|
2306
2494
|
return l;
|
|
2307
2495
|
}
|
|
2308
|
-
function
|
|
2309
|
-
if (e && !
|
|
2310
|
-
r || (r =
|
|
2496
|
+
function to(e, t, n, r) {
|
|
2497
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !t) return null;
|
|
2498
|
+
r || (r = Xl);
|
|
2311
2499
|
let l = [];
|
|
2312
|
-
if (
|
|
2500
|
+
if (pl(t)) for (let e = 0; e < t.length; e++) {
|
|
2313
2501
|
let o = t[e];
|
|
2314
2502
|
r(o, n) && l.push(o);
|
|
2315
2503
|
}
|
|
2316
2504
|
else {
|
|
2317
|
-
if (!
|
|
2505
|
+
if (!bl(t)) return cr("kw_select() BAD kw parameter"), null;
|
|
2318
2506
|
r(t, n) && l.push(t);
|
|
2319
2507
|
}
|
|
2320
2508
|
return l;
|
|
2321
2509
|
}
|
|
2322
|
-
function
|
|
2323
|
-
e && !
|
|
2510
|
+
function no(e, t, n, r) {
|
|
2511
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2324
2512
|
let l = {};
|
|
2325
|
-
if (
|
|
2513
|
+
if (ml(n) && !Nl(n)) {
|
|
2326
2514
|
let o = n;
|
|
2327
|
-
Object.prototype.hasOwnProperty.call(t, o) ?
|
|
2328
|
-
} else if (
|
|
2515
|
+
Object.prototype.hasOwnProperty.call(t, o) ? Ul(l, o, t[o]) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2516
|
+
} else if (bl(n) && cl(n) > 0) for (let o of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, o) ? Ul(l, o, t[o]) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2329
2517
|
else {
|
|
2330
|
-
if (!(
|
|
2518
|
+
if (!(pl(n) && fl(n) > 0)) return t;
|
|
2331
2519
|
for (let o = 0; o < n.length; o++) {
|
|
2332
2520
|
let i = n[o];
|
|
2333
|
-
Object.prototype.hasOwnProperty.call(t, i) ?
|
|
2521
|
+
Object.prototype.hasOwnProperty.call(t, i) ? Ul(l, i, t[i]) : r && cr(`${Rt(e)}: key not found: ${i}`);
|
|
2334
2522
|
}
|
|
2335
2523
|
}
|
|
2336
2524
|
return l;
|
|
2337
2525
|
}
|
|
2338
|
-
function
|
|
2526
|
+
function ro(e, t, n, r) {
|
|
2339
2527
|
let l = {};
|
|
2340
|
-
if (!
|
|
2341
|
-
if (
|
|
2528
|
+
if (!bl(t)) return l;
|
|
2529
|
+
if (el(l, t), ml(n) && !Nl(n)) {
|
|
2342
2530
|
let o = n;
|
|
2343
|
-
Object.prototype.hasOwnProperty.call(t, o) ?
|
|
2344
|
-
} else if (
|
|
2531
|
+
Object.prototype.hasOwnProperty.call(t, o) ? ll(l, o) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2532
|
+
} else if (bl(n) && cl(n) > 0) for (let o of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, o) ? ll(l, o) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2345
2533
|
else {
|
|
2346
|
-
if (!(
|
|
2534
|
+
if (!(pl(n) && fl(n) > 0)) return {};
|
|
2347
2535
|
for (let o = 0; o < n.length; o++) {
|
|
2348
2536
|
let i = n[o];
|
|
2349
|
-
Object.prototype.hasOwnProperty.call(t, i) ?
|
|
2537
|
+
Object.prototype.hasOwnProperty.call(t, i) ? ll(l, i) : r && cr(`${Rt(e)}: key not found: ${i}`);
|
|
2350
2538
|
}
|
|
2351
2539
|
}
|
|
2352
2540
|
return l;
|
|
2353
2541
|
}
|
|
2354
|
-
function
|
|
2542
|
+
function lo(e, t, n = !1) {
|
|
2355
2543
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
2356
2544
|
let r = window.localStorage.getItem(e);
|
|
2357
|
-
return null === r ? (n &&
|
|
2545
|
+
return null === r ? (n && oo(e, t), t) : JSON.parse(r);
|
|
2358
2546
|
} catch (n) {
|
|
2359
2547
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
2360
2548
|
}
|
|
2361
2549
|
}
|
|
2362
|
-
function
|
|
2550
|
+
function oo(e, t) {
|
|
2363
2551
|
if ("undefined" == typeof window || !window.localStorage) return 0;
|
|
2364
2552
|
if (!e || void 0 === t) return cr(`kw_set_local_storage_value(): invalid key or value: key=${e}`), -1;
|
|
2365
2553
|
try {
|
|
@@ -2368,7 +2556,7 @@ function Bl(e, t) {
|
|
|
2368
2556
|
return cr(`kw_set_local_storage_value(): cannot save "${e}" (storage full or blocked?): ${t && t.message ? t.message : t}`), -1;
|
|
2369
2557
|
}
|
|
2370
2558
|
}
|
|
2371
|
-
function
|
|
2559
|
+
function io(e) {
|
|
2372
2560
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
2373
2561
|
window.localStorage.removeItem(e);
|
|
2374
2562
|
} catch (t) {
|
|
@@ -2376,95 +2564,95 @@ function Jl(e) {
|
|
|
2376
2564
|
}
|
|
2377
2565
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
2378
2566
|
}
|
|
2379
|
-
function
|
|
2380
|
-
if (
|
|
2381
|
-
if (
|
|
2567
|
+
function so(e, t) {
|
|
2568
|
+
if (yl(e) || yl(t)) return !0;
|
|
2569
|
+
if (pl(e)) {
|
|
2382
2570
|
if (0 === e.length) return !0;
|
|
2383
2571
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2384
|
-
} else if (
|
|
2572
|
+
} else if (bl(e)) {
|
|
2385
2573
|
if (0 === Object.keys(e).length) return !0;
|
|
2386
2574
|
for (let n in e) if (n === t) return !0;
|
|
2387
|
-
} else if (
|
|
2575
|
+
} else if (ml(e) && e === t) return !0;
|
|
2388
2576
|
return !1;
|
|
2389
2577
|
}
|
|
2390
|
-
function
|
|
2391
|
-
if (e && !
|
|
2392
|
-
l || (l =
|
|
2578
|
+
function ao(e, t, n, r, l) {
|
|
2579
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !t) return null;
|
|
2580
|
+
l || (l = Xl);
|
|
2393
2581
|
let o = [];
|
|
2394
|
-
if (
|
|
2582
|
+
if (pl(t)) for (let i = 0; i < t.length; i++) {
|
|
2395
2583
|
let s, a = t[i];
|
|
2396
|
-
if (
|
|
2584
|
+
if (bl(a)) s = Kl(e, a, "id", "", 0);
|
|
2397
2585
|
else {
|
|
2398
|
-
if (!
|
|
2586
|
+
if (!ml(a)) continue;
|
|
2399
2587
|
s = a;
|
|
2400
2588
|
}
|
|
2401
|
-
|
|
2589
|
+
so(n, s) && l(a, r) && o.push(a);
|
|
2402
2590
|
}
|
|
2403
2591
|
else {
|
|
2404
|
-
if (!
|
|
2592
|
+
if (!bl(t)) return cr("kw_collect() BAD kw parameter"), null;
|
|
2405
2593
|
for (let e of Object.keys(t)) {
|
|
2406
2594
|
let i = t[e];
|
|
2407
|
-
|
|
2595
|
+
so(n, e) && l(i, r) && o.push(i);
|
|
2408
2596
|
}
|
|
2409
2597
|
}
|
|
2410
2598
|
return o;
|
|
2411
2599
|
}
|
|
2412
|
-
function
|
|
2413
|
-
e && !
|
|
2600
|
+
function uo(e, t, n) {
|
|
2601
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2414
2602
|
let r = {};
|
|
2415
|
-
if (
|
|
2416
|
-
else if (
|
|
2417
|
-
let l = t[n], o =
|
|
2418
|
-
|
|
2603
|
+
if (Nl(n) || (t = Vl(e, t, n)), bl(t)) r = t;
|
|
2604
|
+
else if (pl(t)) for (let n = 0; n < t.length; n++) {
|
|
2605
|
+
let l = t[n], o = Kl(e, l, "id", "", Vn.KW_REQUIRED);
|
|
2606
|
+
Nl(o) || Ul(r, o, l);
|
|
2419
2607
|
}
|
|
2420
2608
|
else cr(`${Rt(e)} kwid_new_dict: data type unknown`);
|
|
2421
2609
|
return r;
|
|
2422
2610
|
}
|
|
2423
|
-
function
|
|
2424
|
-
if (e && !
|
|
2425
|
-
if (
|
|
2611
|
+
function _o(e, t, n) {
|
|
2612
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), Nl(n) || (t = Vl(e, t, n)), pl(t)) return t;
|
|
2613
|
+
if (bl(t)) {
|
|
2426
2614
|
let n = [];
|
|
2427
2615
|
for (let r of Object.keys(t)) {
|
|
2428
2616
|
let l = t[r];
|
|
2429
|
-
|
|
2617
|
+
bl(l) ? (l.id = r, n.push(l)) : cr(`${Rt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2430
2618
|
}
|
|
2431
2619
|
return n;
|
|
2432
2620
|
}
|
|
2433
2621
|
return cr(`${Rt(e)} kwid_new_list: wrong type for list`), [];
|
|
2434
2622
|
}
|
|
2435
|
-
function
|
|
2436
|
-
e && !
|
|
2437
|
-
let o =
|
|
2623
|
+
function co(e, t, n, r, l) {
|
|
2624
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2625
|
+
let o = ao(e, t, n, r, l);
|
|
2438
2626
|
return o && 0 !== o.length ? o[0] : null;
|
|
2439
2627
|
}
|
|
2440
|
-
function
|
|
2441
|
-
if (e && !
|
|
2628
|
+
function fo(e, t) {
|
|
2629
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !t) return [];
|
|
2442
2630
|
let n = [];
|
|
2443
|
-
if (
|
|
2444
|
-
else if (
|
|
2445
|
-
else
|
|
2446
|
-
if (
|
|
2447
|
-
else if (
|
|
2448
|
-
let r =
|
|
2631
|
+
if (ml(t)) n.push(t);
|
|
2632
|
+
else if (bl(t)) for (let e in t) Object.prototype.hasOwnProperty.call(t, e) && n.push(e);
|
|
2633
|
+
else pl(t) && t.forEach(function(t) {
|
|
2634
|
+
if (ml(t)) Nl(t) || n.push(t);
|
|
2635
|
+
else if (bl(t)) {
|
|
2636
|
+
let r = Kl(e, t, "id", 0, 0);
|
|
2449
2637
|
r && n.push(r);
|
|
2450
2638
|
}
|
|
2451
2639
|
});
|
|
2452
2640
|
return n;
|
|
2453
2641
|
}
|
|
2454
|
-
function
|
|
2642
|
+
function go(e, t, n) {
|
|
2455
2643
|
t = t || "id", n = n || "value";
|
|
2456
2644
|
let r = [];
|
|
2457
|
-
if (
|
|
2645
|
+
if (pl(e)) for (let l = 0; l < e.length; l++) {
|
|
2458
2646
|
let o = e[l];
|
|
2459
|
-
if (
|
|
2647
|
+
if (ml(o)) r.push({
|
|
2460
2648
|
id: e[l],
|
|
2461
2649
|
value: e[l]
|
|
2462
2650
|
});
|
|
2463
|
-
else if (
|
|
2651
|
+
else if (bl(o)) {
|
|
2464
2652
|
let e = {};
|
|
2465
|
-
if (
|
|
2466
|
-
if (!
|
|
2467
|
-
if (!(
|
|
2653
|
+
if (Ll(o, t)) {
|
|
2654
|
+
if (!Ll(o, n)) {
|
|
2655
|
+
if (!(gl(o) > 0)) {
|
|
2468
2656
|
cr("list2options(): object without field value: " + n);
|
|
2469
2657
|
continue;
|
|
2470
2658
|
}
|
|
@@ -2472,7 +2660,7 @@ function eo(e, t, n) {
|
|
|
2472
2660
|
}
|
|
2473
2661
|
e.id = o[t], e.value = o[n];
|
|
2474
2662
|
} else {
|
|
2475
|
-
if (!(
|
|
2663
|
+
if (!(gl(o) > 0)) {
|
|
2476
2664
|
cr("list2options(): object without field id: " + t);
|
|
2477
2665
|
continue;
|
|
2478
2666
|
}
|
|
@@ -2481,19 +2669,19 @@ function eo(e, t, n) {
|
|
|
2481
2669
|
r.push(e);
|
|
2482
2670
|
} else cr("list2options(): case1 not implemented");
|
|
2483
2671
|
}
|
|
2484
|
-
else if (
|
|
2672
|
+
else if (bl(e)) for (let t of Object.keys(e)) r.push({
|
|
2485
2673
|
id: t,
|
|
2486
2674
|
value: t
|
|
2487
2675
|
});
|
|
2488
2676
|
else cr("list2options(): case2 not implemented");
|
|
2489
2677
|
return r;
|
|
2490
2678
|
}
|
|
2491
|
-
function
|
|
2679
|
+
function bo(e, t) {
|
|
2492
2680
|
if (!e) return -1;
|
|
2493
2681
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2494
2682
|
return -1;
|
|
2495
2683
|
}
|
|
2496
|
-
function
|
|
2684
|
+
function po(e, t, n) {
|
|
2497
2685
|
if (!e || !t) return cr("ERROR: str_in_list() list or str empty"), !1;
|
|
2498
2686
|
let r = e.length;
|
|
2499
2687
|
if (n) {
|
|
@@ -2505,17 +2693,17 @@ function no(e, t, n) {
|
|
|
2505
2693
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2506
2694
|
return !1;
|
|
2507
2695
|
}
|
|
2508
|
-
function
|
|
2696
|
+
function mo(e, t, n) {
|
|
2509
2697
|
if (!e) return cr("ERROR: strs_in_list() list empty"), !1;
|
|
2510
2698
|
if (!t) return cr("ERROR: strs_in_list() str empty"), !1;
|
|
2511
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2699
|
+
for (let r = 0; r < t.length; r++) if (po(e, t[r], n)) return !0;
|
|
2512
2700
|
return !1;
|
|
2513
2701
|
}
|
|
2514
|
-
function
|
|
2702
|
+
function ho(e, t) {
|
|
2515
2703
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2516
2704
|
return !1;
|
|
2517
2705
|
}
|
|
2518
|
-
function
|
|
2706
|
+
function Eo(e, t) {
|
|
2519
2707
|
try {
|
|
2520
2708
|
let n = e.__md_iev__;
|
|
2521
2709
|
if (n) return n[t];
|
|
@@ -2523,34 +2711,34 @@ function oo(e, t) {
|
|
|
2523
2711
|
return;
|
|
2524
2712
|
}
|
|
2525
2713
|
}
|
|
2526
|
-
function
|
|
2714
|
+
function yo(e, t, n) {
|
|
2527
2715
|
let r = e.__md_iev__;
|
|
2528
2716
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2529
2717
|
}
|
|
2530
|
-
function
|
|
2531
|
-
if (!
|
|
2718
|
+
function To(e, t, n, r) {
|
|
2719
|
+
if (!Sl(e)) return cr("gobj is not a GObj"), null;
|
|
2532
2720
|
if (!t) return;
|
|
2533
|
-
let l =
|
|
2534
|
-
l || (l = [],
|
|
2721
|
+
let l = Eo(t, n);
|
|
2722
|
+
l || (l = [], yo(t, n, l));
|
|
2535
2723
|
try {
|
|
2536
|
-
|
|
2724
|
+
pl(l) && l.unshift(r);
|
|
2537
2725
|
} catch (e) {
|
|
2538
2726
|
cr(e);
|
|
2539
2727
|
}
|
|
2540
2728
|
}
|
|
2541
|
-
function
|
|
2542
|
-
if (!
|
|
2543
|
-
if (!
|
|
2544
|
-
let l =
|
|
2729
|
+
function vo(e, t, n, r) {
|
|
2730
|
+
if (!Sl(e)) return cr("gobj is not a GObj"), null;
|
|
2731
|
+
if (!bl(t)) return cr("kw is not a dict"), null;
|
|
2732
|
+
let l = Eo(t, n);
|
|
2545
2733
|
return l ? 0 === l.length ? (r && cr(`stack empty: ${n}`), null) : l[0] : (r && cr(`stack NOT FOUND: ${n}`), null);
|
|
2546
2734
|
}
|
|
2547
|
-
function
|
|
2548
|
-
return
|
|
2735
|
+
function Oo(e, t, n) {
|
|
2736
|
+
return Nl(n) ? Gl(e, t, "__md_iev__`__msg_type__") : zl(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2549
2737
|
}
|
|
2550
|
-
function
|
|
2551
|
-
return
|
|
2738
|
+
function So(e, t) {
|
|
2739
|
+
return Kl(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2552
2740
|
}
|
|
2553
|
-
function
|
|
2741
|
+
function No(e, t, n) {
|
|
2554
2742
|
let r = new XMLHttpRequest();
|
|
2555
2743
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2556
2744
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
@@ -2562,14 +2750,14 @@ function co(e, t, n) {
|
|
|
2562
2750
|
var e;
|
|
2563
2751
|
}, r.send();
|
|
2564
2752
|
}
|
|
2565
|
-
function
|
|
2753
|
+
function wo(e, t, n) {
|
|
2566
2754
|
let r = new XMLHttpRequest();
|
|
2567
2755
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2568
2756
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2569
2757
|
}, r.send(t);
|
|
2570
2758
|
}
|
|
2571
|
-
function
|
|
2572
|
-
void 0 !== n &&
|
|
2759
|
+
function jo(e, t, n) {
|
|
2760
|
+
void 0 !== n && ml(n) || (n = "");
|
|
2573
2761
|
for (let r of Object.keys(e)) {
|
|
2574
2762
|
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
2575
2763
|
let l = (n.length ? "`" : "") + r;
|
|
@@ -2578,62 +2766,62 @@ function go(e, t, n) {
|
|
|
2578
2766
|
r,
|
|
2579
2767
|
e[r],
|
|
2580
2768
|
n
|
|
2581
|
-
]),
|
|
2769
|
+
]), bl(e[r]) && jo(e[r], t, n), n = n.slice(0, -l.length);
|
|
2582
2770
|
}
|
|
2583
2771
|
}
|
|
2584
|
-
function
|
|
2585
|
-
n && (e =
|
|
2586
|
-
let r =
|
|
2587
|
-
|
|
2588
|
-
let l =
|
|
2589
|
-
return
|
|
2590
|
-
"__" === t.substring(0, 2) ||
|
|
2772
|
+
function $o(e, t, n) {
|
|
2773
|
+
n && (e = Qr(e));
|
|
2774
|
+
let r = Jl(null, e, "type", [], Vn.KW_CREATE);
|
|
2775
|
+
Kl(null, e, "hook", "data", Vn.KW_CREATE);
|
|
2776
|
+
let l = Jl(null, e, "schema", {}, Vn.KW_CREATE), o = Jl(null, e, "topics", {}, Vn.KW_CREATE);
|
|
2777
|
+
return jo(l, function(e, t, n, l) {
|
|
2778
|
+
"__" === t.substring(0, 2) || bl(n) || Jl(null, o, l, Qr(r), Vn.KW_CREATE);
|
|
2591
2779
|
}, t), e;
|
|
2592
2780
|
}
|
|
2593
|
-
function
|
|
2594
|
-
let l =
|
|
2781
|
+
function Ro(e, t, n, r) {
|
|
2782
|
+
let l = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2595
2783
|
if (!l) return cr("jdb_update: topic not found: " + t), null;
|
|
2596
|
-
if (!
|
|
2597
|
-
if (!
|
|
2784
|
+
if (!bl(r) || Nl(r.id)) return cr(`jdb_update: record without id: ${lr(r)}`), null;
|
|
2785
|
+
if (!ml(n)) return cr(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
2598
2786
|
if ("" !== n && n.split("`").includes("")) return cr(`jdb_update: empty segment in path: '${n}'`), null;
|
|
2599
2787
|
let o, i, s = n.split("`"), a = l;
|
|
2600
|
-
for (; (o = s.shift()) && !
|
|
2788
|
+
for (; (o = s.shift()) && !Nl(o) && a;) bl(a) && (a = Jl(null, a, e.hook, null, 0)), a = Co(a, null, o, !1);
|
|
2601
2789
|
if (!a || 0 !== s.length) return cr(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
2602
|
-
if (
|
|
2790
|
+
if (pl(a)) i = a;
|
|
2603
2791
|
else {
|
|
2604
|
-
if (a.id === r.id) return
|
|
2605
|
-
if (i =
|
|
2606
|
-
else if (!
|
|
2792
|
+
if (a.id === r.id) return el(a, r), l;
|
|
2793
|
+
if (i = Jl(null, a, e.hook, null, 0), null == i) i = [], ol(a, e.hook, i);
|
|
2794
|
+
else if (!pl(i)) return cr(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
2607
2795
|
}
|
|
2608
|
-
let u =
|
|
2609
|
-
return u ?
|
|
2796
|
+
let u = Co(i, e.hook, r.id, !1);
|
|
2797
|
+
return u ? el(u, r) : i.push(r), l;
|
|
2610
2798
|
}
|
|
2611
|
-
function
|
|
2612
|
-
let l =
|
|
2799
|
+
function Do(e, t, n, r) {
|
|
2800
|
+
let l = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2613
2801
|
if (!l) return cr("jdb_delete: topic not found: " + t), null;
|
|
2614
|
-
if (!
|
|
2615
|
-
if (!
|
|
2802
|
+
if (!bl(r) || Nl(r.id)) return cr(`jdb_delete: record without id: ${lr(r)}`), null;
|
|
2803
|
+
if (!ml(n)) return cr(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
2616
2804
|
if ("" !== n && n.split("`").includes("")) return cr(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
2617
2805
|
let o, i = n.split("`"), s = l;
|
|
2618
|
-
for (; (o = i.shift()) && !
|
|
2806
|
+
for (; (o = i.shift()) && !Nl(o) && s;) bl(s) && (s = Jl(null, s, e.hook, null, 0)), s = Co(s, null, o, !1);
|
|
2619
2807
|
if (!s || 0 !== i.length) return cr(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
2620
|
-
let a =
|
|
2808
|
+
let a = pl(s) ? s : Jl(null, s, e.hook, null, 0), u = bo(a, r.id);
|
|
2621
2809
|
return u < 0 ? (cr(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (a.splice(u, 1), l);
|
|
2622
2810
|
}
|
|
2623
|
-
function
|
|
2624
|
-
let n =
|
|
2811
|
+
function Ao(e, t) {
|
|
2812
|
+
let n = Jl(null, e, "topics", null, 0);
|
|
2625
2813
|
if (!n) return cr("jdb topics section not found"), br(e), null;
|
|
2626
|
-
return
|
|
2814
|
+
return Jl(null, n, t, null, 0) || (cr("jdb topic not found: " + t), br(n), null);
|
|
2627
2815
|
}
|
|
2628
|
-
function
|
|
2629
|
-
let l =
|
|
2630
|
-
return l ? (void 0 === r && (r = !0),
|
|
2816
|
+
function ko(e, t, n, r) {
|
|
2817
|
+
let l = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2818
|
+
return l ? (void 0 === r && (r = !0), Co(l, e.hook, n, r)) : (cr("jdb_get: topic not found: " + t), null);
|
|
2631
2819
|
}
|
|
2632
|
-
function
|
|
2633
|
-
let r =
|
|
2820
|
+
function Io(e, t, n) {
|
|
2821
|
+
let r = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2634
2822
|
return r ? n < r.length ? r[n] : {} : (cr("jdb_get_by_idx: topic not found: " + t), null);
|
|
2635
2823
|
}
|
|
2636
|
-
function
|
|
2824
|
+
function Co(e, t, n, r) {
|
|
2637
2825
|
if (!e) return null;
|
|
2638
2826
|
let l, o = e.length;
|
|
2639
2827
|
for (l = 0; l < o; l++) {
|
|
@@ -2641,19 +2829,19 @@ function To(e, t, n, r) {
|
|
|
2641
2829
|
if (o) {
|
|
2642
2830
|
let e = o.id;
|
|
2643
2831
|
if (e && e === n) return o;
|
|
2644
|
-
if (r &&
|
|
2645
|
-
let e =
|
|
2832
|
+
if (r && Ll(o, t)) {
|
|
2833
|
+
let e = Co(o[t], t, n, r);
|
|
2646
2834
|
if (e) return e;
|
|
2647
2835
|
}
|
|
2648
2836
|
}
|
|
2649
2837
|
}
|
|
2650
2838
|
return null;
|
|
2651
2839
|
}
|
|
2652
|
-
function
|
|
2653
|
-
let n =
|
|
2654
|
-
return
|
|
2840
|
+
function Lo(e, t) {
|
|
2841
|
+
let n = Qr(e);
|
|
2842
|
+
return tl(n, t), n;
|
|
2655
2843
|
}
|
|
2656
|
-
function
|
|
2844
|
+
function Po(e) {
|
|
2657
2845
|
function t(e) {
|
|
2658
2846
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2659
2847
|
switch (t.length % 4) {
|
|
@@ -2684,9 +2872,9 @@ function Oo(e) {
|
|
|
2684
2872
|
signature: t(n[2])
|
|
2685
2873
|
};
|
|
2686
2874
|
}
|
|
2687
|
-
function
|
|
2875
|
+
function Uo(e, t) {
|
|
2688
2876
|
try {
|
|
2689
|
-
let n =
|
|
2877
|
+
let n = Po(e);
|
|
2690
2878
|
switch (t) {
|
|
2691
2879
|
case "header": return JSON.parse(n.header);
|
|
2692
2880
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2696,15 +2884,15 @@ function So(e, t) {
|
|
|
2696
2884
|
return null;
|
|
2697
2885
|
}
|
|
2698
2886
|
}
|
|
2699
|
-
function
|
|
2887
|
+
function Fo(e) {
|
|
2700
2888
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2701
2889
|
}
|
|
2702
|
-
function
|
|
2890
|
+
function Vo(e) {
|
|
2703
2891
|
if (!e) return "";
|
|
2704
2892
|
const t = String(e).trim();
|
|
2705
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2893
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Fo(t);
|
|
2706
2894
|
}
|
|
2707
|
-
var
|
|
2895
|
+
var Go = class {
|
|
2708
2896
|
constructor(e) {
|
|
2709
2897
|
this.html = e, Object.freeze(this);
|
|
2710
2898
|
}
|
|
@@ -2712,28 +2900,28 @@ var jo = class {
|
|
|
2712
2900
|
return this.html;
|
|
2713
2901
|
}
|
|
2714
2902
|
};
|
|
2715
|
-
function
|
|
2716
|
-
return "string" != typeof e ? (cr("html_markup: not a string, type " + typeof e), new
|
|
2903
|
+
function Mo(e) {
|
|
2904
|
+
return "string" != typeof e ? (cr("html_markup: not a string, type " + typeof e), new Go("")) : new Go(e);
|
|
2717
2905
|
}
|
|
2718
|
-
function
|
|
2719
|
-
return e instanceof
|
|
2906
|
+
function Wo(e) {
|
|
2907
|
+
return e instanceof Go;
|
|
2720
2908
|
}
|
|
2721
|
-
function
|
|
2909
|
+
function xo(e) {
|
|
2722
2910
|
const t = document.createElement("template");
|
|
2723
2911
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2724
2912
|
}
|
|
2725
|
-
var
|
|
2726
|
-
function
|
|
2727
|
-
|
|
2913
|
+
var Ko = !1, Yo = /* @__PURE__ */ new Set();
|
|
2914
|
+
function Bo(e) {
|
|
2915
|
+
Ko = !!e;
|
|
2728
2916
|
}
|
|
2729
|
-
function
|
|
2730
|
-
return
|
|
2917
|
+
function Jo() {
|
|
2918
|
+
return Ko;
|
|
2731
2919
|
}
|
|
2732
|
-
function
|
|
2920
|
+
function qo(e) {
|
|
2733
2921
|
const t = document.createElement("template");
|
|
2734
2922
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2735
2923
|
}
|
|
2736
|
-
function
|
|
2924
|
+
function Ho(e, t) {
|
|
2737
2925
|
let [n, r, l, o] = e;
|
|
2738
2926
|
if (!n) return void cr("Tag must be a valid HTML element.");
|
|
2739
2927
|
let i = document.createElement(n), s = "";
|
|
@@ -2742,22 +2930,22 @@ function Po(e, t) {
|
|
|
2742
2930
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2743
2931
|
i.style.cssText = t;
|
|
2744
2932
|
} else "style" === e ? i.style.cssText = r[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== r[e] && void 0 !== r[e] && (s = r[e], i.setAttribute("data-i18n", s)) : i.setAttribute(e, r[e]);
|
|
2745
|
-
if (
|
|
2746
|
-
else if (
|
|
2933
|
+
if (Wo(l)) i.appendChild(xo(l));
|
|
2934
|
+
else if (ml(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !Ko) i.appendChild(qo(l));
|
|
2747
2935
|
else if (l.length > 0 && "<" === l[0] && function(e) {
|
|
2748
|
-
if (
|
|
2936
|
+
if (Yo.size >= 100) return;
|
|
2749
2937
|
const t = e.slice(0, 80);
|
|
2750
|
-
|
|
2938
|
+
Yo.has(t) || (Yo.add(t), fr(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2751
2939
|
}(l), t && s) i.textContent = t(s) || l;
|
|
2752
2940
|
else i.textContent = l;
|
|
2753
|
-
else if (
|
|
2754
|
-
if (l.length > 0) if (
|
|
2755
|
-
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(
|
|
2941
|
+
else if (pl(l)) {
|
|
2942
|
+
if (l.length > 0) if (ml(l[0])) i.appendChild(Ho(l, t));
|
|
2943
|
+
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(Ho(e, t)) : e instanceof Node ? i.appendChild(e) : Wo(e) ? i.appendChild(xo(e)) : ml(e) ? i.appendChild(document.createTextNode(e)) : null != e && !1 !== e && cr("createElement2: child ignored, type " + typeof e);
|
|
2756
2944
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (cr("content ignored"), pr(l));
|
|
2757
2945
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2758
2946
|
return i;
|
|
2759
2947
|
}
|
|
2760
|
-
function
|
|
2948
|
+
function zo(e) {
|
|
2761
2949
|
if (!e) return {
|
|
2762
2950
|
top: 0,
|
|
2763
2951
|
left: 0,
|
|
@@ -2777,11 +2965,11 @@ function Uo(e) {
|
|
|
2777
2965
|
bottom: t + i + l
|
|
2778
2966
|
};
|
|
2779
2967
|
}
|
|
2780
|
-
function
|
|
2968
|
+
function Qo(e) {
|
|
2781
2969
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2782
2970
|
}
|
|
2783
|
-
function
|
|
2784
|
-
if (!
|
|
2971
|
+
function Xo(e, t) {
|
|
2972
|
+
if (!Ol(t)) return void cr("You must supply a translation function");
|
|
2785
2973
|
e || (e = document);
|
|
2786
2974
|
const n = (t) => {
|
|
2787
2975
|
let n = [];
|
|
@@ -2804,7 +2992,7 @@ function Vo(e, t) {
|
|
|
2804
2992
|
n && e.setAttribute("placeholder", t(n));
|
|
2805
2993
|
});
|
|
2806
2994
|
}
|
|
2807
|
-
function
|
|
2995
|
+
function Zo(e = "Time Tracker", t = !1) {
|
|
2808
2996
|
const n = e, r = performance.now();
|
|
2809
2997
|
let l = r;
|
|
2810
2998
|
return t && fr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
@@ -2815,30 +3003,30 @@ function Go(e = "Time Tracker", t = !1) {
|
|
|
2815
3003
|
};
|
|
2816
3004
|
} };
|
|
2817
3005
|
}
|
|
2818
|
-
function
|
|
3006
|
+
function ei(e) {
|
|
2819
3007
|
const t = (e, t) => String(e).padStart(t, "0"), n = `${(e = e || /* @__PURE__ */ new Date()).getFullYear()}-${t(e.getMonth() + 1, 2)}-${t(e.getDate(), 2)}T${t(e.getHours(), 2)}:${t(e.getMinutes(), 2)}:${t(e.getSeconds(), 2)}`, r = t(e.getMilliseconds(), 3), l = e.getTimezoneOffset();
|
|
2820
3008
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2821
3009
|
}
|
|
2822
|
-
function
|
|
3010
|
+
function ti() {
|
|
2823
3011
|
return Math.floor(Date.now() / 1e3);
|
|
2824
3012
|
}
|
|
2825
|
-
function
|
|
3013
|
+
function ni(e, t) {
|
|
2826
3014
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2827
3015
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2828
3016
|
return -1;
|
|
2829
3017
|
}
|
|
2830
|
-
function
|
|
3018
|
+
function ri() {
|
|
2831
3019
|
let e = "";
|
|
2832
3020
|
return "undefined" != typeof window && window.localStorage ? (e = window.localStorage.getItem("host_uuid"), !e && window.crypto?.randomUUID && (e = window.crypto.randomUUID(), window.localStorage.setItem("host_uuid", e))) : e = "undefined" != typeof globalThis && globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : "00000000-0000-0000-0000-000000000000", e;
|
|
2833
3021
|
}
|
|
2834
|
-
function
|
|
3022
|
+
function li(e) {
|
|
2835
3023
|
return e.replace(/[?# ^:]/g, "_");
|
|
2836
3024
|
}
|
|
2837
|
-
function
|
|
3025
|
+
function oi(e) {
|
|
2838
3026
|
let t = null;
|
|
2839
3027
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2840
3028
|
}
|
|
2841
|
-
function
|
|
3029
|
+
function ii(e, t = 0, n = !1) {
|
|
2842
3030
|
let r = null, l = null, o = null;
|
|
2843
3031
|
const i = (...i) => {
|
|
2844
3032
|
o = this, l = i;
|
|
@@ -2853,20 +3041,20 @@ function Jo(e, t = 0, n = !1) {
|
|
|
2853
3041
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2854
3042
|
}, i;
|
|
2855
3043
|
}
|
|
2856
|
-
function
|
|
3044
|
+
function si(...e) {
|
|
2857
3045
|
let t = "", n = 0;
|
|
2858
3046
|
for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
|
|
2859
3047
|
return t;
|
|
2860
3048
|
}
|
|
2861
|
-
var
|
|
2862
|
-
function
|
|
3049
|
+
var ai = 256, ui = 1e5;
|
|
3050
|
+
function _i(e) {
|
|
2863
3051
|
const t = String(e).replace(/`/g, "``");
|
|
2864
3052
|
return "[" === t[0] ? "[" + t : t;
|
|
2865
3053
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
3054
|
+
function ci(e) {
|
|
3055
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : _i(e)).join("`") : "";
|
|
2868
3056
|
}
|
|
2869
|
-
function
|
|
3057
|
+
function fi(e) {
|
|
2870
3058
|
if ("string" != typeof e) return null;
|
|
2871
3059
|
let t = [], n = "";
|
|
2872
3060
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2887,9 +3075,9 @@ function Zo(e) {
|
|
|
2887
3075
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2888
3076
|
});
|
|
2889
3077
|
}
|
|
2890
|
-
function
|
|
3078
|
+
function gi(e) {
|
|
2891
3079
|
const t = {}, n = (e, r, l) => {
|
|
2892
|
-
if (l >
|
|
3080
|
+
if (l > ai) throw new Error("json2flat: deeper than 256");
|
|
2893
3081
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2894
3082
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2895
3083
|
const o = `[${t}]`;
|
|
@@ -2899,30 +3087,30 @@ function ei(e) {
|
|
|
2899
3087
|
const t = Object.keys(e);
|
|
2900
3088
|
if (t.length > 0) {
|
|
2901
3089
|
for (const o of t) {
|
|
2902
|
-
const t =
|
|
3090
|
+
const t = _i(o);
|
|
2903
3091
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2904
3092
|
}
|
|
2905
3093
|
return;
|
|
2906
3094
|
}
|
|
2907
3095
|
}
|
|
2908
|
-
0 !== l &&
|
|
3096
|
+
0 !== l && Ul(t, r, e);
|
|
2909
3097
|
};
|
|
2910
3098
|
return null == e || n(e, "", 0), t;
|
|
2911
3099
|
}
|
|
2912
|
-
function
|
|
3100
|
+
function di(e) {
|
|
2913
3101
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2914
3102
|
let t = null;
|
|
2915
3103
|
for (const n of Object.keys(e)) {
|
|
2916
|
-
const r =
|
|
3104
|
+
const r = fi(n);
|
|
2917
3105
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2918
|
-
if (r.length >
|
|
3106
|
+
if (r.length > ai) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2919
3107
|
const l = "number" == typeof r[0];
|
|
2920
3108
|
if (null === t) t = l ? [] : {};
|
|
2921
3109
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2922
3110
|
let o = t;
|
|
2923
3111
|
for (let t = 0; t < r.length; t++) {
|
|
2924
3112
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2925
|
-
if (i && l >
|
|
3113
|
+
if (i && l > ui) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2926
3114
|
if (i !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2927
3115
|
if (s) {
|
|
2928
3116
|
if (Array.isArray(o)) {
|
|
@@ -2930,7 +3118,7 @@ function ti(e) {
|
|
|
2930
3118
|
o[l] = e[n];
|
|
2931
3119
|
} else {
|
|
2932
3120
|
if (Object.prototype.hasOwnProperty.call(o, l)) throw new Error(`flat2json: '${n}' is written twice, or once as a value and once as a container`);
|
|
2933
|
-
|
|
3121
|
+
Ul(o, l, e[n]);
|
|
2934
3122
|
}
|
|
2935
3123
|
break;
|
|
2936
3124
|
}
|
|
@@ -2938,7 +3126,7 @@ function ti(e) {
|
|
|
2938
3126
|
if (Array.isArray(o)) {
|
|
2939
3127
|
for (; o.length <= l;) o.push(null);
|
|
2940
3128
|
u = o[l], null == u && (u = a ? [] : {}, o[l] = u);
|
|
2941
|
-
} else u =
|
|
3129
|
+
} else u = Pl(o, l) ? void 0 : o[l], void 0 === u && (u = a ? [] : {}, Ul(o, l, u));
|
|
2942
3130
|
if (null === u || "object" != typeof u) throw new Error(`flat2json: '${n}' walks through a value: the same id is a leaf and a container at once`);
|
|
2943
3131
|
if (a !== Array.isArray(u)) throw new Error(`flat2json: '${n}' needs a ${a ? "array" : "object"} where the tree already has a ${Array.isArray(u) ? "array" : "object"}`);
|
|
2944
3132
|
o = u;
|
|
@@ -2946,68 +3134,68 @@ function ti(e) {
|
|
|
2946
3134
|
}
|
|
2947
3135
|
return null === t ? {} : t;
|
|
2948
3136
|
}
|
|
2949
|
-
function
|
|
3137
|
+
function bi(e, t) {
|
|
2950
3138
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2951
3139
|
}
|
|
2952
|
-
function
|
|
3140
|
+
function pi(e, t) {
|
|
2953
3141
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2954
3142
|
added: {},
|
|
2955
3143
|
removed: {},
|
|
2956
3144
|
changed: {}
|
|
2957
3145
|
};
|
|
2958
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
3146
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? bi(n[e], r[e]) || Ul(l.changed, e, {
|
|
2959
3147
|
from: n[e],
|
|
2960
3148
|
to: r[e]
|
|
2961
|
-
}) :
|
|
2962
|
-
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) ||
|
|
3149
|
+
}) : Ul(l.removed, e, n[e]);
|
|
3150
|
+
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || Ul(l.added, e, r[e]);
|
|
2963
3151
|
return l;
|
|
2964
3152
|
}
|
|
2965
|
-
function
|
|
3153
|
+
function mi(e, t) {
|
|
2966
3154
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2967
3155
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2968
3156
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
2969
|
-
for (const n of Object.keys(t.added || {}))
|
|
3157
|
+
for (const n of Object.keys(t.added || {})) Ul(e, n, t.added[n]);
|
|
2970
3158
|
for (const n of Object.keys(t.changed || {})) {
|
|
2971
3159
|
const r = t.changed[n];
|
|
2972
3160
|
if (!r || !Object.prototype.hasOwnProperty.call(r, "to")) throw new Error(`flat_apply: changed '${n}' without a 'to'`);
|
|
2973
|
-
|
|
3161
|
+
Ul(e, n, r.to);
|
|
2974
3162
|
}
|
|
2975
3163
|
return e;
|
|
2976
3164
|
}
|
|
2977
|
-
function
|
|
3165
|
+
function hi(e) {
|
|
2978
3166
|
return "persistent-attrs-" + Rt(e);
|
|
2979
3167
|
}
|
|
2980
|
-
function
|
|
2981
|
-
let n = Xt(e, v.SDF_PERSIST), r =
|
|
2982
|
-
if (r &&
|
|
2983
|
-
let l =
|
|
2984
|
-
l =
|
|
3168
|
+
function Ei(e, t) {
|
|
3169
|
+
let n = Xt(e, v.SDF_PERSIST), r = lo(hi(e), null, !1);
|
|
3170
|
+
if (r && bl(r)) {
|
|
3171
|
+
let l = no(e, r, t, !1);
|
|
3172
|
+
l = no(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2985
3173
|
}
|
|
2986
3174
|
}
|
|
2987
|
-
function
|
|
2988
|
-
let n =
|
|
2989
|
-
return r &&
|
|
3175
|
+
function yi(e, t) {
|
|
3176
|
+
let n = no(e, Xt(e, v.SDF_PERSIST), t, !1), r = lo(hi(e), null, !1);
|
|
3177
|
+
return r && bl(r) && nl(n, r), oo(hi(e), n);
|
|
2990
3178
|
}
|
|
2991
|
-
function
|
|
2992
|
-
let n =
|
|
2993
|
-
0 ===
|
|
3179
|
+
function Ti(e, t) {
|
|
3180
|
+
let n = ro(e, lo(hi(e), null, !1), t, !1);
|
|
3181
|
+
0 === cl(n) ? io(hi(e)) : oo(hi(e), n);
|
|
2994
3182
|
}
|
|
2995
|
-
function
|
|
2996
|
-
let n =
|
|
2997
|
-
return n &&
|
|
3183
|
+
function vi(e, t) {
|
|
3184
|
+
let n = lo(hi(e), null, !1), r = {};
|
|
3185
|
+
return n && bl(n) && (r = no(e, n, t, !1)), r;
|
|
2998
3186
|
}
|
|
2999
|
-
function
|
|
3000
|
-
if (
|
|
3187
|
+
function Oi(e) {
|
|
3188
|
+
if (pl(e) && 1 === gl(e)) {
|
|
3001
3189
|
let t = e[0];
|
|
3002
|
-
return
|
|
3190
|
+
return Ll(t, "size") ? t.size : 1;
|
|
3003
3191
|
}
|
|
3004
|
-
return
|
|
3192
|
+
return gl(e);
|
|
3005
3193
|
}
|
|
3006
|
-
function
|
|
3007
|
-
if (
|
|
3194
|
+
function Si(e, t) {
|
|
3195
|
+
if (ml(t)) {
|
|
3008
3196
|
if (-1 === t.indexOf("^")) {
|
|
3009
3197
|
let n, r, l = e.fkey;
|
|
3010
|
-
if (1 !==
|
|
3198
|
+
if (1 !== cl(l)) return cr("bad fkey 1"), cr(e), cr(t), null;
|
|
3011
3199
|
for (const e of Object.keys(l)) {
|
|
3012
3200
|
n = e, r = l[e];
|
|
3013
3201
|
break;
|
|
@@ -3027,21 +3215,21 @@ function ci(e, t) {
|
|
|
3027
3215
|
};
|
|
3028
3216
|
}
|
|
3029
3217
|
}
|
|
3030
|
-
return
|
|
3218
|
+
return bl(t) ? {
|
|
3031
3219
|
topic_name: t.topic_name,
|
|
3032
3220
|
id: t.id,
|
|
3033
3221
|
hook_name: t.hook_name
|
|
3034
3222
|
} : (cr("bad fkey 3"), cr(e), cr(t), null);
|
|
3035
3223
|
}
|
|
3036
|
-
function
|
|
3037
|
-
let n =
|
|
3224
|
+
function Ni(e, t) {
|
|
3225
|
+
let n = Si(e, t);
|
|
3038
3226
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
3039
3227
|
}
|
|
3040
|
-
function
|
|
3041
|
-
if (
|
|
3228
|
+
function wi(e, t) {
|
|
3229
|
+
if (ml(t)) {
|
|
3042
3230
|
if (-1 === t.indexOf("^")) {
|
|
3043
3231
|
let n, r = e.hook;
|
|
3044
|
-
if (1 !==
|
|
3232
|
+
if (1 !== cl(r)) return cr("bad hook 1"), cr(e), cr(t), null;
|
|
3045
3233
|
for (let e of Object.keys(r)) {
|
|
3046
3234
|
n = e, r[e];
|
|
3047
3235
|
break;
|
|
@@ -3059,12 +3247,12 @@ function gi(e, t) {
|
|
|
3059
3247
|
};
|
|
3060
3248
|
}
|
|
3061
3249
|
}
|
|
3062
|
-
return
|
|
3250
|
+
return bl(t) ? {
|
|
3063
3251
|
topic_name: t.topic_name,
|
|
3064
3252
|
id: t.id
|
|
3065
3253
|
} : (cr("bad hook 3"), cr(e), cr(t), null);
|
|
3066
3254
|
}
|
|
3067
|
-
var
|
|
3255
|
+
var ji = [
|
|
3068
3256
|
"string",
|
|
3069
3257
|
"integer",
|
|
3070
3258
|
"object",
|
|
@@ -3074,7 +3262,7 @@ var di = [
|
|
|
3074
3262
|
"real",
|
|
3075
3263
|
"boolean",
|
|
3076
3264
|
"blob"
|
|
3077
|
-
],
|
|
3265
|
+
], $i = [
|
|
3078
3266
|
"persistent",
|
|
3079
3267
|
"required",
|
|
3080
3268
|
"notnull",
|
|
@@ -3086,7 +3274,7 @@ var di = [
|
|
|
3086
3274
|
"stats",
|
|
3087
3275
|
"rstats",
|
|
3088
3276
|
"pstats"
|
|
3089
|
-
],
|
|
3277
|
+
], Ri = [
|
|
3090
3278
|
"hook",
|
|
3091
3279
|
"fkey",
|
|
3092
3280
|
"enum",
|
|
@@ -3115,7 +3303,7 @@ var di = [
|
|
|
3115
3303
|
"coordinates",
|
|
3116
3304
|
"gbuffer"
|
|
3117
3305
|
];
|
|
3118
|
-
function
|
|
3306
|
+
function Di(e) {
|
|
3119
3307
|
let t = {
|
|
3120
3308
|
name: e.id,
|
|
3121
3309
|
header: e.header,
|
|
@@ -3134,7 +3322,7 @@ function mi(e) {
|
|
|
3134
3322
|
if (!e.flag) return t;
|
|
3135
3323
|
for (let n = 0; n < e.flag.length; n++) {
|
|
3136
3324
|
let r = e.flag[n];
|
|
3137
|
-
if (
|
|
3325
|
+
if (po(Ri, r)) {
|
|
3138
3326
|
switch (r) {
|
|
3139
3327
|
case "enum":
|
|
3140
3328
|
t.enum_list = e.enum;
|
|
@@ -3148,7 +3336,7 @@ function mi(e) {
|
|
|
3148
3336
|
case "file": t.is_file = !0;
|
|
3149
3337
|
}
|
|
3150
3338
|
t.type = r;
|
|
3151
|
-
} else if (
|
|
3339
|
+
} else if (po($i, r)) switch (r) {
|
|
3152
3340
|
case "writable":
|
|
3153
3341
|
t.is_writable = !0;
|
|
3154
3342
|
break;
|
|
@@ -3161,7 +3349,7 @@ function mi(e) {
|
|
|
3161
3349
|
}
|
|
3162
3350
|
return t.is_file && (t.type = "file"), t;
|
|
3163
3351
|
}
|
|
3164
|
-
function
|
|
3352
|
+
function Ai(e, t) {
|
|
3165
3353
|
let n = {
|
|
3166
3354
|
name: e,
|
|
3167
3355
|
header: e,
|
|
@@ -3175,13 +3363,13 @@ function hi(e, t) {
|
|
|
3175
3363
|
placeholder: void 0,
|
|
3176
3364
|
fkey: null
|
|
3177
3365
|
};
|
|
3178
|
-
if (
|
|
3366
|
+
if (ml(t)) {
|
|
3179
3367
|
let e = t.split(".");
|
|
3180
3368
|
for (let t = 0; t < e.length; t++) {
|
|
3181
3369
|
let r = e[t];
|
|
3182
|
-
if (
|
|
3183
|
-
else if (
|
|
3184
|
-
else if (
|
|
3370
|
+
if (po(ji, r)) n.real_type || (n.real_type = r);
|
|
3371
|
+
else if (po(Ri, r)) n.type || (n.type = r);
|
|
3372
|
+
else if (po($i, r)) switch (r) {
|
|
3185
3373
|
case "writable":
|
|
3186
3374
|
n.is_writable = !0;
|
|
3187
3375
|
break;
|
|
@@ -3193,35 +3381,35 @@ function hi(e, t) {
|
|
|
3193
3381
|
}
|
|
3194
3382
|
}
|
|
3195
3383
|
n.real_type || (n.real_type = "string");
|
|
3196
|
-
} else
|
|
3384
|
+
} else bl(t) ? (n = Di(t), n.name || (n.name = e), n.header || (n.header = e)) : pl(t) && (n.real_type = "array", n.enum_list = t);
|
|
3197
3385
|
return n.type || (n.type = n.real_type), n;
|
|
3198
3386
|
}
|
|
3199
|
-
function
|
|
3387
|
+
function ki(e, t) {
|
|
3200
3388
|
let n = {};
|
|
3201
3389
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
3202
3390
|
let l;
|
|
3203
|
-
|
|
3204
|
-
let o =
|
|
3205
|
-
|
|
3391
|
+
bl(r) && (l = r.default);
|
|
3392
|
+
let o = Jl(null, t, e, l);
|
|
3393
|
+
ol(n, e, o);
|
|
3206
3394
|
}), n;
|
|
3207
3395
|
}
|
|
3208
|
-
var
|
|
3396
|
+
var Ii = [
|
|
3209
3397
|
N(T.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3210
3398
|
N(T.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3211
3399
|
N(T.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3212
3400
|
S()
|
|
3213
|
-
],
|
|
3401
|
+
], Ci = {
|
|
3214
3402
|
periodic: !1,
|
|
3215
3403
|
msec: 0,
|
|
3216
3404
|
timer_id: -1
|
|
3217
|
-
},
|
|
3218
|
-
function
|
|
3405
|
+
}, Li = null;
|
|
3406
|
+
function Pi(e, t, n, r) {
|
|
3219
3407
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3220
3408
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
3221
3409
|
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3222
3410
|
}, l.msec) : l.timer_id = -1, It(e) ? Tn(At(e), o, {}, e) : Pn(e, o, {}), l.periodic || -1 !== l.timer_id || Et(e) && gt(e), 0;
|
|
3223
3411
|
}
|
|
3224
|
-
var
|
|
3412
|
+
var Ui = {
|
|
3225
3413
|
mt_create: function(e) {
|
|
3226
3414
|
let t = e.priv;
|
|
3227
3415
|
const n = nn(e, "subscriber");
|
|
@@ -3246,31 +3434,31 @@ var Si = {
|
|
|
3246
3434
|
},
|
|
3247
3435
|
mt_destroy: function(e) {}
|
|
3248
3436
|
};
|
|
3249
|
-
function
|
|
3437
|
+
function Fi() {
|
|
3250
3438
|
return function(e) {
|
|
3251
|
-
if (
|
|
3439
|
+
if (Li) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3252
3440
|
const t = [["ST_IDLE", [[
|
|
3253
3441
|
"EV_TIMEOUT",
|
|
3254
|
-
|
|
3442
|
+
Pi,
|
|
3255
3443
|
null
|
|
3256
3444
|
]]]];
|
|
3257
|
-
return (
|
|
3445
|
+
return (Li = Ae(e, [
|
|
3258
3446
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
3259
3447
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
3260
3448
|
[0, 0]
|
|
3261
|
-
], t,
|
|
3449
|
+
], t, Ui, 0, Ii, Ci, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
3262
3450
|
}("C_TIMER");
|
|
3263
3451
|
}
|
|
3264
|
-
function
|
|
3452
|
+
function Vi(e, t) {
|
|
3265
3453
|
return e instanceof I ? "C_TIMER" !== $t(e) ? (cr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (cr("not GObj TYPE"), -1);
|
|
3266
3454
|
}
|
|
3267
|
-
function
|
|
3455
|
+
function Gi(e, t) {
|
|
3268
3456
|
return e instanceof I ? "C_TIMER" !== $t(e) ? (cr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (cr("not GObj TYPE"), -1);
|
|
3269
3457
|
}
|
|
3270
|
-
function
|
|
3458
|
+
function Mi(e) {
|
|
3271
3459
|
return e instanceof I ? "C_TIMER" !== $t(e) ? (cr("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (cr("not GObj TYPE"), -1);
|
|
3272
3460
|
}
|
|
3273
|
-
var
|
|
3461
|
+
var Wi = [
|
|
3274
3462
|
N(T.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3275
3463
|
N(T.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3276
3464
|
N(T.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -3290,60 +3478,60 @@ var Ri = [
|
|
|
3290
3478
|
N(T.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3291
3479
|
N(T.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3292
3480
|
S()
|
|
3293
|
-
],
|
|
3294
|
-
function
|
|
3481
|
+
], xi = { gobj_timer: null }, Ki = null;
|
|
3482
|
+
function Yi(e, t, n, r) {
|
|
3295
3483
|
let l = Qt(e, t);
|
|
3296
|
-
return
|
|
3484
|
+
return bl(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
3297
3485
|
}
|
|
3298
|
-
var
|
|
3299
|
-
function
|
|
3486
|
+
var Bi = -2147483648, Ji = 2147483647;
|
|
3487
|
+
function qi(e) {
|
|
3300
3488
|
if (!0 === e || !1 === e) return e;
|
|
3301
|
-
if ("number" == typeof e) return !Number.isInteger(e) || e <
|
|
3489
|
+
if ("number" == typeof e) return !Number.isInteger(e) || e < Bi || e > Ji ? null : 0 !== e;
|
|
3302
3490
|
if ("string" != typeof e || "" === e) return null;
|
|
3303
3491
|
let t = e.toLowerCase();
|
|
3304
3492
|
if ("set" === t) return !0;
|
|
3305
3493
|
if ("reset" === t) return !1;
|
|
3306
3494
|
if (/^-?(0|[1-9][0-9]*)$/.test(e)) {
|
|
3307
3495
|
let t = Number(e);
|
|
3308
|
-
return t <
|
|
3496
|
+
return t < Bi || t > Ji ? null : 0 !== t;
|
|
3309
3497
|
}
|
|
3310
3498
|
return "true" === t || "yes" === t || "on" === t || "false" !== t && "no" !== t && "off" !== t && null;
|
|
3311
3499
|
}
|
|
3312
|
-
function
|
|
3500
|
+
function Hi() {
|
|
3313
3501
|
return `${Nt()}^${St()}`;
|
|
3314
3502
|
}
|
|
3315
|
-
function
|
|
3503
|
+
function zi(e, t, n, r) {
|
|
3316
3504
|
return Pn(e, t, n), 0;
|
|
3317
3505
|
}
|
|
3318
|
-
var
|
|
3506
|
+
var Qi = {
|
|
3319
3507
|
mt_create: function(e) {
|
|
3320
3508
|
let t = e.priv;
|
|
3321
|
-
un(e, "start_date",
|
|
3509
|
+
un(e, "start_date", ei()), un(e, "node_uuid", ri()), e.priv.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.periodic_timeout = Qt(e, "periodic_timeout"), function(e) {
|
|
3322
3510
|
let t = Qt(e, "trace_levels");
|
|
3323
|
-
if (!
|
|
3511
|
+
if (!bl(t)) return 0;
|
|
3324
3512
|
let n = t.__global_trace__;
|
|
3325
|
-
if (
|
|
3513
|
+
if (pl(n)) {
|
|
3326
3514
|
ce(4294967295, !1);
|
|
3327
3515
|
for (let e of n) se(e, !0);
|
|
3328
3516
|
}
|
|
3329
3517
|
for (const [n, r] of Object.entries(t)) {
|
|
3330
3518
|
let t = Me(n);
|
|
3331
|
-
if (t) if (
|
|
3519
|
+
if (t) if (pl(r)) {
|
|
3332
3520
|
Ee(t, null, !1);
|
|
3333
3521
|
for (let e of r) Ee(t, e, !0);
|
|
3334
3522
|
} else cr(`${jt(e)}: trace_levels of ${n} MUST be a list`);
|
|
3335
3523
|
}
|
|
3336
3524
|
}(e), function(e) {
|
|
3337
3525
|
let t = Qt(e, "no_trace_levels");
|
|
3338
|
-
if (!
|
|
3526
|
+
if (!bl(t)) return 0;
|
|
3339
3527
|
let n = t.__global_no_trace__;
|
|
3340
|
-
if (
|
|
3528
|
+
if (pl(n)) {
|
|
3341
3529
|
fe(4294967295, !1);
|
|
3342
3530
|
for (let e of n) ae(e, !0);
|
|
3343
3531
|
}
|
|
3344
3532
|
for (const [n, r] of Object.entries(t)) {
|
|
3345
3533
|
let t = Me(n);
|
|
3346
|
-
if (t) if (
|
|
3534
|
+
if (t) if (pl(r)) {
|
|
3347
3535
|
Te(t, null, !1);
|
|
3348
3536
|
for (let e of r) Te(t, e, !0);
|
|
3349
3537
|
} else cr(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
@@ -3352,10 +3540,10 @@ var Fi = {
|
|
|
3352
3540
|
},
|
|
3353
3541
|
mt_writing: function(e, t) {},
|
|
3354
3542
|
mt_start: function(e) {
|
|
3355
|
-
return
|
|
3543
|
+
return Gi(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
3356
3544
|
},
|
|
3357
3545
|
mt_stop: function(e) {
|
|
3358
|
-
return
|
|
3546
|
+
return Mi(e.priv.gobj_timer), bt(e), 0;
|
|
3359
3547
|
},
|
|
3360
3548
|
mt_destroy: function(e) {},
|
|
3361
3549
|
mt_play: function(e) {
|
|
@@ -3372,35 +3560,35 @@ var Fi = {
|
|
|
3372
3560
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
3373
3561
|
case "set-global-trace":
|
|
3374
3562
|
case "set-global-no-trace": {
|
|
3375
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
3376
|
-
return l ? null === i ? o(0, -1, `${
|
|
3563
|
+
let r = "set-global-no-trace" === t, l = n.level, i = qi(n.set);
|
|
3564
|
+
return l ? null === i ? o(0, -1, `${Hi()}: bitmask set or re-set?`, null, null) : (r ? ae(l, i) : se(l, i)) < 0 ? o(0, -1, `${Hi()}: global trace level not found: ${l}`, null, null) : r ? (Yi(e, "no_trace_levels", "__global_no_trace__", de()), o(0, 0, null, null, de())) : (Yi(e, "trace_levels", "__global_trace__", ge()), o(0, 0, null, null, ge())) : o(0, -1, `${Hi()}: what level?`, null, null);
|
|
3377
3565
|
}
|
|
3378
3566
|
case "get-gclass-trace":
|
|
3379
3567
|
case "get-gclass-no-trace":
|
|
3380
3568
|
case "set-gclass-trace":
|
|
3381
3569
|
case "set-gclass-no-trace": {
|
|
3382
3570
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
3383
|
-
if (!i) return o(0, -1, `${
|
|
3571
|
+
if (!i) return o(0, -1, `${Hi()}: what gclass is '${l}'?`, null, null);
|
|
3384
3572
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
3385
|
-
let s = n.level, a =
|
|
3386
|
-
return s ? null === a ? o(0, -1, `${
|
|
3573
|
+
let s = n.level, a = qi(n.set);
|
|
3574
|
+
return s ? null === a ? o(0, -1, `${Hi()}: bitmask set or re-set?`, null, null) : (r ? Te(i, s, a) : Ee(i, s, a)) < 0 ? o(0, -1, `${Hi()}: trace level of ${l} not found: ${s}`, null, null) : r ? (Yi(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (Yi(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${Hi()}: what level?`, null, null);
|
|
3387
3575
|
}
|
|
3388
|
-
default: return o(0, -1, `${
|
|
3576
|
+
default: return o(0, -1, `${Hi()}: command not available: ${t}`, null, null);
|
|
3389
3577
|
}
|
|
3390
3578
|
}
|
|
3391
3579
|
};
|
|
3392
|
-
function
|
|
3580
|
+
function Xi() {
|
|
3393
3581
|
return function(e) {
|
|
3394
|
-
if (
|
|
3582
|
+
if (Ki) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3395
3583
|
const t = [["ST_IDLE", [[
|
|
3396
3584
|
"EV_TIMEOUT_PERIODIC",
|
|
3397
|
-
|
|
3585
|
+
zi,
|
|
3398
3586
|
null
|
|
3399
3587
|
]]]];
|
|
3400
|
-
return (
|
|
3588
|
+
return (Ki = Ae(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t, Qi, 0, Wi, xi, 0, 0, 0, 0)) ? 0 : -1;
|
|
3401
3589
|
}("C_YUNO");
|
|
3402
3590
|
}
|
|
3403
|
-
var
|
|
3591
|
+
var Zi = "ievent_gate_stack", es = [
|
|
3404
3592
|
N(T.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
3405
3593
|
N(T.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
3406
3594
|
N(T.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3417,15 +3605,15 @@ var Gi = "ievent_gate_stack", Mi = [
|
|
|
3417
3605
|
N(T.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3418
3606
|
N(T.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3419
3607
|
S()
|
|
3420
|
-
],
|
|
3608
|
+
], ts = [
|
|
3421
3609
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3422
3610
|
["ievents2", "Trace inter-events with full kw"],
|
|
3423
3611
|
["identity-card", "Trace identity_card messages"]
|
|
3424
3612
|
];
|
|
3425
|
-
function
|
|
3613
|
+
function ns(e) {
|
|
3426
3614
|
return !!(3 & Z(e));
|
|
3427
3615
|
}
|
|
3428
|
-
var
|
|
3616
|
+
var rs = {
|
|
3429
3617
|
url: null,
|
|
3430
3618
|
remote_yuno_name: null,
|
|
3431
3619
|
remote_yuno_role: null,
|
|
@@ -3435,8 +3623,8 @@ var Ki = {
|
|
|
3435
3623
|
websocket: null,
|
|
3436
3624
|
inside_on_open: !1,
|
|
3437
3625
|
retry_ms: 0
|
|
3438
|
-
},
|
|
3439
|
-
function
|
|
3626
|
+
}, ls = null;
|
|
3627
|
+
function os(e) {
|
|
3440
3628
|
e.priv.websocket && cr("Websocket ALREADY setup");
|
|
3441
3629
|
const t = tn(e, "url");
|
|
3442
3630
|
dr(`====> Starting WebSocket to '${t}' (${Rt(e)})`);
|
|
@@ -3451,7 +3639,7 @@ function Bi(e) {
|
|
|
3451
3639
|
code: 1006,
|
|
3452
3640
|
reason: r.message,
|
|
3453
3641
|
was_clean: !1
|
|
3454
|
-
}, e) < 0 &&
|
|
3642
|
+
}, e) < 0 && Vi(e.priv.gobj_timer, ps(e)), null;
|
|
3455
3643
|
}
|
|
3456
3644
|
return r ? (r.onopen = () => {
|
|
3457
3645
|
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_OPEN", {
|
|
@@ -3473,7 +3661,7 @@ function Bi(e) {
|
|
|
3473
3661
|
}, e));
|
|
3474
3662
|
}, r) : (cr(`${Rt(e)}: Failed to initialize WebSocket.`), null);
|
|
3475
3663
|
}
|
|
3476
|
-
function
|
|
3664
|
+
function is(e, t = 1e3, n = "") {
|
|
3477
3665
|
let r = e.priv, l = r.websocket;
|
|
3478
3666
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3479
3667
|
dr(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -3484,25 +3672,25 @@ function Ji(e, t = 1e3, n = "") {
|
|
|
3484
3672
|
}
|
|
3485
3673
|
} else fr("WebSocket is already closed or in the process of closing.");
|
|
3486
3674
|
}
|
|
3487
|
-
function
|
|
3488
|
-
let r =
|
|
3675
|
+
function ss(e, t, n) {
|
|
3676
|
+
let r = ei();
|
|
3489
3677
|
try {
|
|
3490
|
-
dr("\n" + r + " " + t + "\n"),
|
|
3678
|
+
dr("\n" + r + " " + t + "\n"), zr(n);
|
|
3491
3679
|
} catch (e) {
|
|
3492
3680
|
dr("ERROR in trace_inter_event: " + e);
|
|
3493
3681
|
}
|
|
3494
3682
|
}
|
|
3495
|
-
var
|
|
3683
|
+
var as = class {
|
|
3496
3684
|
constructor(e, t) {
|
|
3497
3685
|
this.event = e, this.kw = t || {};
|
|
3498
3686
|
}
|
|
3499
3687
|
};
|
|
3500
|
-
function
|
|
3688
|
+
function us(e, t, n, r) {
|
|
3501
3689
|
return function(e, t) {
|
|
3502
3690
|
let n = e.priv, r = JSON.stringify(t);
|
|
3503
|
-
if (
|
|
3691
|
+
if (ns(e)) {
|
|
3504
3692
|
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o = Qt(Ot(), "trace_ievent_callback");
|
|
3505
|
-
o ? o(l, t, 1, r.length) :
|
|
3693
|
+
o ? o(l, t, 1, r.length) : ss(0, l, t);
|
|
3506
3694
|
}
|
|
3507
3695
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return fr(`${Rt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3508
3696
|
try {
|
|
@@ -3512,21 +3700,21 @@ function zi(e, t, n, r) {
|
|
|
3512
3700
|
}
|
|
3513
3701
|
return 0;
|
|
3514
3702
|
}(e, function(e, t) {
|
|
3515
|
-
return
|
|
3703
|
+
return Nl(e) ? (cr("iev_create() event NULL"), null) : new as(e, t);
|
|
3516
3704
|
}(t, n));
|
|
3517
3705
|
}
|
|
3518
|
-
function
|
|
3519
|
-
return
|
|
3706
|
+
function _s(e, t, n) {
|
|
3707
|
+
return Nl(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3520
3708
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3521
3709
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3522
3710
|
dst_service: n,
|
|
3523
3711
|
src_yuno: St(),
|
|
3524
3712
|
src_role: Nt(),
|
|
3525
3713
|
src_service: t,
|
|
3526
|
-
host:
|
|
3714
|
+
host: ri()
|
|
3527
3715
|
};
|
|
3528
3716
|
}
|
|
3529
|
-
function
|
|
3717
|
+
function cs(e) {
|
|
3530
3718
|
let t = e.priv, n = vt(Ot()), r = tn(Ot(), "yuno_version"), l = tn(Ot(), "yuno_release"), o = tn(Ot(), "yuno_tag"), i = Qt(e, "required_services");
|
|
3531
3719
|
i && i.length || (i = Qt(Ot(), "required_services"));
|
|
3532
3720
|
let s = {
|
|
@@ -3544,27 +3732,27 @@ function Xi(e) {
|
|
|
3544
3732
|
username: tn(Ot(), "__username__"),
|
|
3545
3733
|
launch_id: 0,
|
|
3546
3734
|
yuno_startdate: tn(Ot(), "start_date"),
|
|
3547
|
-
id:
|
|
3735
|
+
id: ri(),
|
|
3548
3736
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3549
3737
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3550
3738
|
required_services: i
|
|
3551
3739
|
};
|
|
3552
|
-
return
|
|
3740
|
+
return To(e, s, Zi, _s(e, jt(At(e)), null)), Oo(e, s, "__identity__"), Vi(t.gobj_timer, en(e, "timeout_idack")), us(e, "EV_IDENTITY_CARD", s);
|
|
3553
3741
|
}
|
|
3554
|
-
function
|
|
3555
|
-
if (
|
|
3742
|
+
function fs(e, t) {
|
|
3743
|
+
if (Nl(t.event)) return -1;
|
|
3556
3744
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3557
3745
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3558
|
-
return
|
|
3746
|
+
return To(e, n, Zi, _s(e, jt(s), i)), Oo(e, n, "__subscribing__"), us(e, t.event, n);
|
|
3559
3747
|
}
|
|
3560
|
-
function
|
|
3748
|
+
function gs(e, t, n, r) {
|
|
3561
3749
|
let l = e.priv;
|
|
3562
|
-
return Et(e) && (l.websocket =
|
|
3750
|
+
return Et(e) && (l.websocket = os(e)), 0;
|
|
3563
3751
|
}
|
|
3564
|
-
function
|
|
3565
|
-
return dr("Websocket opened: " + e.priv.url),
|
|
3752
|
+
function ds(e, t, n, r) {
|
|
3753
|
+
return dr("Websocket opened: " + e.priv.url), cs(e), 0;
|
|
3566
3754
|
}
|
|
3567
|
-
function
|
|
3755
|
+
function bs(e, t, n, r) {
|
|
3568
3756
|
let l = e.priv, o = n.url;
|
|
3569
3757
|
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (rr(), fr(`${Rt(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), l.websocket && (l.websocket.onopen = null, l.websocket.onmessage = null, l.websocket.onerror = null, l.websocket.onclose = null, l.websocket = null), l.inform_on_close ? (l.inform_on_close = !1, Pn(e, "EV_ON_CLOSE", {
|
|
3570
3758
|
url: o,
|
|
@@ -3579,25 +3767,25 @@ function ns(e, t, n, r) {
|
|
|
3579
3767
|
code: n.code,
|
|
3580
3768
|
reason: n.reason,
|
|
3581
3769
|
was_clean: n.was_clean
|
|
3582
|
-
})), Et(e) &&
|
|
3770
|
+
})), Et(e) && Vi(l.gobj_timer, ps(e))), 0;
|
|
3583
3771
|
}
|
|
3584
|
-
function
|
|
3772
|
+
function ps(e) {
|
|
3585
3773
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3586
3774
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3587
3775
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
3588
3776
|
return Math.max(1, Math.round(o));
|
|
3589
3777
|
}
|
|
3590
|
-
function
|
|
3591
|
-
return
|
|
3778
|
+
function ms(e, t, n, r) {
|
|
3779
|
+
return cs(e), 0;
|
|
3592
3780
|
}
|
|
3593
|
-
function
|
|
3781
|
+
function hs(e, t, n, r) {
|
|
3594
3782
|
let l = e.priv;
|
|
3595
|
-
|
|
3596
|
-
let o =
|
|
3783
|
+
Mi(l.gobj_timer);
|
|
3784
|
+
let o = vo(e, n, Zi, !0), i = Kl(e, o, "src_yuno", ""), s = Kl(e, o, "src_role", ""), a = Kl(e, o, "src_service", "");
|
|
3597
3785
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3598
|
-
let u =
|
|
3786
|
+
let u = Wl(e, n, "result", -1, 0), _ = Kl(e, n, "comment", "", 0), c = Kl(e, n, "username", "", 0), f = Jl(e, n, "services_roles", {});
|
|
3599
3787
|
if (u < 0) {
|
|
3600
|
-
|
|
3788
|
+
is(e);
|
|
3601
3789
|
let t = {
|
|
3602
3790
|
url: tn(e, "url"),
|
|
3603
3791
|
result: u,
|
|
@@ -3622,12 +3810,12 @@ function os(e, t, n, r) {
|
|
|
3622
3810
|
}
|
|
3623
3811
|
l.inside_on_open = !1, function(e) {
|
|
3624
3812
|
let t = In(e, null, null, null);
|
|
3625
|
-
for (let n = 0; n < t.length; n++)
|
|
3813
|
+
for (let n = 0; n < t.length; n++) fs(e, t[n]);
|
|
3626
3814
|
}(e);
|
|
3627
3815
|
}
|
|
3628
3816
|
return 0;
|
|
3629
3817
|
}
|
|
3630
|
-
function
|
|
3818
|
+
function Es(e, t, n, r) {
|
|
3631
3819
|
let l = e.priv.url, o = function(e, t) {
|
|
3632
3820
|
let n;
|
|
3633
3821
|
try {
|
|
@@ -3646,37 +3834,37 @@ function is(e, t, n, r) {
|
|
|
3646
3834
|
} : (fr(`${Rt(e)}: parsing inter_event: kw not a json object`), null) : (fr(`${Rt(e)}: parsing inter_kw: no kw`), null);
|
|
3647
3835
|
}(e, n.data);
|
|
3648
3836
|
if (!o) return fr(`${Rt(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
3649
|
-
if (
|
|
3837
|
+
if (ns(e)) {
|
|
3650
3838
|
let e = jt(Ot()) + " <== " + l, t = n.data.length, r = Qt(Ot(), "trace_ievent_callback");
|
|
3651
|
-
r ? r(e, o, 2, t) :
|
|
3839
|
+
r ? r(e, o, 2, t) : ss(0, e, o);
|
|
3652
3840
|
}
|
|
3653
3841
|
let i = o.event, s = o.kw;
|
|
3654
3842
|
if ("ST_SESSION" !== cn(e)) {
|
|
3655
3843
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3656
3844
|
if (!(Tn(e, i, s, e) < 0)) return 0;
|
|
3657
3845
|
} else cr(`${Rt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3658
|
-
return
|
|
3846
|
+
return is(e), -1;
|
|
3659
3847
|
}
|
|
3660
3848
|
o = null;
|
|
3661
|
-
let a =
|
|
3849
|
+
let a = So(e, s), u = vo(e, s, Zi), _ = Kl(e, u, "dst_role", "");
|
|
3662
3850
|
if (_.toLowerCase() !== Nt().toLowerCase()) return cr(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3663
|
-
let c =
|
|
3851
|
+
let c = Kl(e, u, "dst_service", "");
|
|
3664
3852
|
if ("__subscribing__" === a) return fr(`${Rt(e)}: subscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3665
3853
|
if ("__unsubscribing__" === a) return fr(`${Rt(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3666
3854
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return Tn(e, i, s, e), 0;
|
|
3667
|
-
if (!
|
|
3855
|
+
if (!Nl(c)) {
|
|
3668
3856
|
let t = Ke(c, !1);
|
|
3669
3857
|
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (Tn(t, i, s, e), 0) : (cr(`${Rt(e)}: Service found but no event or not public, service '${Rt(t)}', ev '${i}'`), -1) : (fr(`${Rt(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3670
3858
|
}
|
|
3671
3859
|
return It(e) ? Tn(At(e), i, s, e) : Pn(e, i, s), 0;
|
|
3672
3860
|
}
|
|
3673
|
-
function
|
|
3861
|
+
function ys(e, t, n, r) {
|
|
3674
3862
|
return 0;
|
|
3675
3863
|
}
|
|
3676
|
-
function
|
|
3864
|
+
function Ts(e, t, n, r) {
|
|
3677
3865
|
return 0;
|
|
3678
3866
|
}
|
|
3679
|
-
var
|
|
3867
|
+
var vs = {
|
|
3680
3868
|
mt_create: function(e) {
|
|
3681
3869
|
let t = e.priv;
|
|
3682
3870
|
t.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = tn(e, "url"), t.remote_yuno_name = tn(e, "remote_yuno_name"), t.remote_yuno_role = tn(e, "remote_yuno_role"), t.remote_yuno_service = tn(e, "remote_yuno_service"), un(e, "wanted_yuno_name", t.remote_yuno_name), un(e, "wanted_yuno_role", t.remote_yuno_role), un(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -3706,72 +3894,72 @@ var us = {
|
|
|
3706
3894
|
code: 1e3,
|
|
3707
3895
|
reason: "restarted",
|
|
3708
3896
|
was_clean: !0
|
|
3709
|
-
}, e),
|
|
3897
|
+
}, e), Mi(t.gobj_timer)), t.websocket = os(e), 0;
|
|
3710
3898
|
},
|
|
3711
3899
|
mt_stop: function(e) {
|
|
3712
3900
|
let t = e.priv;
|
|
3713
|
-
return
|
|
3901
|
+
return Mi(t.gobj_timer), t.websocket && is(e), 0;
|
|
3714
3902
|
},
|
|
3715
3903
|
mt_destroy: function(e) {},
|
|
3716
3904
|
mt_stats: function(e, t, n, r) {
|
|
3717
3905
|
if ("ST_SESSION" !== cn(e)) return cr("Not in session"), null;
|
|
3718
3906
|
n || (n = {});
|
|
3719
|
-
let l =
|
|
3720
|
-
return o || (o = {}),
|
|
3907
|
+
let l = _s(e, jt(r), Kl(e, n, "service", null, 0)), o = Jl(e, n, "__md_stats__", null, Vn.KW_EXTRACT);
|
|
3908
|
+
return o || (o = {}), To(e, n, "stats_stack", {
|
|
3721
3909
|
stats: t,
|
|
3722
3910
|
kw: o
|
|
3723
|
-
}),
|
|
3911
|
+
}), To(e, n, Zi, l), n.__stats__ = t, Oo(e, n, "__stats__"), us(e, "EV_MT_STATS", n, r), null;
|
|
3724
3912
|
},
|
|
3725
3913
|
mt_command_parser: function(e, t, n, r) {
|
|
3726
3914
|
if ("ST_SESSION" !== cn(e)) return cr("Not in session"), null;
|
|
3727
3915
|
n || (n = {});
|
|
3728
|
-
let l =
|
|
3729
|
-
return o || (o = {}),
|
|
3916
|
+
let l = _s(e, jt(r), Kl(e, n, "service", "", 0)), o = Jl(e, n, "__md_command__", null, Vn.KW_EXTRACT);
|
|
3917
|
+
return o || (o = {}), To(e, n, "command_stack", {
|
|
3730
3918
|
command: t,
|
|
3731
3919
|
kw: o
|
|
3732
|
-
}),
|
|
3920
|
+
}), To(e, n, Zi, l), n.__command__ = t, Oo(e, n, "__command__"), us(e, "EV_MT_COMMAND", n, r), null;
|
|
3733
3921
|
},
|
|
3734
3922
|
mt_inject_event: function(e, t, n, r) {
|
|
3735
3923
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3736
|
-
if (n =
|
|
3924
|
+
if (n = el({}, bl(n) ? n : {}), bl(n.__md_iev__) && (n.__md_iev__ = Qr(n.__md_iev__)), vo(e, n, Zi));
|
|
3737
3925
|
else {
|
|
3738
|
-
let l =
|
|
3739
|
-
|
|
3926
|
+
let l = _s(e, jt(r), Kl(e, n, "__service__", 0, 0));
|
|
3927
|
+
ll(n, "__service__"), To(e, n, "__message__", t), To(e, n, Zi, l);
|
|
3740
3928
|
}
|
|
3741
|
-
return
|
|
3929
|
+
return Oo(e, n, "__message__"), us(e, t, n, r);
|
|
3742
3930
|
},
|
|
3743
3931
|
mt_subscription_added: function(e, t) {
|
|
3744
3932
|
let n = e.priv;
|
|
3745
|
-
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3933
|
+
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 : fs(e, t) : 0;
|
|
3746
3934
|
},
|
|
3747
3935
|
mt_subscription_deleted: function(e, t) {
|
|
3748
3936
|
let n = e.priv;
|
|
3749
3937
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3750
3938
|
if (n.inside_on_open) return 0;
|
|
3751
|
-
if (
|
|
3939
|
+
if (Nl(t.event)) return 0;
|
|
3752
3940
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3753
3941
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3754
|
-
return
|
|
3942
|
+
return To(e, r, Zi, _s(e, jt(a), s)), Oo(e, r, "__unsubscribing__"), us(e, t.event, r, e);
|
|
3755
3943
|
}
|
|
3756
3944
|
};
|
|
3757
|
-
function
|
|
3945
|
+
function Os() {
|
|
3758
3946
|
return function(e) {
|
|
3759
|
-
if (
|
|
3947
|
+
if (ls) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3760
3948
|
const t = [
|
|
3761
3949
|
["ST_DISCONNECTED", [
|
|
3762
3950
|
[
|
|
3763
3951
|
"EV_ON_OPEN",
|
|
3764
|
-
|
|
3952
|
+
ds,
|
|
3765
3953
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3766
3954
|
],
|
|
3767
3955
|
[
|
|
3768
3956
|
"EV_ON_CLOSE",
|
|
3769
|
-
|
|
3957
|
+
bs,
|
|
3770
3958
|
null
|
|
3771
3959
|
],
|
|
3772
3960
|
[
|
|
3773
3961
|
"EV_TIMEOUT",
|
|
3774
|
-
|
|
3962
|
+
gs,
|
|
3775
3963
|
null
|
|
3776
3964
|
],
|
|
3777
3965
|
[
|
|
@@ -3783,22 +3971,22 @@ function _s() {
|
|
|
3783
3971
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3784
3972
|
[
|
|
3785
3973
|
"EV_ON_MESSAGE",
|
|
3786
|
-
|
|
3974
|
+
Es,
|
|
3787
3975
|
null
|
|
3788
3976
|
],
|
|
3789
3977
|
[
|
|
3790
3978
|
"EV_IDENTITY_CARD_ACK",
|
|
3791
|
-
|
|
3979
|
+
hs,
|
|
3792
3980
|
null
|
|
3793
3981
|
],
|
|
3794
3982
|
[
|
|
3795
3983
|
"EV_ON_CLOSE",
|
|
3796
|
-
|
|
3984
|
+
bs,
|
|
3797
3985
|
"ST_DISCONNECTED"
|
|
3798
3986
|
],
|
|
3799
3987
|
[
|
|
3800
3988
|
"EV_TIMEOUT",
|
|
3801
|
-
|
|
3989
|
+
ms,
|
|
3802
3990
|
null
|
|
3803
3991
|
],
|
|
3804
3992
|
[
|
|
@@ -3810,22 +3998,22 @@ function _s() {
|
|
|
3810
3998
|
["ST_SESSION", [
|
|
3811
3999
|
[
|
|
3812
4000
|
"EV_ON_MESSAGE",
|
|
3813
|
-
|
|
4001
|
+
Es,
|
|
3814
4002
|
null
|
|
3815
4003
|
],
|
|
3816
4004
|
[
|
|
3817
4005
|
"EV_MT_STATS",
|
|
3818
|
-
|
|
4006
|
+
ys,
|
|
3819
4007
|
null
|
|
3820
4008
|
],
|
|
3821
4009
|
[
|
|
3822
4010
|
"EV_MT_COMMAND",
|
|
3823
|
-
|
|
4011
|
+
Ts,
|
|
3824
4012
|
null
|
|
3825
4013
|
],
|
|
3826
4014
|
[
|
|
3827
4015
|
"EV_ON_CLOSE",
|
|
3828
|
-
|
|
4016
|
+
bs,
|
|
3829
4017
|
"ST_DISCONNECTED"
|
|
3830
4018
|
],
|
|
3831
4019
|
[
|
|
@@ -3836,7 +4024,7 @@ function _s() {
|
|
|
3836
4024
|
]],
|
|
3837
4025
|
[null, null]
|
|
3838
4026
|
];
|
|
3839
|
-
return (
|
|
4027
|
+
return (ls = Ae(e, [
|
|
3840
4028
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3841
4029
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3842
4030
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3847,9 +4035,9 @@ function _s() {
|
|
|
3847
4035
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3848
4036
|
["EV_TIMEOUT", 0],
|
|
3849
4037
|
[null, 0]
|
|
3850
|
-
], t,
|
|
4038
|
+
], t, vs, 0, es, rs, 0, 0, ts, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3851
4039
|
}("C_IEVENT_CLI");
|
|
3852
4040
|
}
|
|
3853
|
-
export { I as GObj, N as SDATA, R as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, $ as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response,
|
|
4041
|
+
export { I as GObj, N as SDATA, R as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, $ as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response, si as build_path, s as build_stats_response, li as clean_name, Mi as clear_timeout, Dl as cmp_two_simple_json, l as command_parser, Ho as createElement2, qo as createOneHtml, Lo as create_json_record, ki as create_template_record, ei as current_timestamp, T as data_type_t, vi as db_list_persistent_attrs, Ei as db_load_persistent_attrs, Ti as db_remove_persistent_attrs, yi as db_save_persistent_attrs, ii as debounce, ho as delete_from_list, Xr as duplicate_objects, dl as empty_json, Nl as empty_string, Fo as escapeHtml, U as event_flag_t, di as flat2json, mi as flat_apply, pi as flat_diff, ci as flat_key_join, fi as flat_key_split, Pe as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ge as gclass_check_fsm, Ae as gclass_create, Ve as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, ke as gclass_unregister, zo as getPositionRelativeToBody, oi as get_function_name, ti as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Un as gobj_command, it as gobj_create, et as gobj_create2, rt as gobj_create_default_service, ot as gobj_create_pure_child, nt as gobj_create_service, lt as gobj_create_volatil, tt as gobj_create_yuno, cn as gobj_current_state, xe as gobj_default_service, yn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, Kt as gobj_find_gobj, Ke as gobj_find_service, Ln as gobj_find_subscribings, In as gobj_find_subscriptions, L as gobj_flag_t, Dt as gobj_full_name, $t 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, zt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, $e as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, It as gobj_is_pure_child, Et as gobj_is_running, Tt as gobj_is_service, kt as gobj_is_volatil, Qe as gobj_list_persistent_attrs, Cn as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, jt as gobj_name, At as gobj_parent, ht as gobj_pause, mt as gobj_play, hn as gobj_post_event, En as gobj_posted_events_size, Pn as gobj_publish_event, Qt 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, ze as gobj_remove_persistent_attrs, Oe as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, Tn as gobj_send_event, We as gobj_services, Pt as gobj_set_bottom_gobj, he as gobj_set_deep_trace, Te as gobj_set_gclass_no_trace, Ee as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, ye as gobj_set_gobj_trace, x as gobj_set_trace_machine_format, Rt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Se as gobj_start_up, Fn as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, Dn as gobj_subscribe_event, Z as gobj_trace_level, K as gobj_trace_machine_format, ee as gobj_trace_no_level, An as gobj_unsubscribe_event, kn as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Vt as gobj_walk_gobj_children_tree, rn as gobj_write_attr, on as gobj_write_attrs, sn as gobj_write_bool_attr, an as gobj_write_integer_attr, un as gobj_write_str_attr, Ot as gobj_yuno, wt as gobj_yuno_id, St as gobj_yuno_name, Nt as gobj_yuno_role, Mo as html_markup, bo as id_index_in_obj_list, ni as index_in_list, pl as is_array, El as is_boolean, vl as is_date, Ol as is_function, Sl as is_gobj, Wo as is_html_markup, kl as is_metadata_key, yl as is_null, hl as is_number, bl as is_object, Il as is_private_key, Tl as is_pure_number, Tr as is_secret_name, ml as is_string, Do as jdb_delete, ko as jdb_get, Io as jdb_get_by_idx, Ao as jdb_get_topic, $o as jdb_init, Ro as jdb_update, gi as json2flat, sl as json_array_append, al as json_array_append_new, _l as json_array_extend, ul as json_array_remove, fl as json_array_size, Qr as json_deep_copy, Zr as json_is_identical, Hr as json_mask_secrets, ll as json_object_del, rl as json_object_get, ol as json_object_set, il as json_object_set_new, cl as json_object_size, el as json_object_update, tl as json_object_update_existing, nl as json_object_update_missing, gl as json_size, Uo as jwt2json, Po as jwtDecode, no as kw_clone_by_keys, ro as kw_clone_by_not_keys, to as kw_collect, Gl as kw_delete, Zl as kw_find_json_in_list, Vl as kw_find_path, Vn as kw_flag_t, Ml as kw_get_bool, Bl as kw_get_dict, Jl as kw_get_dict_value, Wl as kw_get_int, ql as kw_get_list, lo as kw_get_local_storage_value, Yl as kw_get_pointer, xl as kw_get_real, Kl as kw_get_str, Ll as kw_has_key, Xl as kw_match_simple, Cl as kw_pop, io as kw_remove_local_storage_value, eo as kw_select, Hl as kw_set_dict_value, oo as kw_set_local_storage_value, zl as kw_set_subdict_value, ao as kwid_collect, co as kwid_find_one_record, fo as kwid_get_ids, so as kwid_match_id, uo as kwid_new_dict, _o as kwid_new_list, go as list2options, No as load_json_file, dr as log_debug, cr as log_error, gr as log_info, fr as log_warning, Kr as mask_secrets_inline, So as msg_iev_get_msg_type, vo as msg_iev_get_stack, To as msg_iev_push_stack, Eo as msg_iev_read_key, Oo as msg_iev_set_msg_type, yo as msg_iev_write_key, ri as node_uuid, wl as parseBoolean, Qo as parseSVG, Xo as refresh_language, Os as register_c_ievent_cli, Fi as register_c_timer, Xi as register_c_yuno, Vo as safeSrc, v as sdata_flag_t, wo as send_http_json_post, zn as set_console_log_enabled, Xn as set_console_log_filter, qn as set_log_callback, rr as set_remote_log_functions, Bo as set_strings_are_text, Vi as set_timeout, Gi as set_timeout_periodic, t as sprintf, i as stats_parser, po as str_in_list, Rl as strcasecmp, $l as strcmp, Jo as strings_are_text, jl as strncmp, mo as strs_in_list, Al as strstr, Ai as template_get_field_desc, Zo as timeTracker, pr as trace_json, zr as trace_json_masked, B as trace_level_t, br as trace_msg, Si as treedb_decoder_fkey, wi as treedb_decoder_hook, Ni as treedb_encoder_fkey, Di as treedb_get_field_desc, Oi as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3854
4042
|
|
|
3855
4043
|
//# sourceMappingURL=gobj-js.es.min.js.map
|