@yuneta/gobj-js 7.26.19 → 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 +29 -1
- package/dist/gobj-js.cjs.js +369 -40
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +988 -749
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +369 -40
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +977 -738
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +369 -40
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1163 -924
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +369 -40
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +1163 -924
- 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",
|
|
@@ -1676,6 +1676,10 @@ var mr = [
|
|
|
1676
1676
|
"sessionkey",
|
|
1677
1677
|
"authdata"
|
|
1678
1678
|
], Er = /* @__PURE__ */ new Set([
|
|
1679
|
+
"pass",
|
|
1680
|
+
"pin",
|
|
1681
|
+
"otp"
|
|
1682
|
+
]), yr = /* @__PURE__ */ new Set([
|
|
1679
1683
|
"endpoint",
|
|
1680
1684
|
"url",
|
|
1681
1685
|
"uri",
|
|
@@ -1699,13 +1703,19 @@ var mr = [
|
|
|
1699
1703
|
"expires",
|
|
1700
1704
|
"mode"
|
|
1701
1705
|
]);
|
|
1702
|
-
function
|
|
1706
|
+
function Tr(e) {
|
|
1703
1707
|
if ("string" != typeof e || e.length < 3) return !1;
|
|
1704
1708
|
let t = e.toLowerCase(), n = !1;
|
|
1705
|
-
for (const e of
|
|
1709
|
+
for (const e of t.split(/[^a-z0-9]+/)) if (Er.has(e)) {
|
|
1706
1710
|
n = !0;
|
|
1707
1711
|
break;
|
|
1708
1712
|
}
|
|
1713
|
+
if (!n) {
|
|
1714
|
+
for (const e of mr) if (t.indexOf(e) >= 0) {
|
|
1715
|
+
n = !0;
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1709
1719
|
if (!n) {
|
|
1710
1720
|
let e = t.replace(/[_\-. \t]/g, "");
|
|
1711
1721
|
for (const t of hr) if (e.indexOf(t) >= 0) {
|
|
@@ -1714,10 +1724,10 @@ function yr(e) {
|
|
|
1714
1724
|
}
|
|
1715
1725
|
}
|
|
1716
1726
|
if (n || (n = t.indexOf("priv") >= 0 && t.indexOf("key") >= 0), !n) return !1;
|
|
1717
|
-
for (const e of t.split(/[_\-. \t]/)) if (
|
|
1727
|
+
for (const e of t.split(/[_\-. \t]/)) if (yr.has(e)) return !1;
|
|
1718
1728
|
return !0;
|
|
1719
1729
|
}
|
|
1720
|
-
function
|
|
1730
|
+
function vr(e, t, n) {
|
|
1721
1731
|
const r = (e) => " " === e || " " === e, l = (t) => n && e[t] === n && (t + 1 >= e.length || r(e[t + 1]));
|
|
1722
1732
|
let o = t;
|
|
1723
1733
|
for (;;) {
|
|
@@ -1733,46 +1743,266 @@ function Tr(e, t, n) {
|
|
|
1733
1743
|
o = t;
|
|
1734
1744
|
}
|
|
1735
1745
|
}
|
|
1736
|
-
var
|
|
1746
|
+
var Or = 8, Sr = 24;
|
|
1737
1747
|
function Nr(e) {
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
+
return e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
1749
|
+
}
|
|
1750
|
+
function wr(e) {
|
|
1751
|
+
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
1752
|
+
}
|
|
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) {
|
|
1768
|
+
if (e.length - t < 3 || "e" !== e[t] || "y" !== e[t + 1] || "J" !== e[t + 2]) return 0;
|
|
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;
|
|
1897
|
+
}
|
|
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;
|
|
1748
1919
|
continue;
|
|
1749
1920
|
}
|
|
1750
|
-
if ("\"" !==
|
|
1751
|
-
|
|
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++;
|
|
1752
1930
|
continue;
|
|
1753
1931
|
}
|
|
1754
|
-
|
|
1755
|
-
if (
|
|
1756
|
-
|
|
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++;
|
|
1757
1935
|
continue;
|
|
1758
1936
|
}
|
|
1759
|
-
|
|
1760
|
-
|
|
1937
|
+
let c;
|
|
1938
|
+
s++;
|
|
1939
|
+
const f = s < e.length && ("\"" === e[s] || "'" === e[s]) ? e[s] : "";
|
|
1761
1940
|
if (f) {
|
|
1762
|
-
for (c =
|
|
1763
|
-
e[c] === f && c++;
|
|
1764
|
-
} else c =
|
|
1765
|
-
|
|
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;
|
|
1766
1945
|
}
|
|
1767
|
-
return i ? (l.push(e.substring(o)), l.join("")) : null;
|
|
1768
1946
|
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
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) {
|
|
1772
2002
|
if ("string" == typeof e) {
|
|
1773
|
-
if (e.length > r.left) return r.left = 0,
|
|
2003
|
+
if (e.length > r.left) return r.left = 0, Mr;
|
|
1774
2004
|
r.left -= e.length;
|
|
1775
|
-
let t =
|
|
2005
|
+
let t = Kr(e.indexOf("\0") >= 0 ? e.replace(/\u0000/g, " ") : e);
|
|
1776
2006
|
return null !== t ? t : e;
|
|
1777
2007
|
}
|
|
1778
2008
|
let l = Array.isArray(e);
|
|
@@ -1781,13 +2011,13 @@ function Rr(e, t, n, r) {
|
|
|
1781
2011
|
let t = Object.getPrototypeOf(e);
|
|
1782
2012
|
return t === Object.prototype || null === t;
|
|
1783
2013
|
}(e)) return e;
|
|
1784
|
-
if (r.left <= 0) return
|
|
2014
|
+
if (r.left <= 0) return Mr;
|
|
1785
2015
|
if (t.has(e)) {
|
|
1786
2016
|
let n = t.get(e);
|
|
1787
|
-
return n ===
|
|
2017
|
+
return n === Jr ? "<cycle>" : n;
|
|
1788
2018
|
}
|
|
1789
|
-
if (n >=
|
|
1790
|
-
r.left -= 1, t.set(e,
|
|
2019
|
+
if (n >= Yr) return "<deeper not shown>";
|
|
2020
|
+
r.left -= 1, t.set(e, Jr);
|
|
1791
2021
|
let o, i = !1, s = !1;
|
|
1792
2022
|
if (l) {
|
|
1793
2023
|
o = [];
|
|
@@ -1797,13 +2027,13 @@ function Rr(e, t, n, r) {
|
|
|
1797
2027
|
break;
|
|
1798
2028
|
}
|
|
1799
2029
|
r.left -= 1;
|
|
1800
|
-
let a =
|
|
2030
|
+
let a = qr(e[l], t, n + 1, r);
|
|
1801
2031
|
a !== e[l] && (i = !0), o.push(a);
|
|
1802
2032
|
}
|
|
1803
|
-
s && o.push(
|
|
2033
|
+
s && o.push(Mr);
|
|
1804
2034
|
} else {
|
|
1805
2035
|
o = Object.create(Object.getPrototypeOf(e));
|
|
1806
|
-
let l = "string" == typeof e.attribute &&
|
|
2036
|
+
let l = "string" == typeof e.attribute && Tr(e.attribute.slice(-128));
|
|
1807
2037
|
for (const a in e) {
|
|
1808
2038
|
if (!Object.prototype.hasOwnProperty.call(e, a)) continue;
|
|
1809
2039
|
if (r.left <= 0) {
|
|
@@ -1812,38 +2042,38 @@ function Rr(e, t, n, r) {
|
|
|
1812
2042
|
}
|
|
1813
2043
|
r.left -= 1 + a.length;
|
|
1814
2044
|
let u, _ = e[a];
|
|
1815
|
-
u = (
|
|
2045
|
+
u = (Tr(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" : qr(_, t, n + 1, r), u !== _ && (i = !0), Ul(o, a, u);
|
|
1816
2046
|
}
|
|
1817
|
-
s && (o["<more>"] =
|
|
2047
|
+
s && (o["<more>"] = Mr);
|
|
1818
2048
|
}
|
|
1819
2049
|
return i || s || (o = e), t.set(e, o), o;
|
|
1820
2050
|
}
|
|
1821
|
-
function
|
|
2051
|
+
function Hr(e) {
|
|
1822
2052
|
try {
|
|
1823
|
-
return
|
|
2053
|
+
return qr(e, /* @__PURE__ */ new WeakMap(), 0, { left: Gr });
|
|
1824
2054
|
} catch (e) {
|
|
1825
|
-
return
|
|
2055
|
+
return Br;
|
|
1826
2056
|
}
|
|
1827
2057
|
}
|
|
1828
|
-
function
|
|
1829
|
-
pr(
|
|
2058
|
+
function zr(e, t) {
|
|
2059
|
+
pr(Hr(e), t);
|
|
1830
2060
|
}
|
|
1831
|
-
function
|
|
2061
|
+
function Qr(e) {
|
|
1832
2062
|
return structuredClone(e);
|
|
1833
2063
|
}
|
|
1834
|
-
function
|
|
2064
|
+
function Xr(...e) {
|
|
1835
2065
|
const t = {};
|
|
1836
|
-
for (const n of e)
|
|
2066
|
+
for (const n of e) el(t, structuredClone(n));
|
|
1837
2067
|
return t;
|
|
1838
2068
|
}
|
|
1839
|
-
function
|
|
2069
|
+
function Zr(e, t) {
|
|
1840
2070
|
if (e === t) return !0;
|
|
1841
2071
|
if (null === e || null === t) return e === t;
|
|
1842
2072
|
if (typeof e != typeof t) return !1;
|
|
1843
2073
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1844
2074
|
if (Array.isArray(e)) {
|
|
1845
2075
|
if (e.length !== t.length) return !1;
|
|
1846
|
-
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;
|
|
1847
2077
|
return !0;
|
|
1848
2078
|
}
|
|
1849
2079
|
if ("object" == typeof e) {
|
|
@@ -1851,153 +2081,153 @@ function Cr(e, t) {
|
|
|
1851
2081
|
if (n.length !== r.length) return !1;
|
|
1852
2082
|
for (let l = 0; l < n.length; l++) {
|
|
1853
2083
|
if (n[l] !== r[l]) return !1;
|
|
1854
|
-
if (!
|
|
2084
|
+
if (!Zr(e[n[l]], t[r[l]])) return !1;
|
|
1855
2085
|
}
|
|
1856
2086
|
return !0;
|
|
1857
2087
|
}
|
|
1858
2088
|
return e === t;
|
|
1859
2089
|
}
|
|
1860
|
-
function
|
|
2090
|
+
function el(e, t) {
|
|
1861
2091
|
if (!t) return e;
|
|
1862
|
-
for (let n of Object.keys(t))
|
|
2092
|
+
for (let n of Object.keys(t)) Ul(e, n, t[n]);
|
|
1863
2093
|
return e;
|
|
1864
2094
|
}
|
|
1865
|
-
function
|
|
2095
|
+
function tl(e, t) {
|
|
1866
2096
|
if (!t) return e;
|
|
1867
|
-
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]);
|
|
1868
2098
|
return e;
|
|
1869
2099
|
}
|
|
1870
|
-
function
|
|
2100
|
+
function nl(e, t) {
|
|
1871
2101
|
if (!t) return e;
|
|
1872
|
-
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]);
|
|
1873
2103
|
return e;
|
|
1874
2104
|
}
|
|
1875
|
-
function
|
|
2105
|
+
function rl(e, t) {
|
|
1876
2106
|
if (e && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
1877
2107
|
}
|
|
1878
|
-
function
|
|
2108
|
+
function ll(e, t) {
|
|
1879
2109
|
e && Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
|
|
1880
2110
|
}
|
|
1881
|
-
function
|
|
1882
|
-
|
|
2111
|
+
function ol(e, t, n) {
|
|
2112
|
+
Ul(e, t, n);
|
|
1883
2113
|
}
|
|
1884
|
-
function
|
|
1885
|
-
|
|
2114
|
+
function il(e, t, n) {
|
|
2115
|
+
Ul(e, t, n);
|
|
1886
2116
|
}
|
|
1887
|
-
function
|
|
2117
|
+
function sl(e, t) {
|
|
1888
2118
|
e.push(t);
|
|
1889
2119
|
}
|
|
1890
|
-
function
|
|
2120
|
+
function al(e, t) {
|
|
1891
2121
|
e.push(t);
|
|
1892
2122
|
}
|
|
1893
|
-
function
|
|
2123
|
+
function ul(e, t) {
|
|
1894
2124
|
e.splice(t, 1);
|
|
1895
2125
|
}
|
|
1896
|
-
function
|
|
2126
|
+
function _l(e, t) {
|
|
1897
2127
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1898
2128
|
}
|
|
1899
|
-
function
|
|
1900
|
-
return
|
|
2129
|
+
function cl(e) {
|
|
2130
|
+
return bl(e) ? Object.keys(e).length : 0;
|
|
1901
2131
|
}
|
|
1902
|
-
function
|
|
1903
|
-
return
|
|
2132
|
+
function fl(e) {
|
|
2133
|
+
return pl(e) ? e.length : 0;
|
|
1904
2134
|
}
|
|
1905
|
-
function
|
|
1906
|
-
return
|
|
2135
|
+
function gl(e) {
|
|
2136
|
+
return bl(e) ? Object.keys(e).length : pl(e) ? e.length : ml(e) && e.length > 0 ? 1 : 0;
|
|
1907
2137
|
}
|
|
1908
|
-
function
|
|
1909
|
-
return 0 ===
|
|
2138
|
+
function dl(e) {
|
|
2139
|
+
return 0 === gl(e);
|
|
1910
2140
|
}
|
|
1911
|
-
function
|
|
2141
|
+
function bl(e) {
|
|
1912
2142
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1913
2143
|
}
|
|
1914
|
-
function
|
|
2144
|
+
function pl(e) {
|
|
1915
2145
|
return Array.isArray(e);
|
|
1916
2146
|
}
|
|
1917
|
-
function
|
|
2147
|
+
function ml(e) {
|
|
1918
2148
|
return "string" == typeof e;
|
|
1919
2149
|
}
|
|
1920
|
-
function
|
|
2150
|
+
function hl(e) {
|
|
1921
2151
|
return "number" == typeof e && Number.isFinite(e);
|
|
1922
2152
|
}
|
|
1923
|
-
function
|
|
2153
|
+
function El(e) {
|
|
1924
2154
|
return "boolean" == typeof e;
|
|
1925
2155
|
}
|
|
1926
|
-
function
|
|
2156
|
+
function yl(e) {
|
|
1927
2157
|
return null == e;
|
|
1928
2158
|
}
|
|
1929
|
-
function
|
|
1930
|
-
if (
|
|
1931
|
-
if (!
|
|
2159
|
+
function Tl(e) {
|
|
2160
|
+
if (hl(e)) return !0;
|
|
2161
|
+
if (!ml(e)) return !1;
|
|
1932
2162
|
const t = Number(e);
|
|
1933
2163
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1934
2164
|
}
|
|
1935
|
-
function
|
|
2165
|
+
function vl(e) {
|
|
1936
2166
|
return e instanceof Date && !isNaN(e);
|
|
1937
2167
|
}
|
|
1938
|
-
function
|
|
2168
|
+
function Ol(e) {
|
|
1939
2169
|
return "function" == typeof e;
|
|
1940
2170
|
}
|
|
1941
|
-
function
|
|
2171
|
+
function Sl(e) {
|
|
1942
2172
|
return e instanceof I;
|
|
1943
2173
|
}
|
|
1944
|
-
function
|
|
1945
|
-
return !
|
|
2174
|
+
function Nl(e) {
|
|
2175
|
+
return !ml(e) || 0 === e.length;
|
|
1946
2176
|
}
|
|
1947
|
-
function
|
|
1948
|
-
return
|
|
2177
|
+
function wl(e) {
|
|
2178
|
+
return hl(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1949
2179
|
}
|
|
1950
|
-
function
|
|
2180
|
+
function jl(e, t, n) {
|
|
1951
2181
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1952
2182
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1953
2183
|
}
|
|
1954
|
-
function
|
|
2184
|
+
function $l(e, t) {
|
|
1955
2185
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1956
2186
|
}
|
|
1957
|
-
function
|
|
2187
|
+
function Rl(e, t) {
|
|
1958
2188
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1959
2189
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1960
2190
|
}
|
|
1961
|
-
function
|
|
1962
|
-
if (
|
|
1963
|
-
if (
|
|
2191
|
+
function Dl(e, t) {
|
|
2192
|
+
if (bl(e) || bl(t) || pl(e) || pl(t)) return 0;
|
|
2193
|
+
if (hl(e) || hl(t)) {
|
|
1964
2194
|
let n = Number(e), r = Number(t);
|
|
1965
2195
|
return Number.isNaN(n) && (n = 0), Number.isNaN(r) && (r = 0), n > r ? 1 : n < r ? -1 : 0;
|
|
1966
2196
|
}
|
|
1967
|
-
if (
|
|
2197
|
+
if (El(e) || El(t)) {
|
|
1968
2198
|
let n = Number(e), r = Number(t);
|
|
1969
2199
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1970
2200
|
}
|
|
1971
|
-
return
|
|
2201
|
+
return $l(String(e), String(t));
|
|
1972
2202
|
}
|
|
1973
|
-
function
|
|
2203
|
+
function Al(e, t, n) {
|
|
1974
2204
|
var r;
|
|
1975
2205
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
1976
2206
|
}
|
|
1977
|
-
function
|
|
1978
|
-
if (!
|
|
2207
|
+
function kl(e) {
|
|
2208
|
+
if (!ml(e)) return !1;
|
|
1979
2209
|
let t = 0;
|
|
1980
2210
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1981
2211
|
return 2 === t;
|
|
1982
2212
|
}
|
|
1983
|
-
function
|
|
1984
|
-
if (!
|
|
2213
|
+
function Il(e) {
|
|
2214
|
+
if (!ml(e)) return !1;
|
|
1985
2215
|
let t = 0;
|
|
1986
2216
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1987
2217
|
return 1 === t;
|
|
1988
2218
|
}
|
|
1989
|
-
function
|
|
1990
|
-
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);
|
|
1991
2221
|
else "string" == typeof t && delete e[t];
|
|
1992
2222
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1993
2223
|
}
|
|
1994
|
-
function
|
|
2224
|
+
function Ll(e, t) {
|
|
1995
2225
|
return !(!(t in e) || !Object.prototype.hasOwnProperty.call(e, t));
|
|
1996
2226
|
}
|
|
1997
|
-
function
|
|
2227
|
+
function Pl(e, t) {
|
|
1998
2228
|
return !Object.prototype.hasOwnProperty.call(e, t);
|
|
1999
2229
|
}
|
|
2000
|
-
function
|
|
2230
|
+
function Ul(e, t, n) {
|
|
2001
2231
|
"__proto__" === t ? Object.defineProperty(e, t, {
|
|
2002
2232
|
value: n,
|
|
2003
2233
|
writable: !0,
|
|
@@ -2005,235 +2235,235 @@ function hl(e, t, n) {
|
|
|
2005
2235
|
configurable: !0
|
|
2006
2236
|
}) : e[t] = n;
|
|
2007
2237
|
}
|
|
2008
|
-
function
|
|
2238
|
+
function Fl(e, t) {
|
|
2009
2239
|
if (!/^[0-9]+$/.test(t)) return -1;
|
|
2010
2240
|
const n = Number(t);
|
|
2011
2241
|
return n >= e.length ? -1 : n;
|
|
2012
2242
|
}
|
|
2013
|
-
function
|
|
2014
|
-
e && !
|
|
2243
|
+
function Vl(e, t, n, r) {
|
|
2244
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2015
2245
|
const l = e ? `${Rt(e)}: ` : "";
|
|
2016
|
-
if (!
|
|
2017
|
-
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)}`);
|
|
2018
2248
|
let o = n.split("`"), i = o.length;
|
|
2019
2249
|
for (let e = 0; e < i; e++) {
|
|
2020
|
-
if (
|
|
2021
|
-
const i =
|
|
2250
|
+
if (pl(t)) {
|
|
2251
|
+
const i = Fl(t, o[e]);
|
|
2022
2252
|
if (i < 0) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2023
2253
|
o[e] = String(i);
|
|
2024
2254
|
}
|
|
2025
|
-
if (
|
|
2255
|
+
if (Pl(t, o[e])) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2026
2256
|
if (e === i - 1) break;
|
|
2027
2257
|
if (null == (t = t[o[e]])) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2028
|
-
if (!
|
|
2258
|
+
if (!bl(t) && !pl(t)) return void cr(`${l}kw must be list or dict: '${n}'`);
|
|
2029
2259
|
}
|
|
2030
2260
|
let s = t[o[i - 1]];
|
|
2031
2261
|
return void 0 === s && r && cr(`${l}path not found: '${n}'`), s;
|
|
2032
2262
|
}
|
|
2033
|
-
function
|
|
2034
|
-
e && !
|
|
2263
|
+
function Gl(e, t, n) {
|
|
2264
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2035
2265
|
const r = e ? Rt(e) + ": " : "";
|
|
2036
|
-
if (!
|
|
2266
|
+
if (!ml(n)) return cr(`${r}kw_delete(): path must be a string: ${String(n)}`), -1;
|
|
2037
2267
|
let [l, o] = function(e, t) {
|
|
2038
2268
|
let n = e.lastIndexOf(t);
|
|
2039
2269
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
2040
2270
|
}(n, "`"), i = t;
|
|
2041
|
-
if (
|
|
2042
|
-
else if (i =
|
|
2043
|
-
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);
|
|
2044
2274
|
}
|
|
2045
|
-
function
|
|
2046
|
-
e && !
|
|
2047
|
-
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);
|
|
2048
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;
|
|
2049
2279
|
if (void 0 === o) {
|
|
2050
2280
|
if (s && t) {
|
|
2051
2281
|
let l = Boolean(r);
|
|
2052
|
-
return
|
|
2282
|
+
return Hl(e, t, n, l), l;
|
|
2053
2283
|
}
|
|
2054
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2284
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), Boolean(r);
|
|
2055
2285
|
}
|
|
2056
2286
|
let _;
|
|
2057
|
-
if (
|
|
2058
|
-
else if (u &&
|
|
2059
|
-
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);
|
|
2060
2290
|
else {
|
|
2061
|
-
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));
|
|
2062
2292
|
_ = !1;
|
|
2063
2293
|
}
|
|
2064
|
-
return a &&
|
|
2294
|
+
return a && Gl(e, t, n), _;
|
|
2065
2295
|
}
|
|
2066
|
-
function
|
|
2067
|
-
e && !
|
|
2068
|
-
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);
|
|
2069
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;
|
|
2070
2300
|
if (void 0 === o) {
|
|
2071
2301
|
if (s && t) {
|
|
2072
2302
|
let l = parseInt(r);
|
|
2073
|
-
return
|
|
2303
|
+
return Hl(e, t, n, l), l;
|
|
2074
2304
|
}
|
|
2075
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2305
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), parseInt(r);
|
|
2076
2306
|
}
|
|
2077
2307
|
let _;
|
|
2078
|
-
if (
|
|
2308
|
+
if (hl(o)) _ = Math.trunc(o);
|
|
2079
2309
|
else {
|
|
2080
|
-
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json integer: '${n}'`),
|
|
2081
|
-
if (
|
|
2082
|
-
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) {
|
|
2083
2313
|
const t = /^\s*([+-]?)(0[xX][0-9a-fA-F]+|0[0-7]*|[1-9][0-9]*)/.exec(e);
|
|
2084
2314
|
if (!t) return 0;
|
|
2085
2315
|
let n, r = t[2];
|
|
2086
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;
|
|
2087
2317
|
}(o);
|
|
2088
2318
|
else {
|
|
2089
|
-
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;
|
|
2090
2320
|
_ = 0;
|
|
2091
2321
|
}
|
|
2092
2322
|
}
|
|
2093
|
-
return a &&
|
|
2323
|
+
return a && Gl(e, t, n), _;
|
|
2094
2324
|
}
|
|
2095
|
-
function
|
|
2096
|
-
e && !
|
|
2097
|
-
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);
|
|
2098
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;
|
|
2099
2329
|
if (void 0 === o) {
|
|
2100
2330
|
if (s && t) {
|
|
2101
2331
|
let l = Number(r);
|
|
2102
|
-
return
|
|
2332
|
+
return Hl(e, t, n, l), l;
|
|
2103
2333
|
}
|
|
2104
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2334
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), Number(r);
|
|
2105
2335
|
}
|
|
2106
2336
|
let _;
|
|
2107
|
-
if (
|
|
2337
|
+
if (hl(o)) _ = o;
|
|
2108
2338
|
else {
|
|
2109
|
-
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json real: '${n}'`),
|
|
2110
|
-
if (
|
|
2111
|
-
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);
|
|
2112
2342
|
else {
|
|
2113
|
-
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;
|
|
2114
2344
|
_ = 0;
|
|
2115
2345
|
}
|
|
2116
2346
|
}
|
|
2117
|
-
return a &&
|
|
2347
|
+
return a && Gl(e, t, n), _;
|
|
2118
2348
|
}
|
|
2119
|
-
function
|
|
2120
|
-
e && !
|
|
2121
|
-
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);
|
|
2122
2352
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2123
|
-
return void 0 === o ? s && t ? (
|
|
2124
|
-
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;
|
|
2125
2355
|
for (let e = 0; e < n.length - 1; e++) {
|
|
2126
|
-
if (!
|
|
2356
|
+
if (!bl(r) && !pl(r)) return !1;
|
|
2127
2357
|
r = r[n[e]];
|
|
2128
2358
|
}
|
|
2129
|
-
return !(!
|
|
2130
|
-
}(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);
|
|
2131
2361
|
}
|
|
2132
|
-
function
|
|
2133
|
-
e && !
|
|
2134
|
-
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);
|
|
2135
2365
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2136
2366
|
if (void 0 === o) {
|
|
2137
2367
|
if (s) {
|
|
2138
2368
|
let l = r;
|
|
2139
|
-
return
|
|
2369
|
+
return Hl(e, t, n, l), l;
|
|
2140
2370
|
}
|
|
2141
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2371
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), r;
|
|
2142
2372
|
}
|
|
2143
|
-
return a &&
|
|
2373
|
+
return a && Gl(e, t, n), o;
|
|
2144
2374
|
}
|
|
2145
|
-
function
|
|
2146
|
-
e && !
|
|
2147
|
-
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);
|
|
2148
2378
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2149
|
-
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);
|
|
2150
2380
|
}
|
|
2151
|
-
function
|
|
2152
|
-
e && !
|
|
2153
|
-
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);
|
|
2154
2384
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2155
2385
|
if (void 0 === o) {
|
|
2156
2386
|
if (s) {
|
|
2157
2387
|
let l = r;
|
|
2158
|
-
return
|
|
2388
|
+
return Hl(e, t, n, l), l;
|
|
2159
2389
|
}
|
|
2160
|
-
return i && (cr(`path not found: '${n}'`),
|
|
2390
|
+
return i && (cr(`path not found: '${n}'`), zr(t)), r;
|
|
2161
2391
|
}
|
|
2162
|
-
return a &&
|
|
2392
|
+
return a && Gl(e, t, n), o;
|
|
2163
2393
|
}
|
|
2164
|
-
function
|
|
2165
|
-
e && !
|
|
2166
|
-
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);
|
|
2167
2397
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2168
|
-
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);
|
|
2169
2399
|
}
|
|
2170
|
-
function
|
|
2171
|
-
if (e && !
|
|
2172
|
-
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;
|
|
2173
2403
|
if ("" === n) return cr((e ? Rt(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
2174
2404
|
if (n.split("`").includes("")) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
2175
2405
|
let l = n.split("`"), o = l.length;
|
|
2176
2406
|
for (let i = 0; i < o; i++) {
|
|
2177
2407
|
let s = l[i];
|
|
2178
|
-
if (
|
|
2179
|
-
const r =
|
|
2408
|
+
if (pl(t)) {
|
|
2409
|
+
const r = Fl(t, s);
|
|
2180
2410
|
if (r < 0) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not an index of its list: '${n}'`), -1;
|
|
2181
2411
|
s = String(r);
|
|
2182
2412
|
}
|
|
2183
|
-
if (i === o - 1)
|
|
2413
|
+
if (i === o - 1) Ul(t, s, r);
|
|
2184
2414
|
else {
|
|
2185
|
-
let r =
|
|
2186
|
-
if (void 0 === r)
|
|
2187
|
-
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;
|
|
2188
2418
|
t = t[s];
|
|
2189
2419
|
}
|
|
2190
2420
|
}
|
|
2191
2421
|
return 0;
|
|
2192
2422
|
}
|
|
2193
|
-
function
|
|
2194
|
-
if (e && !
|
|
2195
|
-
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);
|
|
2196
2426
|
if (void 0 === o) {
|
|
2197
|
-
if (!
|
|
2427
|
+
if (!ml(n) || function(e, t) {
|
|
2198
2428
|
let n = t.split("`"), r = e;
|
|
2199
2429
|
for (let e = 0; e < n.length - 1; e++) {
|
|
2200
|
-
if (
|
|
2201
|
-
const t =
|
|
2430
|
+
if (pl(r)) {
|
|
2431
|
+
const t = Fl(r, n[e]);
|
|
2202
2432
|
if (t < 0) return !1;
|
|
2203
2433
|
r = r[t];
|
|
2204
2434
|
} else r = Object.prototype.hasOwnProperty.call(r, n[e]) ? r[n[e]] : void 0;
|
|
2205
2435
|
if (null == r) return !1;
|
|
2206
|
-
if (!
|
|
2436
|
+
if (!bl(r) && !pl(r)) return !0;
|
|
2207
2437
|
}
|
|
2208
2438
|
return !1;
|
|
2209
2439
|
}(t, n)) return -1;
|
|
2210
|
-
if (o = {},
|
|
2440
|
+
if (o = {}, Hl(e, t, n, o) < 0) return -1;
|
|
2211
2441
|
}
|
|
2212
|
-
return
|
|
2442
|
+
return bl(o) ? (Ul(o, r, l), 0) : (cr(`subdict is not an object: '${n}'`), -1);
|
|
2213
2443
|
}
|
|
2214
|
-
function
|
|
2444
|
+
function Ql(e, n, r) {
|
|
2215
2445
|
let l = "", o = !1;
|
|
2216
|
-
if (
|
|
2446
|
+
if (pl(n)) {
|
|
2217
2447
|
o = !1;
|
|
2218
2448
|
for (let i = 0; i < n.length; i++) {
|
|
2219
2449
|
let s = n[i];
|
|
2220
|
-
if (l =
|
|
2450
|
+
if (l = Nl(r) ? t("%s", r) : t("%s`%d", r, i), o = Ql(e, s, l), o) break;
|
|
2221
2451
|
}
|
|
2222
|
-
} else if (
|
|
2452
|
+
} else if (bl(n)) {
|
|
2223
2453
|
o = !0;
|
|
2224
2454
|
let i = Object.keys(n);
|
|
2225
2455
|
for (let s = 0; s < i.length; s++) {
|
|
2226
2456
|
let a = i[s], u = n[a];
|
|
2227
|
-
if (l =
|
|
2228
|
-
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;
|
|
2229
2459
|
continue;
|
|
2230
2460
|
}
|
|
2231
|
-
let _ =
|
|
2232
|
-
if (void 0 === _ && (_ =
|
|
2461
|
+
let _ = Jl(0, e, l, void 0, 0);
|
|
2462
|
+
if (void 0 === _ && (_ = rl(e, l)), void 0 === _) {
|
|
2233
2463
|
o = !1;
|
|
2234
2464
|
break;
|
|
2235
2465
|
}
|
|
2236
|
-
if (0 !==
|
|
2466
|
+
if (0 !== Dl(_, u)) {
|
|
2237
2467
|
o = !1;
|
|
2238
2468
|
break;
|
|
2239
2469
|
}
|
|
@@ -2241,83 +2471,83 @@ function kl(e, n, r) {
|
|
|
2241
2471
|
}
|
|
2242
2472
|
return o;
|
|
2243
2473
|
}
|
|
2244
|
-
function
|
|
2245
|
-
return 0 ===
|
|
2474
|
+
function Xl(e, t) {
|
|
2475
|
+
return 0 === gl(t) || Ql(e, t, "");
|
|
2246
2476
|
}
|
|
2247
|
-
function
|
|
2248
|
-
if (!n || !
|
|
2249
|
-
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;
|
|
2250
2480
|
return r && cr("item not found in this list"), -1;
|
|
2251
2481
|
}
|
|
2252
|
-
function
|
|
2253
|
-
if (e && !
|
|
2254
|
-
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);
|
|
2255
2485
|
let l = [];
|
|
2256
|
-
if (
|
|
2486
|
+
if (pl(t)) for (let e = 0; e < t.length; e++) {
|
|
2257
2487
|
let o = t[e];
|
|
2258
|
-
r(o, n) && l.push(
|
|
2488
|
+
r(o, n) && l.push(Qr(o));
|
|
2259
2489
|
}
|
|
2260
2490
|
else {
|
|
2261
|
-
if (!
|
|
2262
|
-
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));
|
|
2263
2493
|
}
|
|
2264
2494
|
return l;
|
|
2265
2495
|
}
|
|
2266
|
-
function
|
|
2267
|
-
if (e && !
|
|
2268
|
-
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);
|
|
2269
2499
|
let l = [];
|
|
2270
|
-
if (
|
|
2500
|
+
if (pl(t)) for (let e = 0; e < t.length; e++) {
|
|
2271
2501
|
let o = t[e];
|
|
2272
2502
|
r(o, n) && l.push(o);
|
|
2273
2503
|
}
|
|
2274
2504
|
else {
|
|
2275
|
-
if (!
|
|
2505
|
+
if (!bl(t)) return cr("kw_select() BAD kw parameter"), null;
|
|
2276
2506
|
r(t, n) && l.push(t);
|
|
2277
2507
|
}
|
|
2278
2508
|
return l;
|
|
2279
2509
|
}
|
|
2280
|
-
function
|
|
2281
|
-
e && !
|
|
2510
|
+
function no(e, t, n, r) {
|
|
2511
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2282
2512
|
let l = {};
|
|
2283
|
-
if (
|
|
2513
|
+
if (ml(n) && !Nl(n)) {
|
|
2284
2514
|
let o = n;
|
|
2285
|
-
Object.prototype.hasOwnProperty.call(t, o) ?
|
|
2286
|
-
} 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}`);
|
|
2287
2517
|
else {
|
|
2288
|
-
if (!(
|
|
2518
|
+
if (!(pl(n) && fl(n) > 0)) return t;
|
|
2289
2519
|
for (let o = 0; o < n.length; o++) {
|
|
2290
2520
|
let i = n[o];
|
|
2291
|
-
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}`);
|
|
2292
2522
|
}
|
|
2293
2523
|
}
|
|
2294
2524
|
return l;
|
|
2295
2525
|
}
|
|
2296
|
-
function
|
|
2526
|
+
function ro(e, t, n, r) {
|
|
2297
2527
|
let l = {};
|
|
2298
|
-
if (!
|
|
2299
|
-
if (
|
|
2528
|
+
if (!bl(t)) return l;
|
|
2529
|
+
if (el(l, t), ml(n) && !Nl(n)) {
|
|
2300
2530
|
let o = n;
|
|
2301
|
-
Object.prototype.hasOwnProperty.call(t, o) ?
|
|
2302
|
-
} 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}`);
|
|
2303
2533
|
else {
|
|
2304
|
-
if (!(
|
|
2534
|
+
if (!(pl(n) && fl(n) > 0)) return {};
|
|
2305
2535
|
for (let o = 0; o < n.length; o++) {
|
|
2306
2536
|
let i = n[o];
|
|
2307
|
-
Object.prototype.hasOwnProperty.call(t, i) ?
|
|
2537
|
+
Object.prototype.hasOwnProperty.call(t, i) ? ll(l, i) : r && cr(`${Rt(e)}: key not found: ${i}`);
|
|
2308
2538
|
}
|
|
2309
2539
|
}
|
|
2310
2540
|
return l;
|
|
2311
2541
|
}
|
|
2312
|
-
function
|
|
2542
|
+
function lo(e, t, n = !1) {
|
|
2313
2543
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
2314
2544
|
let r = window.localStorage.getItem(e);
|
|
2315
|
-
return null === r ? (n &&
|
|
2545
|
+
return null === r ? (n && oo(e, t), t) : JSON.parse(r);
|
|
2316
2546
|
} catch (n) {
|
|
2317
2547
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
2318
2548
|
}
|
|
2319
2549
|
}
|
|
2320
|
-
function
|
|
2550
|
+
function oo(e, t) {
|
|
2321
2551
|
if ("undefined" == typeof window || !window.localStorage) return 0;
|
|
2322
2552
|
if (!e || void 0 === t) return cr(`kw_set_local_storage_value(): invalid key or value: key=${e}`), -1;
|
|
2323
2553
|
try {
|
|
@@ -2326,7 +2556,7 @@ function Gl(e, t) {
|
|
|
2326
2556
|
return cr(`kw_set_local_storage_value(): cannot save "${e}" (storage full or blocked?): ${t && t.message ? t.message : t}`), -1;
|
|
2327
2557
|
}
|
|
2328
2558
|
}
|
|
2329
|
-
function
|
|
2559
|
+
function io(e) {
|
|
2330
2560
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
2331
2561
|
window.localStorage.removeItem(e);
|
|
2332
2562
|
} catch (t) {
|
|
@@ -2334,95 +2564,95 @@ function Ml(e) {
|
|
|
2334
2564
|
}
|
|
2335
2565
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
2336
2566
|
}
|
|
2337
|
-
function
|
|
2338
|
-
if (
|
|
2339
|
-
if (
|
|
2567
|
+
function so(e, t) {
|
|
2568
|
+
if (yl(e) || yl(t)) return !0;
|
|
2569
|
+
if (pl(e)) {
|
|
2340
2570
|
if (0 === e.length) return !0;
|
|
2341
2571
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2342
|
-
} else if (
|
|
2572
|
+
} else if (bl(e)) {
|
|
2343
2573
|
if (0 === Object.keys(e).length) return !0;
|
|
2344
2574
|
for (let n in e) if (n === t) return !0;
|
|
2345
|
-
} else if (
|
|
2575
|
+
} else if (ml(e) && e === t) return !0;
|
|
2346
2576
|
return !1;
|
|
2347
2577
|
}
|
|
2348
|
-
function
|
|
2349
|
-
if (e && !
|
|
2350
|
-
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);
|
|
2351
2581
|
let o = [];
|
|
2352
|
-
if (
|
|
2582
|
+
if (pl(t)) for (let i = 0; i < t.length; i++) {
|
|
2353
2583
|
let s, a = t[i];
|
|
2354
|
-
if (
|
|
2584
|
+
if (bl(a)) s = Kl(e, a, "id", "", 0);
|
|
2355
2585
|
else {
|
|
2356
|
-
if (!
|
|
2586
|
+
if (!ml(a)) continue;
|
|
2357
2587
|
s = a;
|
|
2358
2588
|
}
|
|
2359
|
-
|
|
2589
|
+
so(n, s) && l(a, r) && o.push(a);
|
|
2360
2590
|
}
|
|
2361
2591
|
else {
|
|
2362
|
-
if (!
|
|
2592
|
+
if (!bl(t)) return cr("kw_collect() BAD kw parameter"), null;
|
|
2363
2593
|
for (let e of Object.keys(t)) {
|
|
2364
2594
|
let i = t[e];
|
|
2365
|
-
|
|
2595
|
+
so(n, e) && l(i, r) && o.push(i);
|
|
2366
2596
|
}
|
|
2367
2597
|
}
|
|
2368
2598
|
return o;
|
|
2369
2599
|
}
|
|
2370
|
-
function
|
|
2371
|
-
e && !
|
|
2600
|
+
function uo(e, t, n) {
|
|
2601
|
+
e && !Sl(e) && cr("GObj bad instanceof");
|
|
2372
2602
|
let r = {};
|
|
2373
|
-
if (
|
|
2374
|
-
else if (
|
|
2375
|
-
let l = t[n], o =
|
|
2376
|
-
|
|
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);
|
|
2377
2607
|
}
|
|
2378
2608
|
else cr(`${Rt(e)} kwid_new_dict: data type unknown`);
|
|
2379
2609
|
return r;
|
|
2380
2610
|
}
|
|
2381
|
-
function
|
|
2382
|
-
if (e && !
|
|
2383
|
-
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)) {
|
|
2384
2614
|
let n = [];
|
|
2385
2615
|
for (let r of Object.keys(t)) {
|
|
2386
2616
|
let l = t[r];
|
|
2387
|
-
|
|
2617
|
+
bl(l) ? (l.id = r, n.push(l)) : cr(`${Rt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2388
2618
|
}
|
|
2389
2619
|
return n;
|
|
2390
2620
|
}
|
|
2391
2621
|
return cr(`${Rt(e)} kwid_new_list: wrong type for list`), [];
|
|
2392
2622
|
}
|
|
2393
|
-
function
|
|
2394
|
-
e && !
|
|
2395
|
-
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);
|
|
2396
2626
|
return o && 0 !== o.length ? o[0] : null;
|
|
2397
2627
|
}
|
|
2398
|
-
function
|
|
2399
|
-
if (e && !
|
|
2628
|
+
function fo(e, t) {
|
|
2629
|
+
if (e && !Sl(e) && cr("GObj bad instanceof"), !t) return [];
|
|
2400
2630
|
let n = [];
|
|
2401
|
-
if (
|
|
2402
|
-
else if (
|
|
2403
|
-
else
|
|
2404
|
-
if (
|
|
2405
|
-
else if (
|
|
2406
|
-
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);
|
|
2407
2637
|
r && n.push(r);
|
|
2408
2638
|
}
|
|
2409
2639
|
});
|
|
2410
2640
|
return n;
|
|
2411
2641
|
}
|
|
2412
|
-
function
|
|
2642
|
+
function go(e, t, n) {
|
|
2413
2643
|
t = t || "id", n = n || "value";
|
|
2414
2644
|
let r = [];
|
|
2415
|
-
if (
|
|
2645
|
+
if (pl(e)) for (let l = 0; l < e.length; l++) {
|
|
2416
2646
|
let o = e[l];
|
|
2417
|
-
if (
|
|
2647
|
+
if (ml(o)) r.push({
|
|
2418
2648
|
id: e[l],
|
|
2419
2649
|
value: e[l]
|
|
2420
2650
|
});
|
|
2421
|
-
else if (
|
|
2651
|
+
else if (bl(o)) {
|
|
2422
2652
|
let e = {};
|
|
2423
|
-
if (
|
|
2424
|
-
if (!
|
|
2425
|
-
if (!(
|
|
2653
|
+
if (Ll(o, t)) {
|
|
2654
|
+
if (!Ll(o, n)) {
|
|
2655
|
+
if (!(gl(o) > 0)) {
|
|
2426
2656
|
cr("list2options(): object without field value: " + n);
|
|
2427
2657
|
continue;
|
|
2428
2658
|
}
|
|
@@ -2430,7 +2660,7 @@ function ql(e, t, n) {
|
|
|
2430
2660
|
}
|
|
2431
2661
|
e.id = o[t], e.value = o[n];
|
|
2432
2662
|
} else {
|
|
2433
|
-
if (!(
|
|
2663
|
+
if (!(gl(o) > 0)) {
|
|
2434
2664
|
cr("list2options(): object without field id: " + t);
|
|
2435
2665
|
continue;
|
|
2436
2666
|
}
|
|
@@ -2439,19 +2669,19 @@ function ql(e, t, n) {
|
|
|
2439
2669
|
r.push(e);
|
|
2440
2670
|
} else cr("list2options(): case1 not implemented");
|
|
2441
2671
|
}
|
|
2442
|
-
else if (
|
|
2672
|
+
else if (bl(e)) for (let t of Object.keys(e)) r.push({
|
|
2443
2673
|
id: t,
|
|
2444
2674
|
value: t
|
|
2445
2675
|
});
|
|
2446
2676
|
else cr("list2options(): case2 not implemented");
|
|
2447
2677
|
return r;
|
|
2448
2678
|
}
|
|
2449
|
-
function
|
|
2679
|
+
function bo(e, t) {
|
|
2450
2680
|
if (!e) return -1;
|
|
2451
2681
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2452
2682
|
return -1;
|
|
2453
2683
|
}
|
|
2454
|
-
function
|
|
2684
|
+
function po(e, t, n) {
|
|
2455
2685
|
if (!e || !t) return cr("ERROR: str_in_list() list or str empty"), !1;
|
|
2456
2686
|
let r = e.length;
|
|
2457
2687
|
if (n) {
|
|
@@ -2463,17 +2693,17 @@ function zl(e, t, n) {
|
|
|
2463
2693
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2464
2694
|
return !1;
|
|
2465
2695
|
}
|
|
2466
|
-
function
|
|
2696
|
+
function mo(e, t, n) {
|
|
2467
2697
|
if (!e) return cr("ERROR: strs_in_list() list empty"), !1;
|
|
2468
2698
|
if (!t) return cr("ERROR: strs_in_list() str empty"), !1;
|
|
2469
|
-
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;
|
|
2470
2700
|
return !1;
|
|
2471
2701
|
}
|
|
2472
|
-
function
|
|
2702
|
+
function ho(e, t) {
|
|
2473
2703
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2474
2704
|
return !1;
|
|
2475
2705
|
}
|
|
2476
|
-
function
|
|
2706
|
+
function Eo(e, t) {
|
|
2477
2707
|
try {
|
|
2478
2708
|
let n = e.__md_iev__;
|
|
2479
2709
|
if (n) return n[t];
|
|
@@ -2481,34 +2711,34 @@ function Zl(e, t) {
|
|
|
2481
2711
|
return;
|
|
2482
2712
|
}
|
|
2483
2713
|
}
|
|
2484
|
-
function
|
|
2714
|
+
function yo(e, t, n) {
|
|
2485
2715
|
let r = e.__md_iev__;
|
|
2486
2716
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2487
2717
|
}
|
|
2488
|
-
function
|
|
2489
|
-
if (!
|
|
2718
|
+
function To(e, t, n, r) {
|
|
2719
|
+
if (!Sl(e)) return cr("gobj is not a GObj"), null;
|
|
2490
2720
|
if (!t) return;
|
|
2491
|
-
let l =
|
|
2492
|
-
l || (l = [],
|
|
2721
|
+
let l = Eo(t, n);
|
|
2722
|
+
l || (l = [], yo(t, n, l));
|
|
2493
2723
|
try {
|
|
2494
|
-
|
|
2724
|
+
pl(l) && l.unshift(r);
|
|
2495
2725
|
} catch (e) {
|
|
2496
2726
|
cr(e);
|
|
2497
2727
|
}
|
|
2498
2728
|
}
|
|
2499
|
-
function
|
|
2500
|
-
if (!
|
|
2501
|
-
if (!
|
|
2502
|
-
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);
|
|
2503
2733
|
return l ? 0 === l.length ? (r && cr(`stack empty: ${n}`), null) : l[0] : (r && cr(`stack NOT FOUND: ${n}`), null);
|
|
2504
2734
|
}
|
|
2505
|
-
function
|
|
2506
|
-
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;
|
|
2507
2737
|
}
|
|
2508
|
-
function
|
|
2509
|
-
return
|
|
2738
|
+
function So(e, t) {
|
|
2739
|
+
return Kl(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2510
2740
|
}
|
|
2511
|
-
function
|
|
2741
|
+
function No(e, t, n) {
|
|
2512
2742
|
let r = new XMLHttpRequest();
|
|
2513
2743
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2514
2744
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
@@ -2520,14 +2750,14 @@ function oo(e, t, n) {
|
|
|
2520
2750
|
var e;
|
|
2521
2751
|
}, r.send();
|
|
2522
2752
|
}
|
|
2523
|
-
function
|
|
2753
|
+
function wo(e, t, n) {
|
|
2524
2754
|
let r = new XMLHttpRequest();
|
|
2525
2755
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2526
2756
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2527
2757
|
}, r.send(t);
|
|
2528
2758
|
}
|
|
2529
|
-
function
|
|
2530
|
-
void 0 !== n &&
|
|
2759
|
+
function jo(e, t, n) {
|
|
2760
|
+
void 0 !== n && ml(n) || (n = "");
|
|
2531
2761
|
for (let r of Object.keys(e)) {
|
|
2532
2762
|
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
2533
2763
|
let l = (n.length ? "`" : "") + r;
|
|
@@ -2536,62 +2766,62 @@ function so(e, t, n) {
|
|
|
2536
2766
|
r,
|
|
2537
2767
|
e[r],
|
|
2538
2768
|
n
|
|
2539
|
-
]),
|
|
2769
|
+
]), bl(e[r]) && jo(e[r], t, n), n = n.slice(0, -l.length);
|
|
2540
2770
|
}
|
|
2541
2771
|
}
|
|
2542
|
-
function
|
|
2543
|
-
n && (e =
|
|
2544
|
-
let r =
|
|
2545
|
-
|
|
2546
|
-
let l =
|
|
2547
|
-
return
|
|
2548
|
-
"__" === 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);
|
|
2549
2779
|
}, t), e;
|
|
2550
2780
|
}
|
|
2551
|
-
function
|
|
2552
|
-
let l =
|
|
2781
|
+
function Ro(e, t, n, r) {
|
|
2782
|
+
let l = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2553
2783
|
if (!l) return cr("jdb_update: topic not found: " + t), null;
|
|
2554
|
-
if (!
|
|
2555
|
-
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;
|
|
2556
2786
|
if ("" !== n && n.split("`").includes("")) return cr(`jdb_update: empty segment in path: '${n}'`), null;
|
|
2557
2787
|
let o, i, s = n.split("`"), a = l;
|
|
2558
|
-
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);
|
|
2559
2789
|
if (!a || 0 !== s.length) return cr(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
2560
|
-
if (
|
|
2790
|
+
if (pl(a)) i = a;
|
|
2561
2791
|
else {
|
|
2562
|
-
if (a.id === r.id) return
|
|
2563
|
-
if (i =
|
|
2564
|
-
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;
|
|
2565
2795
|
}
|
|
2566
|
-
let u =
|
|
2567
|
-
return u ?
|
|
2796
|
+
let u = Co(i, e.hook, r.id, !1);
|
|
2797
|
+
return u ? el(u, r) : i.push(r), l;
|
|
2568
2798
|
}
|
|
2569
|
-
function
|
|
2570
|
-
let l =
|
|
2799
|
+
function Do(e, t, n, r) {
|
|
2800
|
+
let l = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2571
2801
|
if (!l) return cr("jdb_delete: topic not found: " + t), null;
|
|
2572
|
-
if (!
|
|
2573
|
-
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;
|
|
2574
2804
|
if ("" !== n && n.split("`").includes("")) return cr(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
2575
2805
|
let o, i = n.split("`"), s = l;
|
|
2576
|
-
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);
|
|
2577
2807
|
if (!s || 0 !== i.length) return cr(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
2578
|
-
let a =
|
|
2808
|
+
let a = pl(s) ? s : Jl(null, s, e.hook, null, 0), u = bo(a, r.id);
|
|
2579
2809
|
return u < 0 ? (cr(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (a.splice(u, 1), l);
|
|
2580
2810
|
}
|
|
2581
|
-
function
|
|
2582
|
-
let n =
|
|
2811
|
+
function Ao(e, t) {
|
|
2812
|
+
let n = Jl(null, e, "topics", null, 0);
|
|
2583
2813
|
if (!n) return cr("jdb topics section not found"), br(e), null;
|
|
2584
|
-
return
|
|
2814
|
+
return Jl(null, n, t, null, 0) || (cr("jdb topic not found: " + t), br(n), null);
|
|
2585
2815
|
}
|
|
2586
|
-
function
|
|
2587
|
-
let l =
|
|
2588
|
-
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);
|
|
2589
2819
|
}
|
|
2590
|
-
function
|
|
2591
|
-
let r =
|
|
2820
|
+
function Io(e, t, n) {
|
|
2821
|
+
let r = Jl(null, Jl(null, e, "topics", null, 0), t, null, 0);
|
|
2592
2822
|
return r ? n < r.length ? r[n] : {} : (cr("jdb_get_by_idx: topic not found: " + t), null);
|
|
2593
2823
|
}
|
|
2594
|
-
function
|
|
2824
|
+
function Co(e, t, n, r) {
|
|
2595
2825
|
if (!e) return null;
|
|
2596
2826
|
let l, o = e.length;
|
|
2597
2827
|
for (l = 0; l < o; l++) {
|
|
@@ -2599,19 +2829,19 @@ function bo(e, t, n, r) {
|
|
|
2599
2829
|
if (o) {
|
|
2600
2830
|
let e = o.id;
|
|
2601
2831
|
if (e && e === n) return o;
|
|
2602
|
-
if (r &&
|
|
2603
|
-
let e =
|
|
2832
|
+
if (r && Ll(o, t)) {
|
|
2833
|
+
let e = Co(o[t], t, n, r);
|
|
2604
2834
|
if (e) return e;
|
|
2605
2835
|
}
|
|
2606
2836
|
}
|
|
2607
2837
|
}
|
|
2608
2838
|
return null;
|
|
2609
2839
|
}
|
|
2610
|
-
function
|
|
2611
|
-
let n =
|
|
2612
|
-
return
|
|
2840
|
+
function Lo(e, t) {
|
|
2841
|
+
let n = Qr(e);
|
|
2842
|
+
return tl(n, t), n;
|
|
2613
2843
|
}
|
|
2614
|
-
function
|
|
2844
|
+
function Po(e) {
|
|
2615
2845
|
function t(e) {
|
|
2616
2846
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2617
2847
|
switch (t.length % 4) {
|
|
@@ -2642,9 +2872,9 @@ function mo(e) {
|
|
|
2642
2872
|
signature: t(n[2])
|
|
2643
2873
|
};
|
|
2644
2874
|
}
|
|
2645
|
-
function
|
|
2875
|
+
function Uo(e, t) {
|
|
2646
2876
|
try {
|
|
2647
|
-
let n =
|
|
2877
|
+
let n = Po(e);
|
|
2648
2878
|
switch (t) {
|
|
2649
2879
|
case "header": return JSON.parse(n.header);
|
|
2650
2880
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2654,15 +2884,15 @@ function ho(e, t) {
|
|
|
2654
2884
|
return null;
|
|
2655
2885
|
}
|
|
2656
2886
|
}
|
|
2657
|
-
function
|
|
2887
|
+
function Fo(e) {
|
|
2658
2888
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2659
2889
|
}
|
|
2660
|
-
function
|
|
2890
|
+
function Vo(e) {
|
|
2661
2891
|
if (!e) return "";
|
|
2662
2892
|
const t = String(e).trim();
|
|
2663
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2893
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Fo(t);
|
|
2664
2894
|
}
|
|
2665
|
-
var
|
|
2895
|
+
var Go = class {
|
|
2666
2896
|
constructor(e) {
|
|
2667
2897
|
this.html = e, Object.freeze(this);
|
|
2668
2898
|
}
|
|
@@ -2670,28 +2900,28 @@ var To = class {
|
|
|
2670
2900
|
return this.html;
|
|
2671
2901
|
}
|
|
2672
2902
|
};
|
|
2673
|
-
function
|
|
2674
|
-
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);
|
|
2675
2905
|
}
|
|
2676
|
-
function
|
|
2677
|
-
return e instanceof
|
|
2906
|
+
function Wo(e) {
|
|
2907
|
+
return e instanceof Go;
|
|
2678
2908
|
}
|
|
2679
|
-
function
|
|
2909
|
+
function xo(e) {
|
|
2680
2910
|
const t = document.createElement("template");
|
|
2681
2911
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2682
2912
|
}
|
|
2683
|
-
var
|
|
2684
|
-
function
|
|
2685
|
-
|
|
2913
|
+
var Ko = !1, Yo = /* @__PURE__ */ new Set();
|
|
2914
|
+
function Bo(e) {
|
|
2915
|
+
Ko = !!e;
|
|
2686
2916
|
}
|
|
2687
|
-
function
|
|
2688
|
-
return
|
|
2917
|
+
function Jo() {
|
|
2918
|
+
return Ko;
|
|
2689
2919
|
}
|
|
2690
|
-
function
|
|
2920
|
+
function qo(e) {
|
|
2691
2921
|
const t = document.createElement("template");
|
|
2692
2922
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2693
2923
|
}
|
|
2694
|
-
function
|
|
2924
|
+
function Ho(e, t) {
|
|
2695
2925
|
let [n, r, l, o] = e;
|
|
2696
2926
|
if (!n) return void cr("Tag must be a valid HTML element.");
|
|
2697
2927
|
let i = document.createElement(n), s = "";
|
|
@@ -2700,22 +2930,22 @@ function Do(e, t) {
|
|
|
2700
2930
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2701
2931
|
i.style.cssText = t;
|
|
2702
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]);
|
|
2703
|
-
if (
|
|
2704
|
-
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));
|
|
2705
2935
|
else if (l.length > 0 && "<" === l[0] && function(e) {
|
|
2706
|
-
if (
|
|
2936
|
+
if (Yo.size >= 100) return;
|
|
2707
2937
|
const t = e.slice(0, 80);
|
|
2708
|
-
|
|
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)}`));
|
|
2709
2939
|
}(l), t && s) i.textContent = t(s) || l;
|
|
2710
2940
|
else i.textContent = l;
|
|
2711
|
-
else if (
|
|
2712
|
-
if (l.length > 0) if (
|
|
2713
|
-
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);
|
|
2714
2944
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (cr("content ignored"), pr(l));
|
|
2715
2945
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2716
2946
|
return i;
|
|
2717
2947
|
}
|
|
2718
|
-
function
|
|
2948
|
+
function zo(e) {
|
|
2719
2949
|
if (!e) return {
|
|
2720
2950
|
top: 0,
|
|
2721
2951
|
left: 0,
|
|
@@ -2735,11 +2965,11 @@ function Ao(e) {
|
|
|
2735
2965
|
bottom: t + i + l
|
|
2736
2966
|
};
|
|
2737
2967
|
}
|
|
2738
|
-
function
|
|
2968
|
+
function Qo(e) {
|
|
2739
2969
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2740
2970
|
}
|
|
2741
|
-
function
|
|
2742
|
-
if (!
|
|
2971
|
+
function Xo(e, t) {
|
|
2972
|
+
if (!Ol(t)) return void cr("You must supply a translation function");
|
|
2743
2973
|
e || (e = document);
|
|
2744
2974
|
const n = (t) => {
|
|
2745
2975
|
let n = [];
|
|
@@ -2762,7 +2992,7 @@ function Io(e, t) {
|
|
|
2762
2992
|
n && e.setAttribute("placeholder", t(n));
|
|
2763
2993
|
});
|
|
2764
2994
|
}
|
|
2765
|
-
function
|
|
2995
|
+
function Zo(e = "Time Tracker", t = !1) {
|
|
2766
2996
|
const n = e, r = performance.now();
|
|
2767
2997
|
let l = r;
|
|
2768
2998
|
return t && fr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
@@ -2773,30 +3003,30 @@ function Co(e = "Time Tracker", t = !1) {
|
|
|
2773
3003
|
};
|
|
2774
3004
|
} };
|
|
2775
3005
|
}
|
|
2776
|
-
function
|
|
3006
|
+
function ei(e) {
|
|
2777
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();
|
|
2778
3008
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2779
3009
|
}
|
|
2780
|
-
function
|
|
3010
|
+
function ti() {
|
|
2781
3011
|
return Math.floor(Date.now() / 1e3);
|
|
2782
3012
|
}
|
|
2783
|
-
function
|
|
3013
|
+
function ni(e, t) {
|
|
2784
3014
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2785
3015
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2786
3016
|
return -1;
|
|
2787
3017
|
}
|
|
2788
|
-
function
|
|
3018
|
+
function ri() {
|
|
2789
3019
|
let e = "";
|
|
2790
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;
|
|
2791
3021
|
}
|
|
2792
|
-
function
|
|
3022
|
+
function li(e) {
|
|
2793
3023
|
return e.replace(/[?# ^:]/g, "_");
|
|
2794
3024
|
}
|
|
2795
|
-
function
|
|
3025
|
+
function oi(e) {
|
|
2796
3026
|
let t = null;
|
|
2797
3027
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2798
3028
|
}
|
|
2799
|
-
function
|
|
3029
|
+
function ii(e, t = 0, n = !1) {
|
|
2800
3030
|
let r = null, l = null, o = null;
|
|
2801
3031
|
const i = (...i) => {
|
|
2802
3032
|
o = this, l = i;
|
|
@@ -2811,20 +3041,20 @@ function Mo(e, t = 0, n = !1) {
|
|
|
2811
3041
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2812
3042
|
}, i;
|
|
2813
3043
|
}
|
|
2814
|
-
function
|
|
3044
|
+
function si(...e) {
|
|
2815
3045
|
let t = "", n = 0;
|
|
2816
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++));
|
|
2817
3047
|
return t;
|
|
2818
3048
|
}
|
|
2819
|
-
var
|
|
2820
|
-
function
|
|
3049
|
+
var ai = 256, ui = 1e5;
|
|
3050
|
+
function _i(e) {
|
|
2821
3051
|
const t = String(e).replace(/`/g, "``");
|
|
2822
3052
|
return "[" === t[0] ? "[" + t : t;
|
|
2823
3053
|
}
|
|
2824
|
-
function
|
|
2825
|
-
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("`") : "";
|
|
2826
3056
|
}
|
|
2827
|
-
function
|
|
3057
|
+
function fi(e) {
|
|
2828
3058
|
if ("string" != typeof e) return null;
|
|
2829
3059
|
let t = [], n = "";
|
|
2830
3060
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2845,9 +3075,9 @@ function Jo(e) {
|
|
|
2845
3075
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2846
3076
|
});
|
|
2847
3077
|
}
|
|
2848
|
-
function
|
|
3078
|
+
function gi(e) {
|
|
2849
3079
|
const t = {}, n = (e, r, l) => {
|
|
2850
|
-
if (l >
|
|
3080
|
+
if (l > ai) throw new Error("json2flat: deeper than 256");
|
|
2851
3081
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2852
3082
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2853
3083
|
const o = `[${t}]`;
|
|
@@ -2857,30 +3087,30 @@ function qo(e) {
|
|
|
2857
3087
|
const t = Object.keys(e);
|
|
2858
3088
|
if (t.length > 0) {
|
|
2859
3089
|
for (const o of t) {
|
|
2860
|
-
const t =
|
|
3090
|
+
const t = _i(o);
|
|
2861
3091
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2862
3092
|
}
|
|
2863
3093
|
return;
|
|
2864
3094
|
}
|
|
2865
3095
|
}
|
|
2866
|
-
0 !== l &&
|
|
3096
|
+
0 !== l && Ul(t, r, e);
|
|
2867
3097
|
};
|
|
2868
3098
|
return null == e || n(e, "", 0), t;
|
|
2869
3099
|
}
|
|
2870
|
-
function
|
|
3100
|
+
function di(e) {
|
|
2871
3101
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2872
3102
|
let t = null;
|
|
2873
3103
|
for (const n of Object.keys(e)) {
|
|
2874
|
-
const r =
|
|
3104
|
+
const r = fi(n);
|
|
2875
3105
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2876
|
-
if (r.length >
|
|
3106
|
+
if (r.length > ai) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2877
3107
|
const l = "number" == typeof r[0];
|
|
2878
3108
|
if (null === t) t = l ? [] : {};
|
|
2879
3109
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2880
3110
|
let o = t;
|
|
2881
3111
|
for (let t = 0; t < r.length; t++) {
|
|
2882
3112
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2883
|
-
if (i && l >
|
|
3113
|
+
if (i && l > ui) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2884
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"}`);
|
|
2885
3115
|
if (s) {
|
|
2886
3116
|
if (Array.isArray(o)) {
|
|
@@ -2888,7 +3118,7 @@ function Ho(e) {
|
|
|
2888
3118
|
o[l] = e[n];
|
|
2889
3119
|
} else {
|
|
2890
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`);
|
|
2891
|
-
|
|
3121
|
+
Ul(o, l, e[n]);
|
|
2892
3122
|
}
|
|
2893
3123
|
break;
|
|
2894
3124
|
}
|
|
@@ -2896,7 +3126,7 @@ function Ho(e) {
|
|
|
2896
3126
|
if (Array.isArray(o)) {
|
|
2897
3127
|
for (; o.length <= l;) o.push(null);
|
|
2898
3128
|
u = o[l], null == u && (u = a ? [] : {}, o[l] = u);
|
|
2899
|
-
} else u =
|
|
3129
|
+
} else u = Pl(o, l) ? void 0 : o[l], void 0 === u && (u = a ? [] : {}, Ul(o, l, u));
|
|
2900
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`);
|
|
2901
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"}`);
|
|
2902
3132
|
o = u;
|
|
@@ -2904,68 +3134,68 @@ function Ho(e) {
|
|
|
2904
3134
|
}
|
|
2905
3135
|
return null === t ? {} : t;
|
|
2906
3136
|
}
|
|
2907
|
-
function
|
|
3137
|
+
function bi(e, t) {
|
|
2908
3138
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2909
3139
|
}
|
|
2910
|
-
function
|
|
3140
|
+
function pi(e, t) {
|
|
2911
3141
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2912
3142
|
added: {},
|
|
2913
3143
|
removed: {},
|
|
2914
3144
|
changed: {}
|
|
2915
3145
|
};
|
|
2916
|
-
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, {
|
|
2917
3147
|
from: n[e],
|
|
2918
3148
|
to: r[e]
|
|
2919
|
-
}) :
|
|
2920
|
-
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]);
|
|
2921
3151
|
return l;
|
|
2922
3152
|
}
|
|
2923
|
-
function
|
|
3153
|
+
function mi(e, t) {
|
|
2924
3154
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2925
3155
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2926
3156
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
2927
|
-
for (const n of Object.keys(t.added || {}))
|
|
3157
|
+
for (const n of Object.keys(t.added || {})) Ul(e, n, t.added[n]);
|
|
2928
3158
|
for (const n of Object.keys(t.changed || {})) {
|
|
2929
3159
|
const r = t.changed[n];
|
|
2930
3160
|
if (!r || !Object.prototype.hasOwnProperty.call(r, "to")) throw new Error(`flat_apply: changed '${n}' without a 'to'`);
|
|
2931
|
-
|
|
3161
|
+
Ul(e, n, r.to);
|
|
2932
3162
|
}
|
|
2933
3163
|
return e;
|
|
2934
3164
|
}
|
|
2935
|
-
function
|
|
3165
|
+
function hi(e) {
|
|
2936
3166
|
return "persistent-attrs-" + Rt(e);
|
|
2937
3167
|
}
|
|
2938
|
-
function
|
|
2939
|
-
let n = Xt(e, v.SDF_PERSIST), r =
|
|
2940
|
-
if (r &&
|
|
2941
|
-
let l =
|
|
2942
|
-
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);
|
|
2943
3173
|
}
|
|
2944
3174
|
}
|
|
2945
|
-
function
|
|
2946
|
-
let n =
|
|
2947
|
-
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);
|
|
2948
3178
|
}
|
|
2949
|
-
function
|
|
2950
|
-
let n =
|
|
2951
|
-
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);
|
|
2952
3182
|
}
|
|
2953
|
-
function
|
|
2954
|
-
let n =
|
|
2955
|
-
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;
|
|
2956
3186
|
}
|
|
2957
|
-
function
|
|
2958
|
-
if (
|
|
3187
|
+
function Oi(e) {
|
|
3188
|
+
if (pl(e) && 1 === gl(e)) {
|
|
2959
3189
|
let t = e[0];
|
|
2960
|
-
return
|
|
3190
|
+
return Ll(t, "size") ? t.size : 1;
|
|
2961
3191
|
}
|
|
2962
|
-
return
|
|
3192
|
+
return gl(e);
|
|
2963
3193
|
}
|
|
2964
|
-
function
|
|
2965
|
-
if (
|
|
3194
|
+
function Si(e, t) {
|
|
3195
|
+
if (ml(t)) {
|
|
2966
3196
|
if (-1 === t.indexOf("^")) {
|
|
2967
3197
|
let n, r, l = e.fkey;
|
|
2968
|
-
if (1 !==
|
|
3198
|
+
if (1 !== cl(l)) return cr("bad fkey 1"), cr(e), cr(t), null;
|
|
2969
3199
|
for (const e of Object.keys(l)) {
|
|
2970
3200
|
n = e, r = l[e];
|
|
2971
3201
|
break;
|
|
@@ -2985,21 +3215,21 @@ function oi(e, t) {
|
|
|
2985
3215
|
};
|
|
2986
3216
|
}
|
|
2987
3217
|
}
|
|
2988
|
-
return
|
|
3218
|
+
return bl(t) ? {
|
|
2989
3219
|
topic_name: t.topic_name,
|
|
2990
3220
|
id: t.id,
|
|
2991
3221
|
hook_name: t.hook_name
|
|
2992
3222
|
} : (cr("bad fkey 3"), cr(e), cr(t), null);
|
|
2993
3223
|
}
|
|
2994
|
-
function
|
|
2995
|
-
let n =
|
|
3224
|
+
function Ni(e, t) {
|
|
3225
|
+
let n = Si(e, t);
|
|
2996
3226
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2997
3227
|
}
|
|
2998
|
-
function
|
|
2999
|
-
if (
|
|
3228
|
+
function wi(e, t) {
|
|
3229
|
+
if (ml(t)) {
|
|
3000
3230
|
if (-1 === t.indexOf("^")) {
|
|
3001
3231
|
let n, r = e.hook;
|
|
3002
|
-
if (1 !==
|
|
3232
|
+
if (1 !== cl(r)) return cr("bad hook 1"), cr(e), cr(t), null;
|
|
3003
3233
|
for (let e of Object.keys(r)) {
|
|
3004
3234
|
n = e, r[e];
|
|
3005
3235
|
break;
|
|
@@ -3017,12 +3247,12 @@ function si(e, t) {
|
|
|
3017
3247
|
};
|
|
3018
3248
|
}
|
|
3019
3249
|
}
|
|
3020
|
-
return
|
|
3250
|
+
return bl(t) ? {
|
|
3021
3251
|
topic_name: t.topic_name,
|
|
3022
3252
|
id: t.id
|
|
3023
3253
|
} : (cr("bad hook 3"), cr(e), cr(t), null);
|
|
3024
3254
|
}
|
|
3025
|
-
var
|
|
3255
|
+
var ji = [
|
|
3026
3256
|
"string",
|
|
3027
3257
|
"integer",
|
|
3028
3258
|
"object",
|
|
@@ -3032,7 +3262,7 @@ var ai = [
|
|
|
3032
3262
|
"real",
|
|
3033
3263
|
"boolean",
|
|
3034
3264
|
"blob"
|
|
3035
|
-
],
|
|
3265
|
+
], $i = [
|
|
3036
3266
|
"persistent",
|
|
3037
3267
|
"required",
|
|
3038
3268
|
"notnull",
|
|
@@ -3044,7 +3274,7 @@ var ai = [
|
|
|
3044
3274
|
"stats",
|
|
3045
3275
|
"rstats",
|
|
3046
3276
|
"pstats"
|
|
3047
|
-
],
|
|
3277
|
+
], Ri = [
|
|
3048
3278
|
"hook",
|
|
3049
3279
|
"fkey",
|
|
3050
3280
|
"enum",
|
|
@@ -3073,7 +3303,7 @@ var ai = [
|
|
|
3073
3303
|
"coordinates",
|
|
3074
3304
|
"gbuffer"
|
|
3075
3305
|
];
|
|
3076
|
-
function
|
|
3306
|
+
function Di(e) {
|
|
3077
3307
|
let t = {
|
|
3078
3308
|
name: e.id,
|
|
3079
3309
|
header: e.header,
|
|
@@ -3092,7 +3322,7 @@ function ci(e) {
|
|
|
3092
3322
|
if (!e.flag) return t;
|
|
3093
3323
|
for (let n = 0; n < e.flag.length; n++) {
|
|
3094
3324
|
let r = e.flag[n];
|
|
3095
|
-
if (
|
|
3325
|
+
if (po(Ri, r)) {
|
|
3096
3326
|
switch (r) {
|
|
3097
3327
|
case "enum":
|
|
3098
3328
|
t.enum_list = e.enum;
|
|
@@ -3106,7 +3336,7 @@ function ci(e) {
|
|
|
3106
3336
|
case "file": t.is_file = !0;
|
|
3107
3337
|
}
|
|
3108
3338
|
t.type = r;
|
|
3109
|
-
} else if (
|
|
3339
|
+
} else if (po($i, r)) switch (r) {
|
|
3110
3340
|
case "writable":
|
|
3111
3341
|
t.is_writable = !0;
|
|
3112
3342
|
break;
|
|
@@ -3119,7 +3349,7 @@ function ci(e) {
|
|
|
3119
3349
|
}
|
|
3120
3350
|
return t.is_file && (t.type = "file"), t;
|
|
3121
3351
|
}
|
|
3122
|
-
function
|
|
3352
|
+
function Ai(e, t) {
|
|
3123
3353
|
let n = {
|
|
3124
3354
|
name: e,
|
|
3125
3355
|
header: e,
|
|
@@ -3133,13 +3363,13 @@ function fi(e, t) {
|
|
|
3133
3363
|
placeholder: void 0,
|
|
3134
3364
|
fkey: null
|
|
3135
3365
|
};
|
|
3136
|
-
if (
|
|
3366
|
+
if (ml(t)) {
|
|
3137
3367
|
let e = t.split(".");
|
|
3138
3368
|
for (let t = 0; t < e.length; t++) {
|
|
3139
3369
|
let r = e[t];
|
|
3140
|
-
if (
|
|
3141
|
-
else if (
|
|
3142
|
-
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) {
|
|
3143
3373
|
case "writable":
|
|
3144
3374
|
n.is_writable = !0;
|
|
3145
3375
|
break;
|
|
@@ -3151,35 +3381,35 @@ function fi(e, t) {
|
|
|
3151
3381
|
}
|
|
3152
3382
|
}
|
|
3153
3383
|
n.real_type || (n.real_type = "string");
|
|
3154
|
-
} 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);
|
|
3155
3385
|
return n.type || (n.type = n.real_type), n;
|
|
3156
3386
|
}
|
|
3157
|
-
function
|
|
3387
|
+
function ki(e, t) {
|
|
3158
3388
|
let n = {};
|
|
3159
3389
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
3160
3390
|
let l;
|
|
3161
|
-
|
|
3162
|
-
let o =
|
|
3163
|
-
|
|
3391
|
+
bl(r) && (l = r.default);
|
|
3392
|
+
let o = Jl(null, t, e, l);
|
|
3393
|
+
ol(n, e, o);
|
|
3164
3394
|
}), n;
|
|
3165
3395
|
}
|
|
3166
|
-
var
|
|
3396
|
+
var Ii = [
|
|
3167
3397
|
N(T.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3168
3398
|
N(T.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3169
3399
|
N(T.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3170
3400
|
S()
|
|
3171
|
-
],
|
|
3401
|
+
], Ci = {
|
|
3172
3402
|
periodic: !1,
|
|
3173
3403
|
msec: 0,
|
|
3174
3404
|
timer_id: -1
|
|
3175
|
-
},
|
|
3176
|
-
function
|
|
3405
|
+
}, Li = null;
|
|
3406
|
+
function Pi(e, t, n, r) {
|
|
3177
3407
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3178
3408
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
3179
3409
|
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3180
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;
|
|
3181
3411
|
}
|
|
3182
|
-
var
|
|
3412
|
+
var Ui = {
|
|
3183
3413
|
mt_create: function(e) {
|
|
3184
3414
|
let t = e.priv;
|
|
3185
3415
|
const n = nn(e, "subscriber");
|
|
@@ -3204,31 +3434,31 @@ var hi = {
|
|
|
3204
3434
|
},
|
|
3205
3435
|
mt_destroy: function(e) {}
|
|
3206
3436
|
};
|
|
3207
|
-
function
|
|
3437
|
+
function Fi() {
|
|
3208
3438
|
return function(e) {
|
|
3209
|
-
if (
|
|
3439
|
+
if (Li) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3210
3440
|
const t = [["ST_IDLE", [[
|
|
3211
3441
|
"EV_TIMEOUT",
|
|
3212
|
-
|
|
3442
|
+
Pi,
|
|
3213
3443
|
null
|
|
3214
3444
|
]]]];
|
|
3215
|
-
return (
|
|
3445
|
+
return (Li = Ae(e, [
|
|
3216
3446
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
3217
3447
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
3218
3448
|
[0, 0]
|
|
3219
|
-
], t,
|
|
3449
|
+
], t, Ui, 0, Ii, Ci, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
3220
3450
|
}("C_TIMER");
|
|
3221
3451
|
}
|
|
3222
|
-
function
|
|
3452
|
+
function Vi(e, t) {
|
|
3223
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);
|
|
3224
3454
|
}
|
|
3225
|
-
function
|
|
3455
|
+
function Gi(e, t) {
|
|
3226
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);
|
|
3227
3457
|
}
|
|
3228
|
-
function
|
|
3458
|
+
function Mi(e) {
|
|
3229
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);
|
|
3230
3460
|
}
|
|
3231
|
-
var
|
|
3461
|
+
var Wi = [
|
|
3232
3462
|
N(T.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3233
3463
|
N(T.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3234
3464
|
N(T.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -3248,51 +3478,60 @@ var Oi = [
|
|
|
3248
3478
|
N(T.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3249
3479
|
N(T.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3250
3480
|
S()
|
|
3251
|
-
],
|
|
3252
|
-
function
|
|
3481
|
+
], xi = { gobj_timer: null }, Ki = null;
|
|
3482
|
+
function Yi(e, t, n, r) {
|
|
3253
3483
|
let l = Qt(e, t);
|
|
3254
|
-
return
|
|
3484
|
+
return bl(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
3255
3485
|
}
|
|
3256
|
-
|
|
3486
|
+
var Bi = -2147483648, Ji = 2147483647;
|
|
3487
|
+
function qi(e) {
|
|
3257
3488
|
if (!0 === e || !1 === e) return e;
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3489
|
+
if ("number" == typeof e) return !Number.isInteger(e) || e < Bi || e > Ji ? null : 0 !== e;
|
|
3490
|
+
if ("string" != typeof e || "" === e) return null;
|
|
3491
|
+
let t = e.toLowerCase();
|
|
3492
|
+
if ("set" === t) return !0;
|
|
3493
|
+
if ("reset" === t) return !1;
|
|
3494
|
+
if (/^-?(0|[1-9][0-9]*)$/.test(e)) {
|
|
3495
|
+
let t = Number(e);
|
|
3496
|
+
return t < Bi || t > Ji ? null : 0 !== t;
|
|
3497
|
+
}
|
|
3498
|
+
return "true" === t || "yes" === t || "on" === t || "false" !== t && "no" !== t && "off" !== t && null;
|
|
3499
|
+
}
|
|
3500
|
+
function Hi() {
|
|
3262
3501
|
return `${Nt()}^${St()}`;
|
|
3263
3502
|
}
|
|
3264
|
-
function
|
|
3503
|
+
function zi(e, t, n, r) {
|
|
3265
3504
|
return Pn(e, t, n), 0;
|
|
3266
3505
|
}
|
|
3267
|
-
var
|
|
3506
|
+
var Qi = {
|
|
3268
3507
|
mt_create: function(e) {
|
|
3269
3508
|
let t = e.priv;
|
|
3270
|
-
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) {
|
|
3271
3510
|
let t = Qt(e, "trace_levels");
|
|
3272
|
-
if (!
|
|
3511
|
+
if (!bl(t)) return 0;
|
|
3273
3512
|
let n = t.__global_trace__;
|
|
3274
|
-
if (
|
|
3513
|
+
if (pl(n)) {
|
|
3275
3514
|
ce(4294967295, !1);
|
|
3276
3515
|
for (let e of n) se(e, !0);
|
|
3277
3516
|
}
|
|
3278
3517
|
for (const [n, r] of Object.entries(t)) {
|
|
3279
3518
|
let t = Me(n);
|
|
3280
|
-
if (t) if (
|
|
3519
|
+
if (t) if (pl(r)) {
|
|
3281
3520
|
Ee(t, null, !1);
|
|
3282
3521
|
for (let e of r) Ee(t, e, !0);
|
|
3283
3522
|
} else cr(`${jt(e)}: trace_levels of ${n} MUST be a list`);
|
|
3284
3523
|
}
|
|
3285
3524
|
}(e), function(e) {
|
|
3286
3525
|
let t = Qt(e, "no_trace_levels");
|
|
3287
|
-
if (!
|
|
3526
|
+
if (!bl(t)) return 0;
|
|
3288
3527
|
let n = t.__global_no_trace__;
|
|
3289
|
-
if (
|
|
3528
|
+
if (pl(n)) {
|
|
3290
3529
|
fe(4294967295, !1);
|
|
3291
3530
|
for (let e of n) ae(e, !0);
|
|
3292
3531
|
}
|
|
3293
3532
|
for (const [n, r] of Object.entries(t)) {
|
|
3294
3533
|
let t = Me(n);
|
|
3295
|
-
if (t) if (
|
|
3534
|
+
if (t) if (pl(r)) {
|
|
3296
3535
|
Te(t, null, !1);
|
|
3297
3536
|
for (let e of r) Te(t, e, !0);
|
|
3298
3537
|
} else cr(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
@@ -3301,10 +3540,10 @@ var Di = {
|
|
|
3301
3540
|
},
|
|
3302
3541
|
mt_writing: function(e, t) {},
|
|
3303
3542
|
mt_start: function(e) {
|
|
3304
|
-
return
|
|
3543
|
+
return Gi(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
3305
3544
|
},
|
|
3306
3545
|
mt_stop: function(e) {
|
|
3307
|
-
return
|
|
3546
|
+
return Mi(e.priv.gobj_timer), bt(e), 0;
|
|
3308
3547
|
},
|
|
3309
3548
|
mt_destroy: function(e) {},
|
|
3310
3549
|
mt_play: function(e) {
|
|
@@ -3321,35 +3560,35 @@ var Di = {
|
|
|
3321
3560
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
3322
3561
|
case "set-global-trace":
|
|
3323
3562
|
case "set-global-no-trace": {
|
|
3324
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
3325
|
-
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);
|
|
3326
3565
|
}
|
|
3327
3566
|
case "get-gclass-trace":
|
|
3328
3567
|
case "get-gclass-no-trace":
|
|
3329
3568
|
case "set-gclass-trace":
|
|
3330
3569
|
case "set-gclass-no-trace": {
|
|
3331
3570
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
3332
|
-
if (!i) return o(0, -1, `${
|
|
3571
|
+
if (!i) return o(0, -1, `${Hi()}: what gclass is '${l}'?`, null, null);
|
|
3333
3572
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
3334
|
-
let s = n.level, a =
|
|
3335
|
-
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);
|
|
3336
3575
|
}
|
|
3337
|
-
default: return o(0, -1, `${
|
|
3576
|
+
default: return o(0, -1, `${Hi()}: command not available: ${t}`, null, null);
|
|
3338
3577
|
}
|
|
3339
3578
|
}
|
|
3340
3579
|
};
|
|
3341
|
-
function
|
|
3580
|
+
function Xi() {
|
|
3342
3581
|
return function(e) {
|
|
3343
|
-
if (
|
|
3582
|
+
if (Ki) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3344
3583
|
const t = [["ST_IDLE", [[
|
|
3345
3584
|
"EV_TIMEOUT_PERIODIC",
|
|
3346
|
-
|
|
3585
|
+
zi,
|
|
3347
3586
|
null
|
|
3348
3587
|
]]]];
|
|
3349
|
-
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;
|
|
3350
3589
|
}("C_YUNO");
|
|
3351
3590
|
}
|
|
3352
|
-
var
|
|
3591
|
+
var Zi = "ievent_gate_stack", es = [
|
|
3353
3592
|
N(T.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
3354
3593
|
N(T.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
3355
3594
|
N(T.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3366,15 +3605,15 @@ var ki = "ievent_gate_stack", Ii = [
|
|
|
3366
3605
|
N(T.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3367
3606
|
N(T.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3368
3607
|
S()
|
|
3369
|
-
],
|
|
3608
|
+
], ts = [
|
|
3370
3609
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3371
3610
|
["ievents2", "Trace inter-events with full kw"],
|
|
3372
3611
|
["identity-card", "Trace identity_card messages"]
|
|
3373
3612
|
];
|
|
3374
|
-
function
|
|
3613
|
+
function ns(e) {
|
|
3375
3614
|
return !!(3 & Z(e));
|
|
3376
3615
|
}
|
|
3377
|
-
var
|
|
3616
|
+
var rs = {
|
|
3378
3617
|
url: null,
|
|
3379
3618
|
remote_yuno_name: null,
|
|
3380
3619
|
remote_yuno_role: null,
|
|
@@ -3384,8 +3623,8 @@ var Pi = {
|
|
|
3384
3623
|
websocket: null,
|
|
3385
3624
|
inside_on_open: !1,
|
|
3386
3625
|
retry_ms: 0
|
|
3387
|
-
},
|
|
3388
|
-
function
|
|
3626
|
+
}, ls = null;
|
|
3627
|
+
function os(e) {
|
|
3389
3628
|
e.priv.websocket && cr("Websocket ALREADY setup");
|
|
3390
3629
|
const t = tn(e, "url");
|
|
3391
3630
|
dr(`====> Starting WebSocket to '${t}' (${Rt(e)})`);
|
|
@@ -3400,7 +3639,7 @@ function Fi(e) {
|
|
|
3400
3639
|
code: 1006,
|
|
3401
3640
|
reason: r.message,
|
|
3402
3641
|
was_clean: !1
|
|
3403
|
-
}, e) < 0 &&
|
|
3642
|
+
}, e) < 0 && Vi(e.priv.gobj_timer, ps(e)), null;
|
|
3404
3643
|
}
|
|
3405
3644
|
return r ? (r.onopen = () => {
|
|
3406
3645
|
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_OPEN", {
|
|
@@ -3422,7 +3661,7 @@ function Fi(e) {
|
|
|
3422
3661
|
}, e));
|
|
3423
3662
|
}, r) : (cr(`${Rt(e)}: Failed to initialize WebSocket.`), null);
|
|
3424
3663
|
}
|
|
3425
|
-
function
|
|
3664
|
+
function is(e, t = 1e3, n = "") {
|
|
3426
3665
|
let r = e.priv, l = r.websocket;
|
|
3427
3666
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3428
3667
|
dr(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -3433,25 +3672,25 @@ function Vi(e, t = 1e3, n = "") {
|
|
|
3433
3672
|
}
|
|
3434
3673
|
} else fr("WebSocket is already closed or in the process of closing.");
|
|
3435
3674
|
}
|
|
3436
|
-
function
|
|
3437
|
-
let r =
|
|
3675
|
+
function ss(e, t, n) {
|
|
3676
|
+
let r = ei();
|
|
3438
3677
|
try {
|
|
3439
|
-
dr("\n" + r + " " + t + "\n"),
|
|
3678
|
+
dr("\n" + r + " " + t + "\n"), zr(n);
|
|
3440
3679
|
} catch (e) {
|
|
3441
3680
|
dr("ERROR in trace_inter_event: " + e);
|
|
3442
3681
|
}
|
|
3443
3682
|
}
|
|
3444
|
-
var
|
|
3683
|
+
var as = class {
|
|
3445
3684
|
constructor(e, t) {
|
|
3446
3685
|
this.event = e, this.kw = t || {};
|
|
3447
3686
|
}
|
|
3448
3687
|
};
|
|
3449
|
-
function
|
|
3688
|
+
function us(e, t, n, r) {
|
|
3450
3689
|
return function(e, t) {
|
|
3451
3690
|
let n = e.priv, r = JSON.stringify(t);
|
|
3452
|
-
if (
|
|
3691
|
+
if (ns(e)) {
|
|
3453
3692
|
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o = Qt(Ot(), "trace_ievent_callback");
|
|
3454
|
-
o ? o(l, t, 1, r.length) :
|
|
3693
|
+
o ? o(l, t, 1, r.length) : ss(0, l, t);
|
|
3455
3694
|
}
|
|
3456
3695
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return fr(`${Rt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3457
3696
|
try {
|
|
@@ -3461,21 +3700,21 @@ function Wi(e, t, n, r) {
|
|
|
3461
3700
|
}
|
|
3462
3701
|
return 0;
|
|
3463
3702
|
}(e, function(e, t) {
|
|
3464
|
-
return
|
|
3703
|
+
return Nl(e) ? (cr("iev_create() event NULL"), null) : new as(e, t);
|
|
3465
3704
|
}(t, n));
|
|
3466
3705
|
}
|
|
3467
|
-
function
|
|
3468
|
-
return
|
|
3706
|
+
function _s(e, t, n) {
|
|
3707
|
+
return Nl(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3469
3708
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3470
3709
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3471
3710
|
dst_service: n,
|
|
3472
3711
|
src_yuno: St(),
|
|
3473
3712
|
src_role: Nt(),
|
|
3474
3713
|
src_service: t,
|
|
3475
|
-
host:
|
|
3714
|
+
host: ri()
|
|
3476
3715
|
};
|
|
3477
3716
|
}
|
|
3478
|
-
function
|
|
3717
|
+
function cs(e) {
|
|
3479
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");
|
|
3480
3719
|
i && i.length || (i = Qt(Ot(), "required_services"));
|
|
3481
3720
|
let s = {
|
|
@@ -3493,27 +3732,27 @@ function Ki(e) {
|
|
|
3493
3732
|
username: tn(Ot(), "__username__"),
|
|
3494
3733
|
launch_id: 0,
|
|
3495
3734
|
yuno_startdate: tn(Ot(), "start_date"),
|
|
3496
|
-
id:
|
|
3735
|
+
id: ri(),
|
|
3497
3736
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3498
3737
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3499
3738
|
required_services: i
|
|
3500
3739
|
};
|
|
3501
|
-
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);
|
|
3502
3741
|
}
|
|
3503
|
-
function
|
|
3504
|
-
if (
|
|
3742
|
+
function fs(e, t) {
|
|
3743
|
+
if (Nl(t.event)) return -1;
|
|
3505
3744
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3506
3745
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3507
|
-
return
|
|
3746
|
+
return To(e, n, Zi, _s(e, jt(s), i)), Oo(e, n, "__subscribing__"), us(e, t.event, n);
|
|
3508
3747
|
}
|
|
3509
|
-
function
|
|
3748
|
+
function gs(e, t, n, r) {
|
|
3510
3749
|
let l = e.priv;
|
|
3511
|
-
return Et(e) && (l.websocket =
|
|
3750
|
+
return Et(e) && (l.websocket = os(e)), 0;
|
|
3512
3751
|
}
|
|
3513
|
-
function
|
|
3514
|
-
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;
|
|
3515
3754
|
}
|
|
3516
|
-
function
|
|
3755
|
+
function bs(e, t, n, r) {
|
|
3517
3756
|
let l = e.priv, o = n.url;
|
|
3518
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", {
|
|
3519
3758
|
url: o,
|
|
@@ -3528,25 +3767,25 @@ function qi(e, t, n, r) {
|
|
|
3528
3767
|
code: n.code,
|
|
3529
3768
|
reason: n.reason,
|
|
3530
3769
|
was_clean: n.was_clean
|
|
3531
|
-
})), Et(e) &&
|
|
3770
|
+
})), Et(e) && Vi(l.gobj_timer, ps(e))), 0;
|
|
3532
3771
|
}
|
|
3533
|
-
function
|
|
3772
|
+
function ps(e) {
|
|
3534
3773
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3535
3774
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3536
3775
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
3537
3776
|
return Math.max(1, Math.round(o));
|
|
3538
3777
|
}
|
|
3539
|
-
function
|
|
3540
|
-
return
|
|
3778
|
+
function ms(e, t, n, r) {
|
|
3779
|
+
return cs(e), 0;
|
|
3541
3780
|
}
|
|
3542
|
-
function
|
|
3781
|
+
function hs(e, t, n, r) {
|
|
3543
3782
|
let l = e.priv;
|
|
3544
|
-
|
|
3545
|
-
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", "");
|
|
3546
3785
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3547
|
-
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", {});
|
|
3548
3787
|
if (u < 0) {
|
|
3549
|
-
|
|
3788
|
+
is(e);
|
|
3550
3789
|
let t = {
|
|
3551
3790
|
url: tn(e, "url"),
|
|
3552
3791
|
result: u,
|
|
@@ -3571,12 +3810,12 @@ function Qi(e, t, n, r) {
|
|
|
3571
3810
|
}
|
|
3572
3811
|
l.inside_on_open = !1, function(e) {
|
|
3573
3812
|
let t = In(e, null, null, null);
|
|
3574
|
-
for (let n = 0; n < t.length; n++)
|
|
3813
|
+
for (let n = 0; n < t.length; n++) fs(e, t[n]);
|
|
3575
3814
|
}(e);
|
|
3576
3815
|
}
|
|
3577
3816
|
return 0;
|
|
3578
3817
|
}
|
|
3579
|
-
function
|
|
3818
|
+
function Es(e, t, n, r) {
|
|
3580
3819
|
let l = e.priv.url, o = function(e, t) {
|
|
3581
3820
|
let n;
|
|
3582
3821
|
try {
|
|
@@ -3595,37 +3834,37 @@ function Xi(e, t, n, r) {
|
|
|
3595
3834
|
} : (fr(`${Rt(e)}: parsing inter_event: kw not a json object`), null) : (fr(`${Rt(e)}: parsing inter_kw: no kw`), null);
|
|
3596
3835
|
}(e, n.data);
|
|
3597
3836
|
if (!o) return fr(`${Rt(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
3598
|
-
if (
|
|
3837
|
+
if (ns(e)) {
|
|
3599
3838
|
let e = jt(Ot()) + " <== " + l, t = n.data.length, r = Qt(Ot(), "trace_ievent_callback");
|
|
3600
|
-
r ? r(e, o, 2, t) :
|
|
3839
|
+
r ? r(e, o, 2, t) : ss(0, e, o);
|
|
3601
3840
|
}
|
|
3602
3841
|
let i = o.event, s = o.kw;
|
|
3603
3842
|
if ("ST_SESSION" !== cn(e)) {
|
|
3604
3843
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3605
3844
|
if (!(Tn(e, i, s, e) < 0)) return 0;
|
|
3606
3845
|
} else cr(`${Rt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3607
|
-
return
|
|
3846
|
+
return is(e), -1;
|
|
3608
3847
|
}
|
|
3609
3848
|
o = null;
|
|
3610
|
-
let a =
|
|
3849
|
+
let a = So(e, s), u = vo(e, s, Zi), _ = Kl(e, u, "dst_role", "");
|
|
3611
3850
|
if (_.toLowerCase() !== Nt().toLowerCase()) return cr(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3612
|
-
let c =
|
|
3851
|
+
let c = Kl(e, u, "dst_service", "");
|
|
3613
3852
|
if ("__subscribing__" === a) return fr(`${Rt(e)}: subscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3614
3853
|
if ("__unsubscribing__" === a) return fr(`${Rt(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3615
3854
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return Tn(e, i, s, e), 0;
|
|
3616
|
-
if (!
|
|
3855
|
+
if (!Nl(c)) {
|
|
3617
3856
|
let t = Ke(c, !1);
|
|
3618
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);
|
|
3619
3858
|
}
|
|
3620
3859
|
return It(e) ? Tn(At(e), i, s, e) : Pn(e, i, s), 0;
|
|
3621
3860
|
}
|
|
3622
|
-
function
|
|
3861
|
+
function ys(e, t, n, r) {
|
|
3623
3862
|
return 0;
|
|
3624
3863
|
}
|
|
3625
|
-
function
|
|
3864
|
+
function Ts(e, t, n, r) {
|
|
3626
3865
|
return 0;
|
|
3627
3866
|
}
|
|
3628
|
-
var
|
|
3867
|
+
var vs = {
|
|
3629
3868
|
mt_create: function(e) {
|
|
3630
3869
|
let t = e.priv;
|
|
3631
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);
|
|
@@ -3655,72 +3894,72 @@ var ts = {
|
|
|
3655
3894
|
code: 1e3,
|
|
3656
3895
|
reason: "restarted",
|
|
3657
3896
|
was_clean: !0
|
|
3658
|
-
}, e),
|
|
3897
|
+
}, e), Mi(t.gobj_timer)), t.websocket = os(e), 0;
|
|
3659
3898
|
},
|
|
3660
3899
|
mt_stop: function(e) {
|
|
3661
3900
|
let t = e.priv;
|
|
3662
|
-
return
|
|
3901
|
+
return Mi(t.gobj_timer), t.websocket && is(e), 0;
|
|
3663
3902
|
},
|
|
3664
3903
|
mt_destroy: function(e) {},
|
|
3665
3904
|
mt_stats: function(e, t, n, r) {
|
|
3666
3905
|
if ("ST_SESSION" !== cn(e)) return cr("Not in session"), null;
|
|
3667
3906
|
n || (n = {});
|
|
3668
|
-
let l =
|
|
3669
|
-
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", {
|
|
3670
3909
|
stats: t,
|
|
3671
3910
|
kw: o
|
|
3672
|
-
}),
|
|
3911
|
+
}), To(e, n, Zi, l), n.__stats__ = t, Oo(e, n, "__stats__"), us(e, "EV_MT_STATS", n, r), null;
|
|
3673
3912
|
},
|
|
3674
3913
|
mt_command_parser: function(e, t, n, r) {
|
|
3675
3914
|
if ("ST_SESSION" !== cn(e)) return cr("Not in session"), null;
|
|
3676
3915
|
n || (n = {});
|
|
3677
|
-
let l =
|
|
3678
|
-
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", {
|
|
3679
3918
|
command: t,
|
|
3680
3919
|
kw: o
|
|
3681
|
-
}),
|
|
3920
|
+
}), To(e, n, Zi, l), n.__command__ = t, Oo(e, n, "__command__"), us(e, "EV_MT_COMMAND", n, r), null;
|
|
3682
3921
|
},
|
|
3683
3922
|
mt_inject_event: function(e, t, n, r) {
|
|
3684
3923
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3685
|
-
if (n =
|
|
3924
|
+
if (n = el({}, bl(n) ? n : {}), bl(n.__md_iev__) && (n.__md_iev__ = Qr(n.__md_iev__)), vo(e, n, Zi));
|
|
3686
3925
|
else {
|
|
3687
|
-
let l =
|
|
3688
|
-
|
|
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);
|
|
3689
3928
|
}
|
|
3690
|
-
return
|
|
3929
|
+
return Oo(e, n, "__message__"), us(e, t, n, r);
|
|
3691
3930
|
},
|
|
3692
3931
|
mt_subscription_added: function(e, t) {
|
|
3693
3932
|
let n = e.priv;
|
|
3694
|
-
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;
|
|
3695
3934
|
},
|
|
3696
3935
|
mt_subscription_deleted: function(e, t) {
|
|
3697
3936
|
let n = e.priv;
|
|
3698
3937
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3699
3938
|
if (n.inside_on_open) return 0;
|
|
3700
|
-
if (
|
|
3939
|
+
if (Nl(t.event)) return 0;
|
|
3701
3940
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3702
3941
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3703
|
-
return
|
|
3942
|
+
return To(e, r, Zi, _s(e, jt(a), s)), Oo(e, r, "__unsubscribing__"), us(e, t.event, r, e);
|
|
3704
3943
|
}
|
|
3705
3944
|
};
|
|
3706
|
-
function
|
|
3945
|
+
function Os() {
|
|
3707
3946
|
return function(e) {
|
|
3708
|
-
if (
|
|
3947
|
+
if (ls) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3709
3948
|
const t = [
|
|
3710
3949
|
["ST_DISCONNECTED", [
|
|
3711
3950
|
[
|
|
3712
3951
|
"EV_ON_OPEN",
|
|
3713
|
-
|
|
3952
|
+
ds,
|
|
3714
3953
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3715
3954
|
],
|
|
3716
3955
|
[
|
|
3717
3956
|
"EV_ON_CLOSE",
|
|
3718
|
-
|
|
3957
|
+
bs,
|
|
3719
3958
|
null
|
|
3720
3959
|
],
|
|
3721
3960
|
[
|
|
3722
3961
|
"EV_TIMEOUT",
|
|
3723
|
-
|
|
3962
|
+
gs,
|
|
3724
3963
|
null
|
|
3725
3964
|
],
|
|
3726
3965
|
[
|
|
@@ -3732,22 +3971,22 @@ function ns() {
|
|
|
3732
3971
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3733
3972
|
[
|
|
3734
3973
|
"EV_ON_MESSAGE",
|
|
3735
|
-
|
|
3974
|
+
Es,
|
|
3736
3975
|
null
|
|
3737
3976
|
],
|
|
3738
3977
|
[
|
|
3739
3978
|
"EV_IDENTITY_CARD_ACK",
|
|
3740
|
-
|
|
3979
|
+
hs,
|
|
3741
3980
|
null
|
|
3742
3981
|
],
|
|
3743
3982
|
[
|
|
3744
3983
|
"EV_ON_CLOSE",
|
|
3745
|
-
|
|
3984
|
+
bs,
|
|
3746
3985
|
"ST_DISCONNECTED"
|
|
3747
3986
|
],
|
|
3748
3987
|
[
|
|
3749
3988
|
"EV_TIMEOUT",
|
|
3750
|
-
|
|
3989
|
+
ms,
|
|
3751
3990
|
null
|
|
3752
3991
|
],
|
|
3753
3992
|
[
|
|
@@ -3759,22 +3998,22 @@ function ns() {
|
|
|
3759
3998
|
["ST_SESSION", [
|
|
3760
3999
|
[
|
|
3761
4000
|
"EV_ON_MESSAGE",
|
|
3762
|
-
|
|
4001
|
+
Es,
|
|
3763
4002
|
null
|
|
3764
4003
|
],
|
|
3765
4004
|
[
|
|
3766
4005
|
"EV_MT_STATS",
|
|
3767
|
-
|
|
4006
|
+
ys,
|
|
3768
4007
|
null
|
|
3769
4008
|
],
|
|
3770
4009
|
[
|
|
3771
4010
|
"EV_MT_COMMAND",
|
|
3772
|
-
|
|
4011
|
+
Ts,
|
|
3773
4012
|
null
|
|
3774
4013
|
],
|
|
3775
4014
|
[
|
|
3776
4015
|
"EV_ON_CLOSE",
|
|
3777
|
-
|
|
4016
|
+
bs,
|
|
3778
4017
|
"ST_DISCONNECTED"
|
|
3779
4018
|
],
|
|
3780
4019
|
[
|
|
@@ -3785,7 +4024,7 @@ function ns() {
|
|
|
3785
4024
|
]],
|
|
3786
4025
|
[null, null]
|
|
3787
4026
|
];
|
|
3788
|
-
return (
|
|
4027
|
+
return (ls = Ae(e, [
|
|
3789
4028
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3790
4029
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3791
4030
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3796,9 +4035,9 @@ function ns() {
|
|
|
3796
4035
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3797
4036
|
["EV_TIMEOUT", 0],
|
|
3798
4037
|
[null, 0]
|
|
3799
|
-
], t,
|
|
4038
|
+
], t, vs, 0, es, rs, 0, 0, ts, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3800
4039
|
}("C_IEVENT_CLI");
|
|
3801
4040
|
}
|
|
3802
|
-
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 };
|
|
3803
4042
|
|
|
3804
4043
|
//# sourceMappingURL=gobj-js.es.min.js.map
|