@yuneta/gobj-js 7.26.12 → 7.26.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gobj-js.cjs.js +36 -9
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +192 -184
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +36 -9
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +216 -208
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +36 -9
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +192 -184
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +36 -9
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +192 -184
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -714,7 +714,7 @@ function Be(e, t) {
|
|
|
714
714
|
t.parent && ir(`_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 =
|
|
717
|
+
let n = Io(e.dl_children, t);
|
|
718
718
|
n >= 0 && (Vr(e.dl_children, n), t.parent = null);
|
|
719
719
|
}
|
|
720
720
|
function qe(e, t) {
|
|
@@ -1223,7 +1223,7 @@ function Tn(e, n, r, l) {
|
|
|
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 = Po(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
1228
|
r && le(e) && Mr(r) && wr(r);
|
|
1229
1229
|
}
|
|
@@ -1601,27 +1601,27 @@ function or(e) {
|
|
|
1601
1601
|
return n;
|
|
1602
1602
|
}
|
|
1603
1603
|
function ir(e, ...t) {
|
|
1604
|
-
let n = or(e, ...t), r =
|
|
1604
|
+
let n = or(e, ...t), r = Ao();
|
|
1605
1605
|
Mn && (Mn === Gn.error ? Zn("error", n) && Mn("%c" + r + " ERROR: " + String(n), "color:red") : (Zn("error", n) && Gn.error("%c" + r + " ERROR: " + String(n), "color:red"), Mn(`${r} ERROR: ${String(n)}`))), tr("error", n, r);
|
|
1606
1606
|
}
|
|
1607
1607
|
function sr(e, ...t) {
|
|
1608
|
-
let n = or(e, ...t), r =
|
|
1608
|
+
let n = or(e, ...t), r = Ao();
|
|
1609
1609
|
Wn && (Wn === Gn.warn ? Zn("warning", n) && Wn("%c" + r + " WARNING: " + String(n), "color:yellow") : (Zn("warning", n) && Gn.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), Wn(`${r} WARNING: ${String(n)}`))), tr("warning", n, r);
|
|
1610
1610
|
}
|
|
1611
1611
|
function ar(e, ...t) {
|
|
1612
|
-
let n = or(e, ...t), r =
|
|
1612
|
+
let n = or(e, ...t), r = Ao();
|
|
1613
1613
|
xn && Zn("info", n) && xn("%c" + r + " INFO: " + String(n), "color:cyan"), tr("info", n, r);
|
|
1614
1614
|
}
|
|
1615
1615
|
function ur(e, ...t) {
|
|
1616
|
-
let n = or(e, ...t), r =
|
|
1616
|
+
let n = or(e, ...t), r = Ao();
|
|
1617
1617
|
Kn && Zn("debug", n) && Kn("%c" + r + " DEBUG: " + String(n), "color:silver"), tr("debug", n, r);
|
|
1618
1618
|
}
|
|
1619
1619
|
function _r(e, ...t) {
|
|
1620
|
-
let n = or(e, ...t), r =
|
|
1620
|
+
let n = or(e, ...t), r = Ao();
|
|
1621
1621
|
Kn && Zn("msg", n) && Kn("%c" + r + " MSG: " + String(n), "color:cyan"), tr("msg", n, r);
|
|
1622
1622
|
}
|
|
1623
1623
|
function cr(e, t) {
|
|
1624
|
-
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e,
|
|
1624
|
+
Zn("json", t) && (t && Gn.warn("=====> " + t), Gn.dir(e)), tr("json", e, Ao());
|
|
1625
1625
|
}
|
|
1626
1626
|
var fr = [
|
|
1627
1627
|
"passw",
|
|
@@ -2111,7 +2111,7 @@ function vl(e, t, n, r, l) {
|
|
|
2111
2111
|
e && !el(e) && ir("GObj bad instanceof");
|
|
2112
2112
|
let o = bl(e, t, n, !1);
|
|
2113
2113
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2114
|
-
return void 0 === o ? s && Yr(r) && t ? (Nl(e, t, n, r), r) : (i && (ir(`path not found: '${n}'`), wr(t)), r) : Yr(o) ? (a && pl(e, t, n), o) : (i && (ir(`${e ? Rt(e) + ": " : ""}path MUST BE a json dict: '${n}'`), wr(t)), r);
|
|
2114
|
+
return void 0 === o ? s && Yr(r) && t ? (Nl(e, t, n, r), r) : (i && (ir(`path not found: '${n}'`), wr(t)), r) : Yr(o) ? (a && pl(e, t, n), o) : s && null === o && Yr(r) ? (Nl(e, t, n, r), r) : ((i || s) && (ir(`${e ? Rt(e) + ": " : ""}path MUST BE a json dict: '${n}'` + (s ? ", cannot create" : "")), wr(t)), r);
|
|
2115
2115
|
}
|
|
2116
2116
|
function Ol(e, t, n, r, l) {
|
|
2117
2117
|
e && !el(e) && ir("GObj bad instanceof");
|
|
@@ -2130,12 +2130,13 @@ function Sl(e, t, n, r, l) {
|
|
|
2130
2130
|
e && !el(e) && ir("GObj bad instanceof");
|
|
2131
2131
|
let o = bl(e, t, n, !1);
|
|
2132
2132
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2133
|
-
return void 0 === o ? s && Br(r) && t ? (Nl(e, t, n, r), r) : (i && (ir(`path not found: '${n}'`), wr(t)), r) : Br(o) ? (a && pl(e, t, n), o) : (i && (ir(`${e ? Rt(e) + ": " : ""}path MUST BE a json list: '${n}'`), wr(t)), r);
|
|
2133
|
+
return void 0 === o ? s && Br(r) && t ? (Nl(e, t, n, r), r) : (i && (ir(`path not found: '${n}'`), wr(t)), r) : Br(o) ? (a && pl(e, t, n), o) : s && null === o && Br(r) ? (Nl(e, t, n, r), r) : ((i || s) && (ir(`${e ? Rt(e) + ": " : ""}path MUST BE a json list: '${n}'` + (s ? ", cannot create" : "")), wr(t)), r);
|
|
2134
2134
|
}
|
|
2135
2135
|
function Nl(e, t, n, r) {
|
|
2136
2136
|
if (e && !el(e) && ir("GObj bad instanceof"), !Yr(t)) return ir("kw is not an object"), -1;
|
|
2137
2137
|
if (!Jr(n)) return ir(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
2138
2138
|
if ("" === n) return ir((e ? Rt(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
2139
|
+
if (n.split("`").includes("")) return ir(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
2139
2140
|
let l = n.split("`"), o = l.length;
|
|
2140
2141
|
for (let i = 0; i < o; i++) {
|
|
2141
2142
|
let s = l[i];
|
|
@@ -2512,14 +2513,21 @@ function ro(e, t, n) {
|
|
|
2512
2513
|
"__" === t.substring(0, 2) || Yr(n) || Ol(null, o, l, jr(r), Vn.KW_CREATE);
|
|
2513
2514
|
}, t), e;
|
|
2514
2515
|
}
|
|
2515
|
-
function lo(e
|
|
2516
|
+
function lo(e) {
|
|
2517
|
+
try {
|
|
2518
|
+
return JSON.stringify(e);
|
|
2519
|
+
} catch (t) {
|
|
2520
|
+
return `<${typeof e}: not json (${t.message})>`;
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
function oo(e, t, n, r) {
|
|
2516
2524
|
let l = Ol(null, Ol(null, e, "topics", null, 0), t, null, 0);
|
|
2517
2525
|
if (!l) return ir("jdb_update: topic not found: " + t), null;
|
|
2518
|
-
if (!Yr(r) || tl(r.id)) return ir(`jdb_update: record without id: ${
|
|
2526
|
+
if (!Yr(r) || tl(r.id)) return ir(`jdb_update: record without id: ${lo(r)}`), null;
|
|
2519
2527
|
if (!Jr(n)) return ir(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
2520
2528
|
if ("" !== n && n.split("`").includes("")) return ir(`jdb_update: empty segment in path: '${n}'`), null;
|
|
2521
2529
|
let o, i, s = n.split("`"), a = l;
|
|
2522
|
-
for (; (o = s.shift()) && !tl(o) && a;) Yr(a) && (a = Ol(null, a, e.hook, null, 0)), a =
|
|
2530
|
+
for (; (o = s.shift()) && !tl(o) && a;) Yr(a) && (a = Ol(null, a, e.hook, null, 0)), a = _o(a, null, o, !1);
|
|
2523
2531
|
if (!a || 0 !== s.length) return ir(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
2524
2532
|
if (Br(a)) i = a;
|
|
2525
2533
|
else {
|
|
@@ -2527,35 +2535,35 @@ function lo(e, t, n, r) {
|
|
|
2527
2535
|
if (i = Ol(null, a, e.hook, null, 0), null == i) i = [], Lr(a, e.hook, i);
|
|
2528
2536
|
else if (!Br(i)) return ir(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
2529
2537
|
}
|
|
2530
|
-
let u =
|
|
2538
|
+
let u = _o(i, e.hook, r.id, !1);
|
|
2531
2539
|
return u ? Dr(u, r) : i.push(r), l;
|
|
2532
2540
|
}
|
|
2533
|
-
function
|
|
2541
|
+
function io(e, t, n, r) {
|
|
2534
2542
|
let l = Ol(null, Ol(null, e, "topics", null, 0), t, null, 0);
|
|
2535
2543
|
if (!l) return ir("jdb_delete: topic not found: " + t), null;
|
|
2536
|
-
if (!Yr(r) || tl(r.id)) return ir(`jdb_delete: record without id: ${
|
|
2544
|
+
if (!Yr(r) || tl(r.id)) return ir(`jdb_delete: record without id: ${lo(r)}`), null;
|
|
2537
2545
|
if (!Jr(n)) return ir(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
2538
2546
|
if ("" !== n && n.split("`").includes("")) return ir(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
2539
2547
|
let o, i = n.split("`"), s = l;
|
|
2540
|
-
for (; (o = i.shift()) && !tl(o) && s;) Yr(s) && (s = Ol(null, s, e.hook, null, 0)), s =
|
|
2548
|
+
for (; (o = i.shift()) && !tl(o) && s;) Yr(s) && (s = Ol(null, s, e.hook, null, 0)), s = _o(s, null, o, !1);
|
|
2541
2549
|
if (!s || 0 !== i.length) return ir(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
2542
2550
|
let a = Br(s) ? s : Ol(null, s, e.hook, null, 0), u = Kl(a, r.id);
|
|
2543
2551
|
return u < 0 ? (ir(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (a.splice(u, 1), l);
|
|
2544
2552
|
}
|
|
2545
|
-
function
|
|
2553
|
+
function so(e, t) {
|
|
2546
2554
|
let n = Ol(null, e, "topics", null, 0);
|
|
2547
2555
|
if (!n) return ir("jdb topics section not found"), _r(e), null;
|
|
2548
2556
|
return Ol(null, n, t, null, 0) || (ir("jdb topic not found: " + t), _r(n), null);
|
|
2549
2557
|
}
|
|
2550
|
-
function
|
|
2558
|
+
function ao(e, t, n, r) {
|
|
2551
2559
|
let l = Ol(null, Ol(null, e, "topics", null, 0), t, null, 0);
|
|
2552
|
-
return l ? (void 0 === r && (r = !0),
|
|
2560
|
+
return l ? (void 0 === r && (r = !0), _o(l, e.hook, n, r)) : (ir("jdb_get: topic not found: " + t), null);
|
|
2553
2561
|
}
|
|
2554
|
-
function
|
|
2562
|
+
function uo(e, t, n) {
|
|
2555
2563
|
let r = Ol(null, Ol(null, e, "topics", null, 0), t, null, 0);
|
|
2556
2564
|
return r ? n < r.length ? r[n] : {} : (ir("jdb_get_by_idx: topic not found: " + t), null);
|
|
2557
2565
|
}
|
|
2558
|
-
function
|
|
2566
|
+
function _o(e, t, n, r) {
|
|
2559
2567
|
if (!e) return null;
|
|
2560
2568
|
let l, o = e.length;
|
|
2561
2569
|
for (l = 0; l < o; l++) {
|
|
@@ -2564,18 +2572,18 @@ function uo(e, t, n, r) {
|
|
|
2564
2572
|
let e = o.id;
|
|
2565
2573
|
if (e && e === n) return o;
|
|
2566
2574
|
if (r && cl(o, t)) {
|
|
2567
|
-
let e =
|
|
2575
|
+
let e = _o(o[t], t, n, r);
|
|
2568
2576
|
if (e) return e;
|
|
2569
2577
|
}
|
|
2570
2578
|
}
|
|
2571
2579
|
}
|
|
2572
2580
|
return null;
|
|
2573
2581
|
}
|
|
2574
|
-
function
|
|
2582
|
+
function co(e, t) {
|
|
2575
2583
|
let n = jr(e);
|
|
2576
2584
|
return Ar(n, t), n;
|
|
2577
2585
|
}
|
|
2578
|
-
function
|
|
2586
|
+
function fo(e) {
|
|
2579
2587
|
function t(e) {
|
|
2580
2588
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2581
2589
|
switch (t.length % 4) {
|
|
@@ -2606,9 +2614,9 @@ function co(e) {
|
|
|
2606
2614
|
signature: t(n[2])
|
|
2607
2615
|
};
|
|
2608
2616
|
}
|
|
2609
|
-
function
|
|
2617
|
+
function go(e, t) {
|
|
2610
2618
|
try {
|
|
2611
|
-
let n =
|
|
2619
|
+
let n = fo(e);
|
|
2612
2620
|
switch (t) {
|
|
2613
2621
|
case "header": return JSON.parse(n.header);
|
|
2614
2622
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2618,15 +2626,15 @@ function fo(e, t) {
|
|
|
2618
2626
|
return null;
|
|
2619
2627
|
}
|
|
2620
2628
|
}
|
|
2621
|
-
function
|
|
2629
|
+
function bo(e) {
|
|
2622
2630
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2623
2631
|
}
|
|
2624
|
-
function
|
|
2632
|
+
function po(e) {
|
|
2625
2633
|
if (!e) return "";
|
|
2626
2634
|
const t = String(e).trim();
|
|
2627
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2635
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : bo(t);
|
|
2628
2636
|
}
|
|
2629
|
-
var
|
|
2637
|
+
var mo = class {
|
|
2630
2638
|
constructor(e) {
|
|
2631
2639
|
this.html = e, Object.freeze(this);
|
|
2632
2640
|
}
|
|
@@ -2634,28 +2642,28 @@ var po = class {
|
|
|
2634
2642
|
return this.html;
|
|
2635
2643
|
}
|
|
2636
2644
|
};
|
|
2637
|
-
function mo(e) {
|
|
2638
|
-
return "string" != typeof e ? (ir("html_markup: not a string, type " + typeof e), new po("")) : new po(e);
|
|
2639
|
-
}
|
|
2640
2645
|
function ho(e) {
|
|
2641
|
-
return e
|
|
2646
|
+
return "string" != typeof e ? (ir("html_markup: not a string, type " + typeof e), new mo("")) : new mo(e);
|
|
2642
2647
|
}
|
|
2643
2648
|
function Eo(e) {
|
|
2649
|
+
return e instanceof mo;
|
|
2650
|
+
}
|
|
2651
|
+
function yo(e) {
|
|
2644
2652
|
const t = document.createElement("template");
|
|
2645
2653
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2646
2654
|
}
|
|
2647
|
-
var
|
|
2648
|
-
function
|
|
2649
|
-
|
|
2655
|
+
var To = !1, vo = /* @__PURE__ */ new Set();
|
|
2656
|
+
function Oo(e) {
|
|
2657
|
+
To = !!e;
|
|
2650
2658
|
}
|
|
2651
|
-
function
|
|
2652
|
-
return
|
|
2659
|
+
function So() {
|
|
2660
|
+
return To;
|
|
2653
2661
|
}
|
|
2654
|
-
function
|
|
2662
|
+
function No(e) {
|
|
2655
2663
|
const t = document.createElement("template");
|
|
2656
2664
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2657
2665
|
}
|
|
2658
|
-
function
|
|
2666
|
+
function wo(e, t) {
|
|
2659
2667
|
let [n, r, l, o] = e;
|
|
2660
2668
|
if (!n) return void ir("Tag must be a valid HTML element.");
|
|
2661
2669
|
let i = document.createElement(n), s = "";
|
|
@@ -2664,22 +2672,22 @@ function No(e, t) {
|
|
|
2664
2672
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2665
2673
|
i.style.cssText = t;
|
|
2666
2674
|
} 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]);
|
|
2667
|
-
if (
|
|
2668
|
-
else if (Jr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !
|
|
2675
|
+
if (Eo(l)) i.appendChild(yo(l));
|
|
2676
|
+
else if (Jr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !To) i.appendChild(No(l));
|
|
2669
2677
|
else if (l.length > 0 && "<" === l[0] && function(e) {
|
|
2670
|
-
if (
|
|
2678
|
+
if (vo.size >= 100) return;
|
|
2671
2679
|
const t = e.slice(0, 80);
|
|
2672
|
-
|
|
2680
|
+
vo.has(t) || (vo.add(t), sr(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2673
2681
|
}(l), t && s) i.textContent = t(s) || l;
|
|
2674
2682
|
else i.textContent = l;
|
|
2675
2683
|
else if (Br(l)) {
|
|
2676
|
-
if (l.length > 0) if (Jr(l[0])) i.appendChild(
|
|
2677
|
-
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(
|
|
2684
|
+
if (l.length > 0) if (Jr(l[0])) i.appendChild(wo(l, t));
|
|
2685
|
+
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(wo(e, t)) : e instanceof Node ? i.appendChild(e) : Eo(e) ? i.appendChild(yo(e)) : Jr(e) ? i.appendChild(document.createTextNode(e)) : null != e && !1 !== e && ir("createElement2: child ignored, type " + typeof e);
|
|
2678
2686
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (ir("content ignored"), cr(l));
|
|
2679
2687
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2680
2688
|
return i;
|
|
2681
2689
|
}
|
|
2682
|
-
function
|
|
2690
|
+
function jo(e) {
|
|
2683
2691
|
if (!e) return {
|
|
2684
2692
|
top: 0,
|
|
2685
2693
|
left: 0,
|
|
@@ -2699,10 +2707,10 @@ function wo(e) {
|
|
|
2699
2707
|
bottom: t + i + l
|
|
2700
2708
|
};
|
|
2701
2709
|
}
|
|
2702
|
-
function
|
|
2710
|
+
function $o(e) {
|
|
2703
2711
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2704
2712
|
}
|
|
2705
|
-
function
|
|
2713
|
+
function Ro(e, t) {
|
|
2706
2714
|
if (!Zr(t)) return void ir("You must supply a translation function");
|
|
2707
2715
|
e || (e = document);
|
|
2708
2716
|
const n = (t) => {
|
|
@@ -2726,7 +2734,7 @@ function $o(e, t) {
|
|
|
2726
2734
|
n && e.setAttribute("placeholder", t(n));
|
|
2727
2735
|
});
|
|
2728
2736
|
}
|
|
2729
|
-
function
|
|
2737
|
+
function Do(e = "Time Tracker", t = !1) {
|
|
2730
2738
|
const n = e, r = performance.now();
|
|
2731
2739
|
let l = r;
|
|
2732
2740
|
return t && sr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
@@ -2737,30 +2745,30 @@ function Ro(e = "Time Tracker", t = !1) {
|
|
|
2737
2745
|
};
|
|
2738
2746
|
} };
|
|
2739
2747
|
}
|
|
2740
|
-
function
|
|
2748
|
+
function Ao(e) {
|
|
2741
2749
|
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();
|
|
2742
2750
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2743
2751
|
}
|
|
2744
|
-
function
|
|
2752
|
+
function ko() {
|
|
2745
2753
|
return Math.floor(Date.now() / 1e3);
|
|
2746
2754
|
}
|
|
2747
|
-
function
|
|
2755
|
+
function Io(e, t) {
|
|
2748
2756
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2749
2757
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2750
2758
|
return -1;
|
|
2751
2759
|
}
|
|
2752
|
-
function
|
|
2760
|
+
function Co() {
|
|
2753
2761
|
let e = "";
|
|
2754
2762
|
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;
|
|
2755
2763
|
}
|
|
2756
|
-
function
|
|
2764
|
+
function Lo(e) {
|
|
2757
2765
|
return e.replace(/[?# ^:]/g, "_");
|
|
2758
2766
|
}
|
|
2759
|
-
function
|
|
2767
|
+
function Po(e) {
|
|
2760
2768
|
let t = null;
|
|
2761
2769
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2762
2770
|
}
|
|
2763
|
-
function
|
|
2771
|
+
function Uo(e, t = 0, n = !1) {
|
|
2764
2772
|
let r = null, l = null, o = null;
|
|
2765
2773
|
const i = (...i) => {
|
|
2766
2774
|
o = this, l = i;
|
|
@@ -2775,20 +2783,20 @@ function Po(e, t = 0, n = !1) {
|
|
|
2775
2783
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2776
2784
|
}, i;
|
|
2777
2785
|
}
|
|
2778
|
-
function
|
|
2786
|
+
function Fo(...e) {
|
|
2779
2787
|
let t = "", n = 0;
|
|
2780
2788
|
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++));
|
|
2781
2789
|
return t;
|
|
2782
2790
|
}
|
|
2783
|
-
var
|
|
2784
|
-
function
|
|
2791
|
+
var Vo = 256, Go = 1e5;
|
|
2792
|
+
function Mo(e) {
|
|
2785
2793
|
const t = String(e).replace(/`/g, "``");
|
|
2786
2794
|
return "[" === t[0] ? "[" + t : t;
|
|
2787
2795
|
}
|
|
2788
|
-
function Mo(e) {
|
|
2789
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Go(e)).join("`") : "";
|
|
2790
|
-
}
|
|
2791
2796
|
function Wo(e) {
|
|
2797
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Mo(e)).join("`") : "";
|
|
2798
|
+
}
|
|
2799
|
+
function xo(e) {
|
|
2792
2800
|
if ("string" != typeof e) return null;
|
|
2793
2801
|
let t = [], n = "";
|
|
2794
2802
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2809,9 +2817,9 @@ function Wo(e) {
|
|
|
2809
2817
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2810
2818
|
});
|
|
2811
2819
|
}
|
|
2812
|
-
function
|
|
2820
|
+
function Ko(e) {
|
|
2813
2821
|
const t = {}, n = (e, r, l) => {
|
|
2814
|
-
if (l >
|
|
2822
|
+
if (l > Vo) throw new Error("json2flat: deeper than 256");
|
|
2815
2823
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2816
2824
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2817
2825
|
const o = `[${t}]`;
|
|
@@ -2821,7 +2829,7 @@ function xo(e) {
|
|
|
2821
2829
|
const t = Object.keys(e);
|
|
2822
2830
|
if (t.length > 0) {
|
|
2823
2831
|
for (const o of t) {
|
|
2824
|
-
const t =
|
|
2832
|
+
const t = Mo(o);
|
|
2825
2833
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2826
2834
|
}
|
|
2827
2835
|
return;
|
|
@@ -2831,20 +2839,20 @@ function xo(e) {
|
|
|
2831
2839
|
};
|
|
2832
2840
|
return null == e || n(e, "", 0), t;
|
|
2833
2841
|
}
|
|
2834
|
-
function
|
|
2842
|
+
function Yo(e) {
|
|
2835
2843
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2836
2844
|
let t = null;
|
|
2837
2845
|
for (const n of Object.keys(e)) {
|
|
2838
|
-
const r =
|
|
2846
|
+
const r = xo(n);
|
|
2839
2847
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2840
|
-
if (r.length >
|
|
2848
|
+
if (r.length > Vo) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2841
2849
|
const l = "number" == typeof r[0];
|
|
2842
2850
|
if (null === t) t = l ? [] : {};
|
|
2843
2851
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2844
2852
|
let o = t;
|
|
2845
2853
|
for (let t = 0; t < r.length; t++) {
|
|
2846
2854
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2847
|
-
if (i && l >
|
|
2855
|
+
if (i && l > Go) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2848
2856
|
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"}`);
|
|
2849
2857
|
if (s) {
|
|
2850
2858
|
if (Array.isArray(o)) {
|
|
@@ -2868,23 +2876,23 @@ function Ko(e) {
|
|
|
2868
2876
|
}
|
|
2869
2877
|
return null === t ? {} : t;
|
|
2870
2878
|
}
|
|
2871
|
-
function
|
|
2879
|
+
function Bo(e, t) {
|
|
2872
2880
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2873
2881
|
}
|
|
2874
|
-
function
|
|
2882
|
+
function Jo(e, t) {
|
|
2875
2883
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2876
2884
|
added: {},
|
|
2877
2885
|
removed: {},
|
|
2878
2886
|
changed: {}
|
|
2879
2887
|
};
|
|
2880
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2888
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? Bo(n[e], r[e]) || gl(l.changed, e, {
|
|
2881
2889
|
from: n[e],
|
|
2882
2890
|
to: r[e]
|
|
2883
2891
|
}) : gl(l.removed, e, n[e]);
|
|
2884
2892
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || gl(l.added, e, r[e]);
|
|
2885
2893
|
return l;
|
|
2886
2894
|
}
|
|
2887
|
-
function
|
|
2895
|
+
function qo(e, t) {
|
|
2888
2896
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2889
2897
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2890
2898
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -2896,36 +2904,36 @@ function Jo(e, t) {
|
|
|
2896
2904
|
}
|
|
2897
2905
|
return e;
|
|
2898
2906
|
}
|
|
2899
|
-
function
|
|
2907
|
+
function Ho(e) {
|
|
2900
2908
|
return "persistent-attrs-" + Rt(e);
|
|
2901
2909
|
}
|
|
2902
|
-
function
|
|
2903
|
-
let n = Xt(e, v.SDF_PERSIST), r = Cl(
|
|
2910
|
+
function zo(e, t) {
|
|
2911
|
+
let n = Xt(e, v.SDF_PERSIST), r = Cl(Ho(e), null, !1);
|
|
2904
2912
|
if (r && Yr(r)) {
|
|
2905
2913
|
let l = kl(e, r, t, !1);
|
|
2906
2914
|
l = kl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2907
2915
|
}
|
|
2908
2916
|
}
|
|
2909
|
-
function zo(e, t) {
|
|
2910
|
-
let n = kl(e, Xt(e, v.SDF_PERSIST), t, !1), r = Cl(qo(e), null, !1);
|
|
2911
|
-
return r && Yr(r) && kr(n, r), Ll(qo(e), n);
|
|
2912
|
-
}
|
|
2913
2917
|
function Qo(e, t) {
|
|
2914
|
-
let n =
|
|
2915
|
-
|
|
2918
|
+
let n = kl(e, Xt(e, v.SDF_PERSIST), t, !1), r = Cl(Ho(e), null, !1);
|
|
2919
|
+
return r && Yr(r) && kr(n, r), Ll(Ho(e), n);
|
|
2916
2920
|
}
|
|
2917
2921
|
function Xo(e, t) {
|
|
2918
|
-
let n = Cl(
|
|
2922
|
+
let n = Il(e, Cl(Ho(e), null, !1), t, !1);
|
|
2923
|
+
0 === Mr(n) ? Pl(Ho(e)) : Ll(Ho(e), n);
|
|
2924
|
+
}
|
|
2925
|
+
function Zo(e, t) {
|
|
2926
|
+
let n = Cl(Ho(e), null, !1), r = {};
|
|
2919
2927
|
return n && Yr(n) && (r = kl(e, n, t, !1)), r;
|
|
2920
2928
|
}
|
|
2921
|
-
function
|
|
2929
|
+
function ei(e) {
|
|
2922
2930
|
if (Br(e) && 1 === xr(e)) {
|
|
2923
2931
|
let t = e[0];
|
|
2924
2932
|
return cl(t, "size") ? t.size : 1;
|
|
2925
2933
|
}
|
|
2926
2934
|
return xr(e);
|
|
2927
2935
|
}
|
|
2928
|
-
function
|
|
2936
|
+
function ti(e, t) {
|
|
2929
2937
|
if (Jr(t)) {
|
|
2930
2938
|
if (-1 === t.indexOf("^")) {
|
|
2931
2939
|
let n, r, l = e.fkey;
|
|
@@ -2955,11 +2963,11 @@ function ei(e, t) {
|
|
|
2955
2963
|
hook_name: t.hook_name
|
|
2956
2964
|
} : (ir("bad fkey 3"), ir(e), ir(t), null);
|
|
2957
2965
|
}
|
|
2958
|
-
function
|
|
2959
|
-
let n =
|
|
2966
|
+
function ni(e, t) {
|
|
2967
|
+
let n = ti(e, t);
|
|
2960
2968
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2961
2969
|
}
|
|
2962
|
-
function
|
|
2970
|
+
function ri(e, t) {
|
|
2963
2971
|
if (Jr(t)) {
|
|
2964
2972
|
if (-1 === t.indexOf("^")) {
|
|
2965
2973
|
let n, r = e.hook;
|
|
@@ -2986,7 +2994,7 @@ function ni(e, t) {
|
|
|
2986
2994
|
id: t.id
|
|
2987
2995
|
} : (ir("bad hook 3"), ir(e), ir(t), null);
|
|
2988
2996
|
}
|
|
2989
|
-
var
|
|
2997
|
+
var li = [
|
|
2990
2998
|
"string",
|
|
2991
2999
|
"integer",
|
|
2992
3000
|
"object",
|
|
@@ -2996,7 +3004,7 @@ var ri = [
|
|
|
2996
3004
|
"real",
|
|
2997
3005
|
"boolean",
|
|
2998
3006
|
"blob"
|
|
2999
|
-
],
|
|
3007
|
+
], oi = [
|
|
3000
3008
|
"persistent",
|
|
3001
3009
|
"required",
|
|
3002
3010
|
"notnull",
|
|
@@ -3008,7 +3016,7 @@ var ri = [
|
|
|
3008
3016
|
"stats",
|
|
3009
3017
|
"rstats",
|
|
3010
3018
|
"pstats"
|
|
3011
|
-
],
|
|
3019
|
+
], ii = [
|
|
3012
3020
|
"hook",
|
|
3013
3021
|
"fkey",
|
|
3014
3022
|
"enum",
|
|
@@ -3037,7 +3045,7 @@ var ri = [
|
|
|
3037
3045
|
"coordinates",
|
|
3038
3046
|
"gbuffer"
|
|
3039
3047
|
];
|
|
3040
|
-
function
|
|
3048
|
+
function si(e) {
|
|
3041
3049
|
let t = {
|
|
3042
3050
|
name: e.id,
|
|
3043
3051
|
header: e.header,
|
|
@@ -3056,7 +3064,7 @@ function ii(e) {
|
|
|
3056
3064
|
if (!e.flag) return t;
|
|
3057
3065
|
for (let n = 0; n < e.flag.length; n++) {
|
|
3058
3066
|
let r = e.flag[n];
|
|
3059
|
-
if (Yl(
|
|
3067
|
+
if (Yl(ii, r)) {
|
|
3060
3068
|
switch (r) {
|
|
3061
3069
|
case "enum":
|
|
3062
3070
|
t.enum_list = e.enum;
|
|
@@ -3070,7 +3078,7 @@ function ii(e) {
|
|
|
3070
3078
|
case "file": t.is_file = !0;
|
|
3071
3079
|
}
|
|
3072
3080
|
t.type = r;
|
|
3073
|
-
} else if (Yl(
|
|
3081
|
+
} else if (Yl(oi, r)) switch (r) {
|
|
3074
3082
|
case "writable":
|
|
3075
3083
|
t.is_writable = !0;
|
|
3076
3084
|
break;
|
|
@@ -3083,7 +3091,7 @@ function ii(e) {
|
|
|
3083
3091
|
}
|
|
3084
3092
|
return t.is_file && (t.type = "file"), t;
|
|
3085
3093
|
}
|
|
3086
|
-
function
|
|
3094
|
+
function ai(e, t) {
|
|
3087
3095
|
let n = {
|
|
3088
3096
|
name: e,
|
|
3089
3097
|
header: e,
|
|
@@ -3101,9 +3109,9 @@ function si(e, t) {
|
|
|
3101
3109
|
let e = t.split(".");
|
|
3102
3110
|
for (let t = 0; t < e.length; t++) {
|
|
3103
3111
|
let r = e[t];
|
|
3104
|
-
if (Yl(
|
|
3105
|
-
else if (Yl(
|
|
3106
|
-
else if (Yl(
|
|
3112
|
+
if (Yl(li, r)) n.real_type || (n.real_type = r);
|
|
3113
|
+
else if (Yl(ii, r)) n.type || (n.type = r);
|
|
3114
|
+
else if (Yl(oi, r)) switch (r) {
|
|
3107
3115
|
case "writable":
|
|
3108
3116
|
n.is_writable = !0;
|
|
3109
3117
|
break;
|
|
@@ -3115,10 +3123,10 @@ function si(e, t) {
|
|
|
3115
3123
|
}
|
|
3116
3124
|
}
|
|
3117
3125
|
n.real_type || (n.real_type = "string");
|
|
3118
|
-
} else Yr(t) ? (n =
|
|
3126
|
+
} else Yr(t) ? (n = si(t), n.name || (n.name = e), n.header || (n.header = e)) : Br(t) && (n.real_type = "array", n.enum_list = t);
|
|
3119
3127
|
return n.type || (n.type = n.real_type), n;
|
|
3120
3128
|
}
|
|
3121
|
-
function
|
|
3129
|
+
function ui(e, t) {
|
|
3122
3130
|
let n = {};
|
|
3123
3131
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
3124
3132
|
let l;
|
|
@@ -3127,23 +3135,23 @@ function ai(e, t) {
|
|
|
3127
3135
|
Lr(n, e, o);
|
|
3128
3136
|
}), n;
|
|
3129
3137
|
}
|
|
3130
|
-
var
|
|
3138
|
+
var _i = [
|
|
3131
3139
|
N(T.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3132
3140
|
N(T.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3133
3141
|
N(T.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3134
3142
|
S()
|
|
3135
|
-
],
|
|
3143
|
+
], ci = {
|
|
3136
3144
|
periodic: !1,
|
|
3137
3145
|
msec: 0,
|
|
3138
3146
|
timer_id: -1
|
|
3139
|
-
},
|
|
3140
|
-
function
|
|
3147
|
+
}, fi = null;
|
|
3148
|
+
function gi(e, t, n, r) {
|
|
3141
3149
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3142
3150
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
3143
3151
|
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3144
3152
|
}, 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;
|
|
3145
3153
|
}
|
|
3146
|
-
var
|
|
3154
|
+
var di = {
|
|
3147
3155
|
mt_create: function(e) {
|
|
3148
3156
|
let t = e.priv;
|
|
3149
3157
|
const n = nn(e, "subscriber");
|
|
@@ -3168,31 +3176,31 @@ var gi = {
|
|
|
3168
3176
|
},
|
|
3169
3177
|
mt_destroy: function(e) {}
|
|
3170
3178
|
};
|
|
3171
|
-
function
|
|
3179
|
+
function bi() {
|
|
3172
3180
|
return function(e) {
|
|
3173
|
-
if (
|
|
3181
|
+
if (fi) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
3174
3182
|
const t = [["ST_IDLE", [[
|
|
3175
3183
|
"EV_TIMEOUT",
|
|
3176
|
-
|
|
3184
|
+
gi,
|
|
3177
3185
|
null
|
|
3178
3186
|
]]]];
|
|
3179
|
-
return (
|
|
3187
|
+
return (fi = Ae(e, [
|
|
3180
3188
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
3181
3189
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
3182
3190
|
[0, 0]
|
|
3183
|
-
], t,
|
|
3191
|
+
], t, di, 0, _i, ci, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
3184
3192
|
}("C_TIMER");
|
|
3185
3193
|
}
|
|
3186
|
-
function
|
|
3194
|
+
function pi(e, t) {
|
|
3187
3195
|
return e instanceof I ? "C_TIMER" !== $t(e) ? (ir("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (ir("not GObj TYPE"), -1);
|
|
3188
3196
|
}
|
|
3189
|
-
function
|
|
3197
|
+
function mi(e, t) {
|
|
3190
3198
|
return e instanceof I ? "C_TIMER" !== $t(e) ? (ir("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (ir("not GObj TYPE"), -1);
|
|
3191
3199
|
}
|
|
3192
|
-
function
|
|
3200
|
+
function hi(e) {
|
|
3193
3201
|
return e instanceof I ? "C_TIMER" !== $t(e) ? (ir("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (ir("not GObj TYPE"), -1);
|
|
3194
3202
|
}
|
|
3195
|
-
var
|
|
3203
|
+
var Ei = [
|
|
3196
3204
|
N(T.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3197
3205
|
N(T.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3198
3206
|
N(T.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -3212,26 +3220,26 @@ var hi = [
|
|
|
3212
3220
|
N(T.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3213
3221
|
N(T.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3214
3222
|
S()
|
|
3215
|
-
],
|
|
3216
|
-
function
|
|
3223
|
+
], yi = { gobj_timer: null }, Ti = null;
|
|
3224
|
+
function vi(e, t, n, r) {
|
|
3217
3225
|
let l = Qt(e, t);
|
|
3218
3226
|
return Yr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
3219
3227
|
}
|
|
3220
|
-
function
|
|
3228
|
+
function Oi(e) {
|
|
3221
3229
|
if (!0 === e || !1 === e) return e;
|
|
3222
3230
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
3223
3231
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
3224
3232
|
}
|
|
3225
|
-
function
|
|
3233
|
+
function Si() {
|
|
3226
3234
|
return `${Nt()}^${St()}`;
|
|
3227
3235
|
}
|
|
3228
|
-
function
|
|
3236
|
+
function Ni(e, t, n, r) {
|
|
3229
3237
|
return Pn(e, t, n), 0;
|
|
3230
3238
|
}
|
|
3231
|
-
var
|
|
3239
|
+
var wi = {
|
|
3232
3240
|
mt_create: function(e) {
|
|
3233
3241
|
let t = e.priv;
|
|
3234
|
-
un(e, "start_date",
|
|
3242
|
+
un(e, "start_date", Ao()), un(e, "node_uuid", Co()), e.priv.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.periodic_timeout = Qt(e, "periodic_timeout"), function(e) {
|
|
3235
3243
|
let t = Qt(e, "trace_levels");
|
|
3236
3244
|
if (!Yr(t)) return 0;
|
|
3237
3245
|
let n = t.__global_trace__;
|
|
@@ -3265,10 +3273,10 @@ var Ni = {
|
|
|
3265
3273
|
},
|
|
3266
3274
|
mt_writing: function(e, t) {},
|
|
3267
3275
|
mt_start: function(e) {
|
|
3268
|
-
return
|
|
3276
|
+
return mi(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
3269
3277
|
},
|
|
3270
3278
|
mt_stop: function(e) {
|
|
3271
|
-
return
|
|
3279
|
+
return hi(e.priv.gobj_timer), bt(e), 0;
|
|
3272
3280
|
},
|
|
3273
3281
|
mt_destroy: function(e) {},
|
|
3274
3282
|
mt_play: function(e) {
|
|
@@ -3285,35 +3293,35 @@ var Ni = {
|
|
|
3285
3293
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
3286
3294
|
case "set-global-trace":
|
|
3287
3295
|
case "set-global-no-trace": {
|
|
3288
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
3289
|
-
return l ? null === i ? o(0, -1, `${
|
|
3296
|
+
let r = "set-global-no-trace" === t, l = n.level, i = Oi(n.set);
|
|
3297
|
+
return l ? null === i ? o(0, -1, `${Si()}: bitmask set or re-set?`, null, null) : (r ? ae(l, i) : se(l, i)) < 0 ? o(0, -1, `${Si()}: global trace level not found: ${l}`, null, null) : r ? (vi(e, "no_trace_levels", "__global_no_trace__", de()), o(0, 0, null, null, de())) : (vi(e, "trace_levels", "__global_trace__", ge()), o(0, 0, null, null, ge())) : o(0, -1, `${Si()}: what level?`, null, null);
|
|
3290
3298
|
}
|
|
3291
3299
|
case "get-gclass-trace":
|
|
3292
3300
|
case "get-gclass-no-trace":
|
|
3293
3301
|
case "set-gclass-trace":
|
|
3294
3302
|
case "set-gclass-no-trace": {
|
|
3295
3303
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
3296
|
-
if (!i) return o(0, -1, `${
|
|
3304
|
+
if (!i) return o(0, -1, `${Si()}: what gclass is '${l}'?`, null, null);
|
|
3297
3305
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
3298
|
-
let s = n.level, a =
|
|
3299
|
-
return s ? null === a ? o(0, -1, `${
|
|
3306
|
+
let s = n.level, a = Oi(n.set);
|
|
3307
|
+
return s ? null === a ? o(0, -1, `${Si()}: bitmask set or re-set?`, null, null) : (r ? Te(i, s, a) : Ee(i, s, a)) < 0 ? o(0, -1, `${Si()}: trace level of ${l} not found: ${s}`, null, null) : r ? (vi(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (vi(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${Si()}: what level?`, null, null);
|
|
3300
3308
|
}
|
|
3301
|
-
default: return o(0, -1, `${
|
|
3309
|
+
default: return o(0, -1, `${Si()}: command not available: ${t}`, null, null);
|
|
3302
3310
|
}
|
|
3303
3311
|
}
|
|
3304
3312
|
};
|
|
3305
|
-
function
|
|
3313
|
+
function ji() {
|
|
3306
3314
|
return function(e) {
|
|
3307
|
-
if (
|
|
3315
|
+
if (Ti) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
3308
3316
|
const t = [["ST_IDLE", [[
|
|
3309
3317
|
"EV_TIMEOUT_PERIODIC",
|
|
3310
|
-
|
|
3318
|
+
Ni,
|
|
3311
3319
|
null
|
|
3312
3320
|
]]]];
|
|
3313
|
-
return (
|
|
3321
|
+
return (Ti = Ae(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t, wi, 0, Ei, yi, 0, 0, 0, 0)) ? 0 : -1;
|
|
3314
3322
|
}("C_YUNO");
|
|
3315
3323
|
}
|
|
3316
|
-
var
|
|
3324
|
+
var $i = "ievent_gate_stack", Ri = [
|
|
3317
3325
|
N(T.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
3318
3326
|
N(T.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
3319
3327
|
N(T.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3330,15 +3338,15 @@ var ji = "ievent_gate_stack", $i = [
|
|
|
3330
3338
|
N(T.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3331
3339
|
N(T.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3332
3340
|
S()
|
|
3333
|
-
],
|
|
3341
|
+
], Di = [
|
|
3334
3342
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3335
3343
|
["ievents2", "Trace inter-events with full kw"],
|
|
3336
3344
|
["identity-card", "Trace identity_card messages"]
|
|
3337
3345
|
];
|
|
3338
|
-
function
|
|
3346
|
+
function Ai(e) {
|
|
3339
3347
|
return !!(3 & Z(e));
|
|
3340
3348
|
}
|
|
3341
|
-
var
|
|
3349
|
+
var ki = {
|
|
3342
3350
|
url: null,
|
|
3343
3351
|
remote_yuno_name: null,
|
|
3344
3352
|
remote_yuno_role: null,
|
|
@@ -3348,8 +3356,8 @@ var Ai = {
|
|
|
3348
3356
|
websocket: null,
|
|
3349
3357
|
inside_on_open: !1,
|
|
3350
3358
|
retry_ms: 0
|
|
3351
|
-
},
|
|
3352
|
-
function
|
|
3359
|
+
}, Ii = null;
|
|
3360
|
+
function Ci(e) {
|
|
3353
3361
|
e.priv.websocket && ir("Websocket ALREADY setup");
|
|
3354
3362
|
const t = tn(e, "url");
|
|
3355
3363
|
ur(`====> Starting WebSocket to '${t}' (${Rt(e)})`);
|
|
@@ -3364,7 +3372,7 @@ function Ii(e) {
|
|
|
3364
3372
|
code: 1006,
|
|
3365
3373
|
reason: r.message,
|
|
3366
3374
|
was_clean: !1
|
|
3367
|
-
}, e) < 0 &&
|
|
3375
|
+
}, e) < 0 && pi(e.priv.gobj_timer, Yi(e)), null;
|
|
3368
3376
|
}
|
|
3369
3377
|
return r ? (r.onopen = () => {
|
|
3370
3378
|
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_OPEN", {
|
|
@@ -3386,7 +3394,7 @@ function Ii(e) {
|
|
|
3386
3394
|
}, e));
|
|
3387
3395
|
}, r) : (ir(`${Rt(e)}: Failed to initialize WebSocket.`), null);
|
|
3388
3396
|
}
|
|
3389
|
-
function
|
|
3397
|
+
function Li(e, t = 1e3, n = "") {
|
|
3390
3398
|
let r = e.priv, l = r.websocket;
|
|
3391
3399
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3392
3400
|
ur(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -3397,25 +3405,25 @@ function Ci(e, t = 1e3, n = "") {
|
|
|
3397
3405
|
}
|
|
3398
3406
|
} else sr("WebSocket is already closed or in the process of closing.");
|
|
3399
3407
|
}
|
|
3400
|
-
function
|
|
3401
|
-
let r =
|
|
3408
|
+
function Pi(e, t, n) {
|
|
3409
|
+
let r = Ao();
|
|
3402
3410
|
try {
|
|
3403
3411
|
ur("\n" + r + " " + t + "\n"), wr(n);
|
|
3404
3412
|
} catch (e) {
|
|
3405
3413
|
ur("ERROR in trace_inter_event: " + e);
|
|
3406
3414
|
}
|
|
3407
3415
|
}
|
|
3408
|
-
var
|
|
3416
|
+
var Ui = class {
|
|
3409
3417
|
constructor(e, t) {
|
|
3410
3418
|
this.event = e, this.kw = t || {};
|
|
3411
3419
|
}
|
|
3412
3420
|
};
|
|
3413
|
-
function
|
|
3421
|
+
function Fi(e, t, n, r) {
|
|
3414
3422
|
return function(e, t) {
|
|
3415
3423
|
let n = e.priv, r = JSON.stringify(t);
|
|
3416
|
-
if (
|
|
3424
|
+
if (Ai(e)) {
|
|
3417
3425
|
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o = Qt(Ot(), "trace_ievent_callback");
|
|
3418
|
-
o ? o(l, t, 1, r.length) :
|
|
3426
|
+
o ? o(l, t, 1, r.length) : Pi(0, l, t);
|
|
3419
3427
|
}
|
|
3420
3428
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return sr(`${Rt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3421
3429
|
try {
|
|
@@ -3425,10 +3433,10 @@ function Ui(e, t, n, r) {
|
|
|
3425
3433
|
}
|
|
3426
3434
|
return 0;
|
|
3427
3435
|
}(e, function(e, t) {
|
|
3428
|
-
return tl(e) ? (ir("iev_create() event NULL"), null) : new
|
|
3436
|
+
return tl(e) ? (ir("iev_create() event NULL"), null) : new Ui(e, t);
|
|
3429
3437
|
}(t, n));
|
|
3430
3438
|
}
|
|
3431
|
-
function
|
|
3439
|
+
function Vi(e, t, n) {
|
|
3432
3440
|
return tl(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3433
3441
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3434
3442
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
@@ -3436,10 +3444,10 @@ function Fi(e, t, n) {
|
|
|
3436
3444
|
src_yuno: St(),
|
|
3437
3445
|
src_role: Nt(),
|
|
3438
3446
|
src_service: t,
|
|
3439
|
-
host:
|
|
3447
|
+
host: Co()
|
|
3440
3448
|
};
|
|
3441
3449
|
}
|
|
3442
|
-
function
|
|
3450
|
+
function Gi(e) {
|
|
3443
3451
|
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");
|
|
3444
3452
|
i && i.length || (i = Qt(Ot(), "required_services"));
|
|
3445
3453
|
let s = {
|
|
@@ -3457,27 +3465,27 @@ function Vi(e) {
|
|
|
3457
3465
|
username: tn(Ot(), "__username__"),
|
|
3458
3466
|
launch_id: 0,
|
|
3459
3467
|
yuno_startdate: tn(Ot(), "start_date"),
|
|
3460
|
-
id:
|
|
3468
|
+
id: Co(),
|
|
3461
3469
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3462
3470
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3463
3471
|
required_services: i
|
|
3464
3472
|
};
|
|
3465
|
-
return zl(e, s,
|
|
3473
|
+
return zl(e, s, $i, Vi(e, jt(At(e)), null)), Xl(e, s, "__identity__"), pi(t.gobj_timer, en(e, "timeout_idack")), Fi(e, "EV_IDENTITY_CARD", s);
|
|
3466
3474
|
}
|
|
3467
|
-
function
|
|
3475
|
+
function Mi(e, t) {
|
|
3468
3476
|
if (tl(t.event)) return -1;
|
|
3469
3477
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3470
3478
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3471
|
-
return zl(e, n,
|
|
3472
|
-
}
|
|
3473
|
-
function Mi(e, t, n, r) {
|
|
3474
|
-
let l = e.priv;
|
|
3475
|
-
return Et(e) && (l.websocket = Ii(e)), 0;
|
|
3479
|
+
return zl(e, n, $i, Vi(e, jt(s), i)), Xl(e, n, "__subscribing__"), Fi(e, t.event, n);
|
|
3476
3480
|
}
|
|
3477
3481
|
function Wi(e, t, n, r) {
|
|
3478
|
-
|
|
3482
|
+
let l = e.priv;
|
|
3483
|
+
return Et(e) && (l.websocket = Ci(e)), 0;
|
|
3479
3484
|
}
|
|
3480
3485
|
function xi(e, t, n, r) {
|
|
3486
|
+
return ur("Websocket opened: " + e.priv.url), Gi(e), 0;
|
|
3487
|
+
}
|
|
3488
|
+
function Ki(e, t, n, r) {
|
|
3481
3489
|
let l = e.priv, o = n.url;
|
|
3482
3490
|
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (rr(), sr(`${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", {
|
|
3483
3491
|
url: o,
|
|
@@ -3492,25 +3500,25 @@ function xi(e, t, n, r) {
|
|
|
3492
3500
|
code: n.code,
|
|
3493
3501
|
reason: n.reason,
|
|
3494
3502
|
was_clean: n.was_clean
|
|
3495
|
-
})), Et(e) &&
|
|
3503
|
+
})), Et(e) && pi(l.gobj_timer, Yi(e))), 0;
|
|
3496
3504
|
}
|
|
3497
|
-
function
|
|
3505
|
+
function Yi(e) {
|
|
3498
3506
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3499
3507
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3500
3508
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
3501
3509
|
return Math.max(1, Math.round(o));
|
|
3502
3510
|
}
|
|
3503
|
-
function Yi(e, t, n, r) {
|
|
3504
|
-
return Vi(e), 0;
|
|
3505
|
-
}
|
|
3506
3511
|
function Bi(e, t, n, r) {
|
|
3512
|
+
return Gi(e), 0;
|
|
3513
|
+
}
|
|
3514
|
+
function Ji(e, t, n, r) {
|
|
3507
3515
|
let l = e.priv;
|
|
3508
|
-
|
|
3509
|
-
let o = Ql(e, n,
|
|
3516
|
+
hi(l.gobj_timer);
|
|
3517
|
+
let o = Ql(e, n, $i, !0), i = yl(e, o, "src_yuno", ""), s = yl(e, o, "src_role", ""), a = yl(e, o, "src_service", "");
|
|
3510
3518
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3511
3519
|
let u = hl(e, n, "result", -1, 0), _ = yl(e, n, "comment", "", 0), c = yl(e, n, "username", "", 0), f = Ol(e, n, "services_roles", {});
|
|
3512
3520
|
if (u < 0) {
|
|
3513
|
-
|
|
3521
|
+
Li(e);
|
|
3514
3522
|
let t = {
|
|
3515
3523
|
url: tn(e, "url"),
|
|
3516
3524
|
result: u,
|
|
@@ -3535,12 +3543,12 @@ function Bi(e, t, n, r) {
|
|
|
3535
3543
|
}
|
|
3536
3544
|
l.inside_on_open = !1, function(e) {
|
|
3537
3545
|
let t = In(e, null, null, null);
|
|
3538
|
-
for (let n = 0; n < t.length; n++)
|
|
3546
|
+
for (let n = 0; n < t.length; n++) Mi(e, t[n]);
|
|
3539
3547
|
}(e);
|
|
3540
3548
|
}
|
|
3541
3549
|
return 0;
|
|
3542
3550
|
}
|
|
3543
|
-
function
|
|
3551
|
+
function qi(e, t, n, r) {
|
|
3544
3552
|
let l = e.priv.url, o = function(e, t) {
|
|
3545
3553
|
let n;
|
|
3546
3554
|
try {
|
|
@@ -3559,19 +3567,19 @@ function Ji(e, t, n, r) {
|
|
|
3559
3567
|
} : (sr(`${Rt(e)}: parsing inter_event: kw not a json object`), null) : (sr(`${Rt(e)}: parsing inter_kw: no kw`), null);
|
|
3560
3568
|
}(e, n.data);
|
|
3561
3569
|
if (!o) return sr(`${Rt(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
3562
|
-
if (
|
|
3570
|
+
if (Ai(e)) {
|
|
3563
3571
|
let e = jt(Ot()) + " <== " + l, t = n.data.length, r = Qt(Ot(), "trace_ievent_callback");
|
|
3564
|
-
r ? r(e, o, 2, t) :
|
|
3572
|
+
r ? r(e, o, 2, t) : Pi(0, e, o);
|
|
3565
3573
|
}
|
|
3566
3574
|
let i = o.event, s = o.kw;
|
|
3567
3575
|
if ("ST_SESSION" !== cn(e)) {
|
|
3568
3576
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3569
3577
|
if (!(Tn(e, i, s, e) < 0)) return 0;
|
|
3570
3578
|
} else ir(`${Rt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3571
|
-
return
|
|
3579
|
+
return Li(e), -1;
|
|
3572
3580
|
}
|
|
3573
3581
|
o = null;
|
|
3574
|
-
let a = Zl(e, s), u = Ql(e, s,
|
|
3582
|
+
let a = Zl(e, s), u = Ql(e, s, $i), _ = yl(e, u, "dst_role", "");
|
|
3575
3583
|
if (_.toLowerCase() !== Nt().toLowerCase()) return ir(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3576
3584
|
let c = yl(e, u, "dst_service", "");
|
|
3577
3585
|
if ("__subscribing__" === a) return sr(`${Rt(e)}: subscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
@@ -3583,13 +3591,13 @@ function Ji(e, t, n, r) {
|
|
|
3583
3591
|
}
|
|
3584
3592
|
return It(e) ? Tn(At(e), i, s, e) : Pn(e, i, s), 0;
|
|
3585
3593
|
}
|
|
3586
|
-
function
|
|
3594
|
+
function Hi(e, t, n, r) {
|
|
3587
3595
|
return 0;
|
|
3588
3596
|
}
|
|
3589
|
-
function
|
|
3597
|
+
function zi(e, t, n, r) {
|
|
3590
3598
|
return 0;
|
|
3591
3599
|
}
|
|
3592
|
-
var
|
|
3600
|
+
var Qi = {
|
|
3593
3601
|
mt_create: function(e) {
|
|
3594
3602
|
let t = e.priv;
|
|
3595
3603
|
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);
|
|
@@ -3619,43 +3627,43 @@ var zi = {
|
|
|
3619
3627
|
code: 1e3,
|
|
3620
3628
|
reason: "restarted",
|
|
3621
3629
|
was_clean: !0
|
|
3622
|
-
}, e),
|
|
3630
|
+
}, e), hi(t.gobj_timer)), t.websocket = Ci(e), 0;
|
|
3623
3631
|
},
|
|
3624
3632
|
mt_stop: function(e) {
|
|
3625
3633
|
let t = e.priv;
|
|
3626
|
-
return
|
|
3634
|
+
return hi(t.gobj_timer), t.websocket && Li(e), 0;
|
|
3627
3635
|
},
|
|
3628
3636
|
mt_destroy: function(e) {},
|
|
3629
3637
|
mt_stats: function(e, t, n, r) {
|
|
3630
3638
|
if ("ST_SESSION" !== cn(e)) return ir("Not in session"), null;
|
|
3631
3639
|
n || (n = {});
|
|
3632
|
-
let l =
|
|
3640
|
+
let l = Vi(e, jt(r), yl(e, n, "service", null, 0)), o = Ol(e, n, "__md_stats__", null, Vn.KW_EXTRACT);
|
|
3633
3641
|
return o || (o = {}), zl(e, n, "stats_stack", {
|
|
3634
3642
|
stats: t,
|
|
3635
3643
|
kw: o
|
|
3636
|
-
}), zl(e, n,
|
|
3644
|
+
}), zl(e, n, $i, l), n.__stats__ = t, Xl(e, n, "__stats__"), Fi(e, "EV_MT_STATS", n, r), null;
|
|
3637
3645
|
},
|
|
3638
3646
|
mt_command_parser: function(e, t, n, r) {
|
|
3639
3647
|
if ("ST_SESSION" !== cn(e)) return ir("Not in session"), null;
|
|
3640
3648
|
n || (n = {});
|
|
3641
|
-
let l =
|
|
3649
|
+
let l = Vi(e, jt(r), yl(e, n, "service", "", 0)), o = Ol(e, n, "__md_command__", null, Vn.KW_EXTRACT);
|
|
3642
3650
|
return o || (o = {}), zl(e, n, "command_stack", {
|
|
3643
3651
|
command: t,
|
|
3644
3652
|
kw: o
|
|
3645
|
-
}), zl(e, n,
|
|
3653
|
+
}), zl(e, n, $i, l), n.__command__ = t, Xl(e, n, "__command__"), Fi(e, "EV_MT_COMMAND", n, r), null;
|
|
3646
3654
|
},
|
|
3647
3655
|
mt_inject_event: function(e, t, n, r) {
|
|
3648
3656
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3649
|
-
if (n = Dr({}, Yr(n) ? n : {}), Yr(n.__md_iev__) && (n.__md_iev__ = jr(n.__md_iev__)), Ql(e, n,
|
|
3657
|
+
if (n = Dr({}, Yr(n) ? n : {}), Yr(n.__md_iev__) && (n.__md_iev__ = jr(n.__md_iev__)), Ql(e, n, $i));
|
|
3650
3658
|
else {
|
|
3651
|
-
let l =
|
|
3652
|
-
Cr(n, "__service__"), zl(e, n, "__message__", t), zl(e, n,
|
|
3659
|
+
let l = Vi(e, jt(r), yl(e, n, "__service__", 0, 0));
|
|
3660
|
+
Cr(n, "__service__"), zl(e, n, "__message__", t), zl(e, n, $i, l);
|
|
3653
3661
|
}
|
|
3654
|
-
return Xl(e, n, "__message__"),
|
|
3662
|
+
return Xl(e, n, "__message__"), Fi(e, t, n, r);
|
|
3655
3663
|
},
|
|
3656
3664
|
mt_subscription_added: function(e, t) {
|
|
3657
3665
|
let n = e.priv;
|
|
3658
|
-
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3666
|
+
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 : Mi(e, t) : 0;
|
|
3659
3667
|
},
|
|
3660
3668
|
mt_subscription_deleted: function(e, t) {
|
|
3661
3669
|
let n = e.priv;
|
|
@@ -3664,27 +3672,27 @@ var zi = {
|
|
|
3664
3672
|
if (tl(t.event)) return 0;
|
|
3665
3673
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3666
3674
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3667
|
-
return zl(e, r,
|
|
3675
|
+
return zl(e, r, $i, Vi(e, jt(a), s)), Xl(e, r, "__unsubscribing__"), Fi(e, t.event, r, e);
|
|
3668
3676
|
}
|
|
3669
3677
|
};
|
|
3670
|
-
function
|
|
3678
|
+
function Xi() {
|
|
3671
3679
|
return function(e) {
|
|
3672
|
-
if (
|
|
3680
|
+
if (Ii) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
3673
3681
|
const t = [
|
|
3674
3682
|
["ST_DISCONNECTED", [
|
|
3675
3683
|
[
|
|
3676
3684
|
"EV_ON_OPEN",
|
|
3677
|
-
|
|
3685
|
+
xi,
|
|
3678
3686
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3679
3687
|
],
|
|
3680
3688
|
[
|
|
3681
3689
|
"EV_ON_CLOSE",
|
|
3682
|
-
|
|
3690
|
+
Ki,
|
|
3683
3691
|
null
|
|
3684
3692
|
],
|
|
3685
3693
|
[
|
|
3686
3694
|
"EV_TIMEOUT",
|
|
3687
|
-
|
|
3695
|
+
Wi,
|
|
3688
3696
|
null
|
|
3689
3697
|
],
|
|
3690
3698
|
[
|
|
@@ -3696,22 +3704,22 @@ function Qi() {
|
|
|
3696
3704
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3697
3705
|
[
|
|
3698
3706
|
"EV_ON_MESSAGE",
|
|
3699
|
-
|
|
3707
|
+
qi,
|
|
3700
3708
|
null
|
|
3701
3709
|
],
|
|
3702
3710
|
[
|
|
3703
3711
|
"EV_IDENTITY_CARD_ACK",
|
|
3704
|
-
|
|
3712
|
+
Ji,
|
|
3705
3713
|
null
|
|
3706
3714
|
],
|
|
3707
3715
|
[
|
|
3708
3716
|
"EV_ON_CLOSE",
|
|
3709
|
-
|
|
3717
|
+
Ki,
|
|
3710
3718
|
"ST_DISCONNECTED"
|
|
3711
3719
|
],
|
|
3712
3720
|
[
|
|
3713
3721
|
"EV_TIMEOUT",
|
|
3714
|
-
|
|
3722
|
+
Bi,
|
|
3715
3723
|
null
|
|
3716
3724
|
],
|
|
3717
3725
|
[
|
|
@@ -3723,22 +3731,22 @@ function Qi() {
|
|
|
3723
3731
|
["ST_SESSION", [
|
|
3724
3732
|
[
|
|
3725
3733
|
"EV_ON_MESSAGE",
|
|
3726
|
-
|
|
3734
|
+
qi,
|
|
3727
3735
|
null
|
|
3728
3736
|
],
|
|
3729
3737
|
[
|
|
3730
3738
|
"EV_MT_STATS",
|
|
3731
|
-
|
|
3739
|
+
Hi,
|
|
3732
3740
|
null
|
|
3733
3741
|
],
|
|
3734
3742
|
[
|
|
3735
3743
|
"EV_MT_COMMAND",
|
|
3736
|
-
|
|
3744
|
+
zi,
|
|
3737
3745
|
null
|
|
3738
3746
|
],
|
|
3739
3747
|
[
|
|
3740
3748
|
"EV_ON_CLOSE",
|
|
3741
|
-
|
|
3749
|
+
Ki,
|
|
3742
3750
|
"ST_DISCONNECTED"
|
|
3743
3751
|
],
|
|
3744
3752
|
[
|
|
@@ -3749,7 +3757,7 @@ function Qi() {
|
|
|
3749
3757
|
]],
|
|
3750
3758
|
[null, null]
|
|
3751
3759
|
];
|
|
3752
|
-
return (
|
|
3760
|
+
return (Ii = Ae(e, [
|
|
3753
3761
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3754
3762
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3755
3763
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3760,9 +3768,9 @@ function Qi() {
|
|
|
3760
3768
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3761
3769
|
["EV_TIMEOUT", 0],
|
|
3762
3770
|
[null, 0]
|
|
3763
|
-
], t,
|
|
3771
|
+
], t, Qi, 0, Ri, ki, 0, 0, Di, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3764
3772
|
}("C_IEVENT_CLI");
|
|
3765
3773
|
}
|
|
3766
|
-
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,
|
|
3774
|
+
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, Fo as build_path, s as build_stats_response, Lo as clean_name, hi as clear_timeout, il as cmp_two_simple_json, l as command_parser, wo as createElement2, No as createOneHtml, co as create_json_record, ui as create_template_record, Ao as current_timestamp, T as data_type_t, Zo as db_list_persistent_attrs, zo as db_load_persistent_attrs, Xo as db_remove_persistent_attrs, Qo as db_save_persistent_attrs, Uo as debounce, Jl as delete_from_list, $r as duplicate_objects, Kr as empty_json, tl as empty_string, bo as escapeHtml, U as event_flag_t, Yo as flat2json, qo as flat_apply, Jo as flat_diff, Wo as flat_key_join, xo 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, jo as getPositionRelativeToBody, Po as get_function_name, ko 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, ho as html_markup, Kl as id_index_in_obj_list, Io as index_in_list, Br as is_array, Hr as is_boolean, Xr as is_date, Zr as is_function, el as is_gobj, Eo as is_html_markup, al as is_metadata_key, zr as is_null, qr as is_number, Yr as is_object, ul as is_private_key, Qr as is_pure_number, br as is_secret_name, Jr as is_string, io as jdb_delete, ao as jdb_get, uo as jdb_get_by_idx, so as jdb_get_topic, ro as jdb_init, oo as jdb_update, Ko as json2flat, Ur as json_array_append, Fr as json_array_append_new, Gr as json_array_extend, Vr as json_array_remove, Wr as json_array_size, jr as json_deep_copy, Rr as json_is_identical, Nr as json_mask_secrets, Cr as json_object_del, Ir as json_object_get, Lr as json_object_set, Pr as json_object_set_new, Mr as json_object_size, Dr as json_object_update, Ar as json_object_update_existing, kr as json_object_update_missing, xr as json_size, go as jwt2json, fo as jwtDecode, kl as kw_clone_by_keys, Il as kw_clone_by_not_keys, Al as kw_collect, pl as kw_delete, Rl as kw_find_json_in_list, bl as kw_find_path, Vn as kw_flag_t, ml as kw_get_bool, vl as kw_get_dict, Ol as kw_get_dict_value, hl as kw_get_int, Sl as kw_get_list, Cl as kw_get_local_storage_value, Tl as kw_get_pointer, El as kw_get_real, yl as kw_get_str, cl as kw_has_key, $l as kw_match_simple, _l as kw_pop, Pl as kw_remove_local_storage_value, Dl as kw_select, Nl as kw_set_dict_value, Ll as kw_set_local_storage_value, wl as kw_set_subdict_value, Fl as kwid_collect, Ml as kwid_find_one_record, Wl as kwid_get_ids, Ul as kwid_match_id, Vl as kwid_new_dict, Gl as kwid_new_list, xl as list2options, eo as load_json_file, ur as log_debug, ir as log_error, ar as log_info, sr as log_warning, yr as mask_secrets_inline, Zl as msg_iev_get_msg_type, Ql as msg_iev_get_stack, zl as msg_iev_push_stack, ql as msg_iev_read_key, Xl as msg_iev_set_msg_type, Hl as msg_iev_write_key, Co as node_uuid, nl as parseBoolean, $o as parseSVG, Ro as refresh_language, Xi as register_c_ievent_cli, bi as register_c_timer, ji as register_c_yuno, po as safeSrc, v as sdata_flag_t, to 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, Oo as set_strings_are_text, pi as set_timeout, mi as set_timeout_periodic, t as sprintf, i as stats_parser, Yl as str_in_list, ol as strcasecmp, ll as strcmp, So as strings_are_text, rl as strncmp, Bl as strs_in_list, sl as strstr, ai as template_get_field_desc, Do as timeTracker, cr as trace_json, wr as trace_json_masked, B as trace_level_t, _r as trace_msg, ti as treedb_decoder_fkey, ri as treedb_decoder_hook, ni as treedb_encoder_fkey, si as treedb_get_field_desc, ei as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3767
3775
|
|
|
3768
3776
|
//# sourceMappingURL=gobj-js.es.min.js.map
|