@yuneta/gobj-js 7.26.14 → 7.26.15
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 +11 -15
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +187 -190
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +11 -15
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +211 -214
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +11 -15
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +187 -190
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +11 -15
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +187 -190
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
667
667
|
}
|
|
668
668
|
function Re(e, t) {
|
|
669
|
-
let n =
|
|
669
|
+
let n = tl(e.dl_children, t);
|
|
670
670
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
671
671
|
}
|
|
672
672
|
function De(e, t) {
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
if (1 === C) L(n("🔄 %s %s%s %s from %s%s", t || "", e.running ? "" : "!!", et(e), o.state_name, l && !l.running ? "!!" : "", et(l)));
|
|
1099
1099
|
else {
|
|
1100
1100
|
let r = "";
|
|
1101
|
-
i.action && (r =
|
|
1101
|
+
i.action && (r = rl(i.action)), L(n("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Ze(e), Xe(e), o.state_name, "", t || "", "", r, l && !l.running ? "!!" : "", Ze(l), Xe(l)));
|
|
1102
1102
|
}
|
|
1103
1103
|
r && q(e) && zn(r) && Un(r);
|
|
1104
1104
|
}
|
|
@@ -1377,7 +1377,11 @@
|
|
|
1377
1377
|
try {
|
|
1378
1378
|
return JSON.stringify(e);
|
|
1379
1379
|
} catch (t) {
|
|
1380
|
-
|
|
1380
|
+
try {
|
|
1381
|
+
return String(e);
|
|
1382
|
+
} catch (t) {
|
|
1383
|
+
return `<${typeof e}: not printable>`;
|
|
1384
|
+
}
|
|
1381
1385
|
}
|
|
1382
1386
|
}
|
|
1383
1387
|
function mn(e) {
|
|
@@ -1404,23 +1408,23 @@
|
|
|
1404
1408
|
return n;
|
|
1405
1409
|
}
|
|
1406
1410
|
function hn(e, ...t) {
|
|
1407
|
-
let n = mn(e, ...t), r =
|
|
1411
|
+
let n = mn(e, ...t), r = el();
|
|
1408
1412
|
tn && (tn === en.error ? cn("error", n) && tn("%c" + r + " ERROR: " + String(n), "color:red") : (cn("error", n) && en.error("%c" + r + " ERROR: " + String(n), "color:red"), tn(`${r} ERROR: ${String(n)}`))), gn("error", n, r);
|
|
1409
1413
|
}
|
|
1410
1414
|
function yn(e, ...t) {
|
|
1411
|
-
let n = mn(e, ...t), r =
|
|
1415
|
+
let n = mn(e, ...t), r = el();
|
|
1412
1416
|
nn && (nn === en.warn ? cn("warning", n) && nn("%c" + r + " WARNING: " + String(n), "color:yellow") : (cn("warning", n) && en.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), nn(`${r} WARNING: ${String(n)}`))), gn("warning", n, r);
|
|
1413
1417
|
}
|
|
1414
1418
|
function En(e, ...t) {
|
|
1415
|
-
let n = mn(e, ...t), r =
|
|
1419
|
+
let n = mn(e, ...t), r = el();
|
|
1416
1420
|
ln && cn("debug", n) && ln("%c" + r + " DEBUG: " + String(n), "color:silver"), gn("debug", n, r);
|
|
1417
1421
|
}
|
|
1418
1422
|
function Tn(e, ...t) {
|
|
1419
|
-
let n = mn(e, ...t), r =
|
|
1423
|
+
let n = mn(e, ...t), r = el();
|
|
1420
1424
|
ln && cn("msg", n) && ln("%c" + r + " MSG: " + String(n), "color:cyan"), gn("msg", n, r);
|
|
1421
1425
|
}
|
|
1422
1426
|
function vn(e, t) {
|
|
1423
|
-
cn("json", t) && (t && en.warn("=====> " + t), en.dir(e)), gn("json", e,
|
|
1427
|
+
cn("json", t) && (t && en.warn("=====> " + t), en.dir(e)), gn("json", e, el());
|
|
1424
1428
|
}
|
|
1425
1429
|
var jn = [
|
|
1426
1430
|
"passw",
|
|
@@ -2093,14 +2097,7 @@
|
|
|
2093
2097
|
]), Zn(e[r]) && Kr(e[r], t, n), n = n.slice(0, -l.length);
|
|
2094
2098
|
}
|
|
2095
2099
|
}
|
|
2096
|
-
function Yr(e) {
|
|
2097
|
-
try {
|
|
2098
|
-
return JSON.stringify(e);
|
|
2099
|
-
} catch (t) {
|
|
2100
|
-
return `<${typeof e}: not json (${t.message})>`;
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
function Br(e, t, n, r) {
|
|
2100
|
+
function Yr(e, t, n, r) {
|
|
2104
2101
|
if (!e) return null;
|
|
2105
2102
|
let l, o = e.length;
|
|
2106
2103
|
for (l = 0; l < o; l++) {
|
|
@@ -2109,14 +2106,14 @@
|
|
|
2109
2106
|
let e = o.id;
|
|
2110
2107
|
if (e && e === n) return o;
|
|
2111
2108
|
if (r && gr(o, t)) {
|
|
2112
|
-
let e =
|
|
2109
|
+
let e = Yr(o[t], t, n, r);
|
|
2113
2110
|
if (e) return e;
|
|
2114
2111
|
}
|
|
2115
2112
|
}
|
|
2116
2113
|
}
|
|
2117
2114
|
return null;
|
|
2118
2115
|
}
|
|
2119
|
-
function
|
|
2116
|
+
function Br(e) {
|
|
2120
2117
|
function t(e) {
|
|
2121
2118
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2122
2119
|
switch (t.length % 4) {
|
|
@@ -2147,10 +2144,10 @@
|
|
|
2147
2144
|
signature: t(n[2])
|
|
2148
2145
|
};
|
|
2149
2146
|
}
|
|
2150
|
-
function
|
|
2147
|
+
function Jr(e) {
|
|
2151
2148
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2152
2149
|
}
|
|
2153
|
-
var
|
|
2150
|
+
var qr = class {
|
|
2154
2151
|
constructor(e) {
|
|
2155
2152
|
this.html = e, Object.freeze(this);
|
|
2156
2153
|
}
|
|
@@ -2158,41 +2155,41 @@
|
|
|
2158
2155
|
return this.html;
|
|
2159
2156
|
}
|
|
2160
2157
|
};
|
|
2161
|
-
function
|
|
2162
|
-
return e instanceof
|
|
2158
|
+
function Hr(e) {
|
|
2159
|
+
return e instanceof qr;
|
|
2163
2160
|
}
|
|
2164
|
-
function
|
|
2161
|
+
function zr(e) {
|
|
2165
2162
|
const t = document.createElement("template");
|
|
2166
2163
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2167
2164
|
}
|
|
2168
|
-
var
|
|
2169
|
-
function
|
|
2165
|
+
var Qr = !1, Xr = /* @__PURE__ */ new Set();
|
|
2166
|
+
function Zr(e) {
|
|
2170
2167
|
const t = document.createElement("template");
|
|
2171
2168
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2172
2169
|
}
|
|
2173
|
-
function
|
|
2170
|
+
function el(e) {
|
|
2174
2171
|
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();
|
|
2175
2172
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2176
2173
|
}
|
|
2177
|
-
function
|
|
2174
|
+
function tl(e, t) {
|
|
2178
2175
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2179
2176
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2180
2177
|
return -1;
|
|
2181
2178
|
}
|
|
2182
|
-
function
|
|
2179
|
+
function nl() {
|
|
2183
2180
|
let e = "";
|
|
2184
2181
|
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;
|
|
2185
2182
|
}
|
|
2186
|
-
function
|
|
2183
|
+
function rl(e) {
|
|
2187
2184
|
let t = null;
|
|
2188
2185
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2189
2186
|
}
|
|
2190
|
-
var
|
|
2191
|
-
function
|
|
2187
|
+
var ll = 256, ol = 1e5;
|
|
2188
|
+
function sl(e) {
|
|
2192
2189
|
const t = String(e).replace(/`/g, "``");
|
|
2193
2190
|
return "[" === t[0] ? "[" + t : t;
|
|
2194
2191
|
}
|
|
2195
|
-
function
|
|
2192
|
+
function il(e) {
|
|
2196
2193
|
if ("string" != typeof e) return null;
|
|
2197
2194
|
let t = [], n = "";
|
|
2198
2195
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2213,13 +2210,13 @@
|
|
|
2213
2210
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2214
2211
|
});
|
|
2215
2212
|
}
|
|
2216
|
-
function
|
|
2213
|
+
function _l(e, t) {
|
|
2217
2214
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2218
2215
|
}
|
|
2219
|
-
function
|
|
2216
|
+
function al(e) {
|
|
2220
2217
|
return "persistent-attrs-" + et(e);
|
|
2221
2218
|
}
|
|
2222
|
-
function
|
|
2219
|
+
function ul(e, t) {
|
|
2223
2220
|
if (tr(t)) {
|
|
2224
2221
|
if (-1 === t.indexOf("^")) {
|
|
2225
2222
|
let n, r, l = e.fkey;
|
|
@@ -2249,7 +2246,7 @@
|
|
|
2249
2246
|
hook_name: t.hook_name
|
|
2250
2247
|
} : (hn("bad fkey 3"), hn(e), hn(t), null);
|
|
2251
2248
|
}
|
|
2252
|
-
var
|
|
2249
|
+
var cl = [
|
|
2253
2250
|
"string",
|
|
2254
2251
|
"integer",
|
|
2255
2252
|
"object",
|
|
@@ -2259,7 +2256,7 @@
|
|
|
2259
2256
|
"real",
|
|
2260
2257
|
"boolean",
|
|
2261
2258
|
"blob"
|
|
2262
|
-
],
|
|
2259
|
+
], fl = [
|
|
2263
2260
|
"persistent",
|
|
2264
2261
|
"required",
|
|
2265
2262
|
"notnull",
|
|
@@ -2271,7 +2268,7 @@
|
|
|
2271
2268
|
"stats",
|
|
2272
2269
|
"rstats",
|
|
2273
2270
|
"pstats"
|
|
2274
|
-
],
|
|
2271
|
+
], gl = [
|
|
2275
2272
|
"hook",
|
|
2276
2273
|
"fkey",
|
|
2277
2274
|
"enum",
|
|
@@ -2300,7 +2297,7 @@
|
|
|
2300
2297
|
"coordinates",
|
|
2301
2298
|
"gbuffer"
|
|
2302
2299
|
];
|
|
2303
|
-
function
|
|
2300
|
+
function dl(e) {
|
|
2304
2301
|
let t = {
|
|
2305
2302
|
name: e.id,
|
|
2306
2303
|
header: e.header,
|
|
@@ -2319,7 +2316,7 @@
|
|
|
2319
2316
|
if (!e.flag) return t;
|
|
2320
2317
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2321
2318
|
let r = e.flag[n];
|
|
2322
|
-
if (Ur(
|
|
2319
|
+
if (Ur(gl, r)) {
|
|
2323
2320
|
switch (r) {
|
|
2324
2321
|
case "enum":
|
|
2325
2322
|
t.enum_list = e.enum;
|
|
@@ -2333,7 +2330,7 @@
|
|
|
2333
2330
|
case "file": t.is_file = !0;
|
|
2334
2331
|
}
|
|
2335
2332
|
t.type = r;
|
|
2336
|
-
} else if (Ur(
|
|
2333
|
+
} else if (Ur(fl, r)) switch (r) {
|
|
2337
2334
|
case "writable":
|
|
2338
2335
|
t.is_writable = !0;
|
|
2339
2336
|
break;
|
|
@@ -2346,23 +2343,23 @@
|
|
|
2346
2343
|
}
|
|
2347
2344
|
return t.is_file && (t.type = "file"), t;
|
|
2348
2345
|
}
|
|
2349
|
-
var
|
|
2346
|
+
var bl = [
|
|
2350
2347
|
j(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2351
2348
|
j(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2352
2349
|
j(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2353
2350
|
v()
|
|
2354
|
-
],
|
|
2351
|
+
], pl = {
|
|
2355
2352
|
periodic: !1,
|
|
2356
2353
|
msec: 0,
|
|
2357
2354
|
timer_id: -1
|
|
2358
|
-
},
|
|
2359
|
-
function
|
|
2355
|
+
}, ml = null;
|
|
2356
|
+
function hl(e, t, n, r) {
|
|
2360
2357
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2361
2358
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2362
2359
|
Vt(e, "EV_TIMEOUT", {}, e);
|
|
2363
2360
|
}, l.msec) : l.timer_id = -1, lt(e) ? Vt(nt(e), o, {}, e) : Xt(e, o, {}), l.periodic || -1 !== l.timer_id || Ke(e) && Ve(e), 0;
|
|
2364
2361
|
}
|
|
2365
|
-
var
|
|
2362
|
+
var yl = {
|
|
2366
2363
|
mt_create: function(e) {
|
|
2367
2364
|
let t = e.priv;
|
|
2368
2365
|
const n = Ot(e, "subscriber");
|
|
@@ -2387,16 +2384,16 @@
|
|
|
2387
2384
|
},
|
|
2388
2385
|
mt_destroy: function(e) {}
|
|
2389
2386
|
};
|
|
2390
|
-
function
|
|
2387
|
+
function El(e, t) {
|
|
2391
2388
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2392
2389
|
}
|
|
2393
|
-
function
|
|
2390
|
+
function Tl(e, t) {
|
|
2394
2391
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2395
2392
|
}
|
|
2396
|
-
function
|
|
2393
|
+
function vl(e) {
|
|
2397
2394
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2398
2395
|
}
|
|
2399
|
-
var
|
|
2396
|
+
var jl = [
|
|
2400
2397
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2401
2398
|
j(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2402
2399
|
j(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2416,26 +2413,26 @@
|
|
|
2416
2413
|
j(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2417
2414
|
j(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2418
2415
|
v()
|
|
2419
|
-
],
|
|
2420
|
-
function
|
|
2416
|
+
], Ol = { gobj_timer: null }, Sl = null;
|
|
2417
|
+
function wl(e, t, n, r) {
|
|
2421
2418
|
let l = yt(e, t);
|
|
2422
2419
|
return Zn(l) || (l = {}), l[n] = r, St(e, t, l), De(e, t);
|
|
2423
2420
|
}
|
|
2424
|
-
function
|
|
2421
|
+
function Nl(e) {
|
|
2425
2422
|
if (!0 === e || !1 === e) return e;
|
|
2426
2423
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2427
2424
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2428
2425
|
}
|
|
2429
|
-
function
|
|
2426
|
+
function $l() {
|
|
2430
2427
|
return `${ze()}^${He()}`;
|
|
2431
2428
|
}
|
|
2432
|
-
function
|
|
2429
|
+
function Rl(e, t, n, r) {
|
|
2433
2430
|
return Xt(e, t, n), 0;
|
|
2434
2431
|
}
|
|
2435
|
-
var
|
|
2432
|
+
var Dl = {
|
|
2436
2433
|
mt_create: function(e) {
|
|
2437
2434
|
let t = e.priv;
|
|
2438
|
-
Rt(e, "start_date",
|
|
2435
|
+
Rt(e, "start_date", el()), Rt(e, "node_uuid", nl()), e.priv.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.periodic_timeout = yt(e, "periodic_timeout"), function(e) {
|
|
2439
2436
|
let t = yt(e, "trace_levels");
|
|
2440
2437
|
if (!Zn(t)) return 0;
|
|
2441
2438
|
let n = t.__global_trace__;
|
|
@@ -2469,10 +2466,10 @@
|
|
|
2469
2466
|
},
|
|
2470
2467
|
mt_writing: function(e, t) {},
|
|
2471
2468
|
mt_start: function(e) {
|
|
2472
|
-
return
|
|
2469
|
+
return Tl(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2473
2470
|
},
|
|
2474
2471
|
mt_stop: function(e) {
|
|
2475
|
-
return
|
|
2472
|
+
return vl(e.priv.gobj_timer), Me(e), 0;
|
|
2476
2473
|
},
|
|
2477
2474
|
mt_destroy: function(e) {},
|
|
2478
2475
|
mt_play: function(e) {
|
|
@@ -2489,24 +2486,24 @@
|
|
|
2489
2486
|
case "get-global-no-trace": return l(0, 0, null, null, ne());
|
|
2490
2487
|
case "set-global-trace":
|
|
2491
2488
|
case "set-global-no-trace": {
|
|
2492
|
-
let r = "set-global-no-trace" === t, o = n.level, s =
|
|
2493
|
-
return o ? null === s ? l(0, -1, `${
|
|
2489
|
+
let r = "set-global-no-trace" === t, o = n.level, s = Nl(n.set);
|
|
2490
|
+
return o ? null === s ? l(0, -1, `${$l()}: bitmask set or re-set?`, null, null) : (r ? X(o, s) : Q(o, s)) < 0 ? l(0, -1, `${$l()}: global trace level not found: ${o}`, null, null) : r ? (wl(e, "no_trace_levels", "__global_no_trace__", ne()), l(0, 0, null, null, ne())) : (wl(e, "trace_levels", "__global_trace__", te()), l(0, 0, null, null, te())) : l(0, -1, `${$l()}: what level?`, null, null);
|
|
2494
2491
|
}
|
|
2495
2492
|
case "get-gclass-trace":
|
|
2496
2493
|
case "get-gclass-no-trace":
|
|
2497
2494
|
case "set-gclass-trace":
|
|
2498
2495
|
case "set-gclass-no-trace": {
|
|
2499
2496
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2500
|
-
if (!s) return l(0, -1, `${
|
|
2497
|
+
if (!s) return l(0, -1, `${$l()}: what gclass is '${o}'?`, null, null);
|
|
2501
2498
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2502
|
-
let i = n.level, _ =
|
|
2503
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2499
|
+
let i = n.level, _ = Nl(n.set);
|
|
2500
|
+
return i ? null === _ ? l(0, -1, `${$l()}: bitmask set or re-set?`, null, null) : (r ? ie(s, i, _) : se(s, i, _)) < 0 ? l(0, -1, `${$l()}: trace level of ${o} not found: ${i}`, null, null) : r ? (wl(e, "no_trace_levels", o, oe(s)), l(0, 0, null, null, oe(s))) : (wl(e, "trace_levels", o, le(s)), l(0, 0, null, null, re(s))) : l(0, -1, `${$l()}: what level?`, null, null);
|
|
2504
2501
|
}
|
|
2505
|
-
default: return l(0, -1, `${
|
|
2502
|
+
default: return l(0, -1, `${$l()}: command not available: ${t}`, null, null);
|
|
2506
2503
|
}
|
|
2507
2504
|
}
|
|
2508
2505
|
};
|
|
2509
|
-
var
|
|
2506
|
+
var kl = "ievent_gate_stack", Al = [
|
|
2510
2507
|
j(y.DTP_STRING, "wanted_yuno_role", E.SDF_RD, "", "wanted yuno role"),
|
|
2511
2508
|
j(y.DTP_STRING, "wanted_yuno_name", E.SDF_RD, "", "wanted yuno name"),
|
|
2512
2509
|
j(y.DTP_STRING, "wanted_yuno_service", E.SDF_RD, "", "wanted yuno service"),
|
|
@@ -2523,15 +2520,15 @@
|
|
|
2523
2520
|
j(y.DTP_INTEGER, "timeout_idack", E.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2524
2521
|
j(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2525
2522
|
v()
|
|
2526
|
-
],
|
|
2523
|
+
], Il = [
|
|
2527
2524
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
2528
2525
|
["ievents2", "Trace inter-events with full kw"],
|
|
2529
2526
|
["identity-card", "Trace identity_card messages"]
|
|
2530
2527
|
];
|
|
2531
|
-
function
|
|
2528
|
+
function Cl(e) {
|
|
2532
2529
|
return !!(3 & x(e));
|
|
2533
2530
|
}
|
|
2534
|
-
var
|
|
2531
|
+
var Ll = {
|
|
2535
2532
|
url: null,
|
|
2536
2533
|
remote_yuno_name: null,
|
|
2537
2534
|
remote_yuno_role: null,
|
|
@@ -2541,8 +2538,8 @@
|
|
|
2541
2538
|
websocket: null,
|
|
2542
2539
|
inside_on_open: !1,
|
|
2543
2540
|
retry_ms: 0
|
|
2544
|
-
},
|
|
2545
|
-
function
|
|
2541
|
+
}, Pl = null;
|
|
2542
|
+
function Ul(e) {
|
|
2546
2543
|
e.priv.websocket && hn("Websocket ALREADY setup");
|
|
2547
2544
|
const t = jt(e, "url");
|
|
2548
2545
|
En(`====> Starting WebSocket to '${t}' (${et(e)})`);
|
|
@@ -2557,7 +2554,7 @@
|
|
|
2557
2554
|
code: 1006,
|
|
2558
2555
|
reason: r.message,
|
|
2559
2556
|
was_clean: !1
|
|
2560
|
-
}, e) < 0 &&
|
|
2557
|
+
}, e) < 0 && El(e.priv.gobj_timer, ql(e)), null;
|
|
2561
2558
|
}
|
|
2562
2559
|
return r ? (r.onopen = () => {
|
|
2563
2560
|
n !== e.priv.ws_seq || ot(e) || Vt(e, "EV_ON_OPEN", {
|
|
@@ -2579,7 +2576,7 @@
|
|
|
2579
2576
|
}, e));
|
|
2580
2577
|
}, r) : (hn(`${et(e)}: Failed to initialize WebSocket.`), null);
|
|
2581
2578
|
}
|
|
2582
|
-
function
|
|
2579
|
+
function Fl(e, t = 1e3, n = "") {
|
|
2583
2580
|
let r = e.priv, l = r.websocket;
|
|
2584
2581
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
2585
2582
|
En(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -2590,25 +2587,25 @@
|
|
|
2590
2587
|
}
|
|
2591
2588
|
} else yn("WebSocket is already closed or in the process of closing.");
|
|
2592
2589
|
}
|
|
2593
|
-
function
|
|
2594
|
-
let r =
|
|
2590
|
+
function Vl(e, t, n) {
|
|
2591
|
+
let r = el();
|
|
2595
2592
|
try {
|
|
2596
2593
|
En("\n" + r + " " + t + "\n"), Un(n);
|
|
2597
2594
|
} catch (e) {
|
|
2598
2595
|
En("ERROR in trace_inter_event: " + e);
|
|
2599
2596
|
}
|
|
2600
2597
|
}
|
|
2601
|
-
var
|
|
2598
|
+
var Gl = class {
|
|
2602
2599
|
constructor(e, t) {
|
|
2603
2600
|
this.event = e, this.kw = t || {};
|
|
2604
2601
|
}
|
|
2605
2602
|
};
|
|
2606
|
-
function
|
|
2603
|
+
function Ml(e, t, n, r) {
|
|
2607
2604
|
return function(e, t) {
|
|
2608
2605
|
let n = e.priv, r = JSON.stringify(t);
|
|
2609
|
-
if (
|
|
2606
|
+
if (Cl(e)) {
|
|
2610
2607
|
let n = jt(e, "url"), l = Xe(qe()) + " ==> " + n, o = yt(qe(), "trace_ievent_callback");
|
|
2611
|
-
o ? o(l, t, 1, r.length) :
|
|
2608
|
+
o ? o(l, t, 1, r.length) : Vl(0, l, t);
|
|
2612
2609
|
}
|
|
2613
2610
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return yn(`${et(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
2614
2611
|
try {
|
|
@@ -2618,10 +2615,10 @@
|
|
|
2618
2615
|
}
|
|
2619
2616
|
return 0;
|
|
2620
2617
|
}(e, function(e, t) {
|
|
2621
|
-
return ir(e) ? (hn("iev_create() event NULL"), null) : new
|
|
2618
|
+
return ir(e) ? (hn("iev_create() event NULL"), null) : new Gl(e, t);
|
|
2622
2619
|
}(t, n));
|
|
2623
2620
|
}
|
|
2624
|
-
function
|
|
2621
|
+
function Wl(e, t, n) {
|
|
2625
2622
|
return ir(n) && (n = jt(e, "wanted_yuno_service")), {
|
|
2626
2623
|
dst_yuno: jt(e, "wanted_yuno_name"),
|
|
2627
2624
|
dst_role: jt(e, "wanted_yuno_role"),
|
|
@@ -2629,10 +2626,10 @@
|
|
|
2629
2626
|
src_yuno: He(),
|
|
2630
2627
|
src_role: ze(),
|
|
2631
2628
|
src_service: t,
|
|
2632
|
-
host:
|
|
2629
|
+
host: nl()
|
|
2633
2630
|
};
|
|
2634
2631
|
}
|
|
2635
|
-
function
|
|
2632
|
+
function xl(e) {
|
|
2636
2633
|
let t = e.priv, n = Je(qe()), r = jt(qe(), "yuno_version"), l = jt(qe(), "yuno_release"), o = jt(qe(), "yuno_tag"), i = yt(e, "required_services");
|
|
2637
2634
|
i && i.length || (i = yt(qe(), "required_services"));
|
|
2638
2635
|
let _ = {
|
|
@@ -2650,27 +2647,27 @@
|
|
|
2650
2647
|
username: jt(qe(), "__username__"),
|
|
2651
2648
|
launch_id: 0,
|
|
2652
2649
|
yuno_startdate: jt(qe(), "start_date"),
|
|
2653
|
-
id:
|
|
2650
|
+
id: nl(),
|
|
2654
2651
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
2655
2652
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
2656
2653
|
required_services: i
|
|
2657
2654
|
};
|
|
2658
|
-
return Gr(e, _,
|
|
2655
|
+
return Gr(e, _, kl, Wl(e, Xe(nt(e)), null)), Wr(e, _, "__identity__"), El(t.gobj_timer, vt(e, "timeout_idack")), Ml(e, "EV_IDENTITY_CARD", _);
|
|
2659
2656
|
}
|
|
2660
|
-
function
|
|
2657
|
+
function Kl(e, t) {
|
|
2661
2658
|
if (ir(t.event)) return -1;
|
|
2662
2659
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, s = t.__service__, i = t.subscriber;
|
|
2663
2660
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
2664
|
-
return Gr(e, n,
|
|
2661
|
+
return Gr(e, n, kl, Wl(e, Xe(i), s)), Wr(e, n, "__subscribing__"), Ml(e, t.event, n);
|
|
2665
2662
|
}
|
|
2666
|
-
function
|
|
2663
|
+
function Yl(e, t, n, r) {
|
|
2667
2664
|
let l = e.priv;
|
|
2668
|
-
return Ke(e) && (l.websocket =
|
|
2665
|
+
return Ke(e) && (l.websocket = Ul(e)), 0;
|
|
2669
2666
|
}
|
|
2670
|
-
function
|
|
2671
|
-
return En("Websocket opened: " + e.priv.url),
|
|
2667
|
+
function Bl(e, t, n, r) {
|
|
2668
|
+
return En("Websocket opened: " + e.priv.url), xl(e), 0;
|
|
2672
2669
|
}
|
|
2673
|
-
function
|
|
2670
|
+
function Jl(e, t, n, r) {
|
|
2674
2671
|
let l = e.priv, o = n.url;
|
|
2675
2672
|
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (bn(), yn(`${et(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, Xt(e, "EV_ON_CLOSE", {
|
|
2676
2673
|
url: o,
|
|
@@ -2685,25 +2682,25 @@
|
|
|
2685
2682
|
code: n.code,
|
|
2686
2683
|
reason: n.reason,
|
|
2687
2684
|
was_clean: n.was_clean
|
|
2688
|
-
})), Ke(e) &&
|
|
2685
|
+
})), Ke(e) && El(l.gobj_timer, ql(e))), 0;
|
|
2689
2686
|
}
|
|
2690
|
-
function
|
|
2687
|
+
function ql(e) {
|
|
2691
2688
|
let t = e.priv, n = vt(e, "timeout_retry"), r = vt(e, "timeout_retry_max");
|
|
2692
2689
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
2693
2690
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
2694
2691
|
return Math.max(1, Math.round(o));
|
|
2695
2692
|
}
|
|
2696
|
-
function
|
|
2697
|
-
return
|
|
2693
|
+
function Hl(e, t, n, r) {
|
|
2694
|
+
return xl(e), 0;
|
|
2698
2695
|
}
|
|
2699
|
-
function
|
|
2696
|
+
function zl(e, t, n, r) {
|
|
2700
2697
|
let l = e.priv;
|
|
2701
|
-
|
|
2702
|
-
let o = Mr(e, n,
|
|
2698
|
+
vl(l.gobj_timer);
|
|
2699
|
+
let o = Mr(e, n, kl, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2703
2700
|
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2704
2701
|
let a = Er(e, n, "result", -1, 0), u = Tr(e, n, "comment", "", 0), c = Tr(e, n, "username", "", 0), f = Or(e, n, "services_roles", {});
|
|
2705
2702
|
if (a < 0) {
|
|
2706
|
-
|
|
2703
|
+
Fl(e);
|
|
2707
2704
|
let t = {
|
|
2708
2705
|
url: jt(e, "url"),
|
|
2709
2706
|
result: a,
|
|
@@ -2728,12 +2725,12 @@
|
|
|
2728
2725
|
}
|
|
2729
2726
|
l.inside_on_open = !1, function(e) {
|
|
2730
2727
|
let t = zt(e, null, null, null);
|
|
2731
|
-
for (let n = 0; n < t.length; n++)
|
|
2728
|
+
for (let n = 0; n < t.length; n++) Kl(e, t[n]);
|
|
2732
2729
|
}(e);
|
|
2733
2730
|
}
|
|
2734
2731
|
return 0;
|
|
2735
2732
|
}
|
|
2736
|
-
function
|
|
2733
|
+
function Ql(e, t, n, r) {
|
|
2737
2734
|
let l = e.priv.url, o = function(e, t) {
|
|
2738
2735
|
let n;
|
|
2739
2736
|
try {
|
|
@@ -2752,19 +2749,19 @@
|
|
|
2752
2749
|
} : (yn(`${et(e)}: parsing inter_event: kw not a json object`), null) : (yn(`${et(e)}: parsing inter_kw: no kw`), null);
|
|
2753
2750
|
}(e, n.data);
|
|
2754
2751
|
if (!o) return yn(`${et(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
2755
|
-
if (
|
|
2752
|
+
if (Cl(e)) {
|
|
2756
2753
|
let e = Xe(qe()) + " <== " + l, t = n.data.length, r = yt(qe(), "trace_ievent_callback");
|
|
2757
|
-
r ? r(e, o, 2, t) :
|
|
2754
|
+
r ? r(e, o, 2, t) : Vl(0, e, o);
|
|
2758
2755
|
}
|
|
2759
2756
|
let s = o.event, i = o.kw;
|
|
2760
2757
|
if ("ST_SESSION" !== kt(e)) {
|
|
2761
2758
|
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2762
2759
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2763
2760
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2764
|
-
return
|
|
2761
|
+
return Fl(e), -1;
|
|
2765
2762
|
}
|
|
2766
2763
|
o = null;
|
|
2767
|
-
let _ = xr(e, i), a = Mr(e, i,
|
|
2764
|
+
let _ = xr(e, i), a = Mr(e, i, kl), u = Tr(e, a, "dst_role", "");
|
|
2768
2765
|
if (u.toLowerCase() !== ze().toLowerCase()) return hn(`"It's not my role, dst_role: ${u}, my_role: ${ze()}`), 0;
|
|
2769
2766
|
let c = Tr(e, a, "dst_service", "");
|
|
2770
2767
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
@@ -2776,13 +2773,13 @@
|
|
|
2776
2773
|
}
|
|
2777
2774
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2778
2775
|
}
|
|
2779
|
-
function
|
|
2776
|
+
function Xl(e, t, n, r) {
|
|
2780
2777
|
return 0;
|
|
2781
2778
|
}
|
|
2782
|
-
function
|
|
2779
|
+
function Zl(e, t, n, r) {
|
|
2783
2780
|
return 0;
|
|
2784
2781
|
}
|
|
2785
|
-
var
|
|
2782
|
+
var eo = {
|
|
2786
2783
|
mt_create: function(e) {
|
|
2787
2784
|
let t = e.priv;
|
|
2788
2785
|
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"), Rt(e, "wanted_yuno_name", t.remote_yuno_name), Rt(e, "wanted_yuno_role", t.remote_yuno_role), Rt(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -2812,43 +2809,43 @@
|
|
|
2812
2809
|
code: 1e3,
|
|
2813
2810
|
reason: "restarted",
|
|
2814
2811
|
was_clean: !0
|
|
2815
|
-
}, e),
|
|
2812
|
+
}, e), vl(t.gobj_timer)), t.websocket = Ul(e), 0;
|
|
2816
2813
|
},
|
|
2817
2814
|
mt_stop: function(e) {
|
|
2818
2815
|
let t = e.priv;
|
|
2819
|
-
return
|
|
2816
|
+
return vl(t.gobj_timer), t.websocket && Fl(e), 0;
|
|
2820
2817
|
},
|
|
2821
2818
|
mt_destroy: function(e) {},
|
|
2822
2819
|
mt_stats: function(e, t, n, r) {
|
|
2823
2820
|
if ("ST_SESSION" !== kt(e)) return hn("Not in session"), null;
|
|
2824
2821
|
n || (n = {});
|
|
2825
|
-
let l =
|
|
2822
|
+
let l = Wl(e, Xe(r), Tr(e, n, "service", null, 0)), o = Or(e, n, "__md_stats__", null, Zt.KW_EXTRACT);
|
|
2826
2823
|
return o || (o = {}), Gr(e, n, "stats_stack", {
|
|
2827
2824
|
stats: t,
|
|
2828
2825
|
kw: o
|
|
2829
|
-
}), Gr(e, n,
|
|
2826
|
+
}), Gr(e, n, kl, l), n.__stats__ = t, Wr(e, n, "__stats__"), Ml(e, "EV_MT_STATS", n, r), null;
|
|
2830
2827
|
},
|
|
2831
2828
|
mt_command_parser: function(e, t, n, r) {
|
|
2832
2829
|
if ("ST_SESSION" !== kt(e)) return hn("Not in session"), null;
|
|
2833
2830
|
n || (n = {});
|
|
2834
|
-
let l =
|
|
2831
|
+
let l = Wl(e, Xe(r), Tr(e, n, "service", "", 0)), o = Or(e, n, "__md_command__", null, Zt.KW_EXTRACT);
|
|
2835
2832
|
return o || (o = {}), Gr(e, n, "command_stack", {
|
|
2836
2833
|
command: t,
|
|
2837
2834
|
kw: o
|
|
2838
|
-
}), Gr(e, n,
|
|
2835
|
+
}), Gr(e, n, kl, l), n.__command__ = t, Wr(e, n, "__command__"), Ml(e, "EV_MT_COMMAND", n, r), null;
|
|
2839
2836
|
},
|
|
2840
2837
|
mt_inject_event: function(e, t, n, r) {
|
|
2841
2838
|
if ("ST_SESSION" !== kt(e)) return window.console.error("Not in session"), -1;
|
|
2842
|
-
if (n = Gn({}, Zn(n) ? n : {}), Zn(n.__md_iev__) && (n.__md_iev__ = Fn(n.__md_iev__)), Mr(e, n,
|
|
2839
|
+
if (n = Gn({}, Zn(n) ? n : {}), Zn(n.__md_iev__) && (n.__md_iev__ = Fn(n.__md_iev__)), Mr(e, n, kl));
|
|
2843
2840
|
else {
|
|
2844
|
-
let l =
|
|
2845
|
-
Kn(n, "__service__"), Gr(e, n, "__message__", t), Gr(e, n,
|
|
2841
|
+
let l = Wl(e, Xe(r), Tr(e, n, "__service__", 0, 0));
|
|
2842
|
+
Kn(n, "__service__"), Gr(e, n, "__message__", t), Gr(e, n, kl, l);
|
|
2846
2843
|
}
|
|
2847
|
-
return Wr(e, n, "__message__"),
|
|
2844
|
+
return Wr(e, n, "__message__"), Ml(e, t, n, r);
|
|
2848
2845
|
},
|
|
2849
2846
|
mt_subscription_added: function(e, t) {
|
|
2850
2847
|
let n = e.priv;
|
|
2851
|
-
return "ST_SESSION" === kt(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
2848
|
+
return "ST_SESSION" === kt(e) && n.websocket ? n.inside_on_open ? 0 : Kl(e, t) : 0;
|
|
2852
2849
|
},
|
|
2853
2850
|
mt_subscription_deleted: function(e, t) {
|
|
2854
2851
|
let n = e.priv;
|
|
@@ -2857,7 +2854,7 @@
|
|
|
2857
2854
|
if (ir(t.event)) return 0;
|
|
2858
2855
|
let r = {}, l = t.__global__, o = t.__config__, s = t.__filter__, i = t.__service__, _ = t.subscriber;
|
|
2859
2856
|
o && (r.__config__ = o), l && (r.__global__ = l), s && (r.__filter__ = s);
|
|
2860
|
-
return Gr(e, r,
|
|
2857
|
+
return Gr(e, r, kl, Wl(e, Xe(_), i)), Wr(e, r, "__unsubscribing__"), Ml(e, t.event, r, e);
|
|
2861
2858
|
}
|
|
2862
2859
|
};
|
|
2863
2860
|
e.GObj = S, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, l, o) => new T(e, t, n, null, o, r, null, 0, null, l, null), e.SDATACM = (e, t, n, r, l, o) => new T(e, t, 0, null, o, n, null, 0, l, r, null), e.SDATACM2 = (e, t, n, r, l, o, s) => new T(e, t, n, null, s, r, null, 0, o, l, null), e.SDATADF = (e, t, n, r, l, o) => new T(e, t, n, null, o, null, r, l), e.SDATAPM = (e, t, n, r, l) => new T(e, t, n, r, l), e.SDATAPM0 = (e, t, n, r, l) => new T(e, t, n, null, l, null, null, 0, null, null, r), e.SDATA_END = v, e.SDataDesc = T, e.YUNETA_VERSION = s, Object.defineProperty(e, "__yuno__", {
|
|
@@ -2871,7 +2868,7 @@
|
|
|
2871
2868
|
return t;
|
|
2872
2869
|
}, e.build_stats_response = o, e.clean_name = function(e) {
|
|
2873
2870
|
return e.replace(/[?# ^:]/g, "_");
|
|
2874
|
-
}, e.clear_timeout =
|
|
2871
|
+
}, e.clear_timeout = vl, e.cmp_two_simple_json = cr, e.command_parser = function(e, t, n, r) {}, e.createElement2 = function e(t, n) {
|
|
2875
2872
|
let [r, l, o, s] = t;
|
|
2876
2873
|
if (!r) return void hn("Tag must be a valid HTML element.");
|
|
2877
2874
|
let i = document.createElement(r), _ = "";
|
|
@@ -2880,21 +2877,21 @@
|
|
|
2880
2877
|
for (const n of Object.keys(l[e])) t += `${n}: ${l[e][n]};`;
|
|
2881
2878
|
i.style.cssText = t;
|
|
2882
2879
|
} else "style" === e ? i.style.cssText = l[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== l[e] && void 0 !== l[e] && (_ = l[e], i.setAttribute("data-i18n", _)) : i.setAttribute(e, l[e]);
|
|
2883
|
-
if (
|
|
2884
|
-
else if (tr(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !
|
|
2880
|
+
if (Hr(o)) i.appendChild(zr(o));
|
|
2881
|
+
else if (tr(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !Qr) i.appendChild(Zr(o));
|
|
2885
2882
|
else if (o.length > 0 && "<" === o[0] && function(e) {
|
|
2886
|
-
if (
|
|
2883
|
+
if (Xr.size >= 100) return;
|
|
2887
2884
|
const t = e.slice(0, 80);
|
|
2888
|
-
|
|
2885
|
+
Xr.has(t) || (Xr.add(t), yn(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2889
2886
|
}(o), n && _) i.textContent = n(_) || o;
|
|
2890
2887
|
else i.textContent = o;
|
|
2891
2888
|
else if (er(o)) {
|
|
2892
2889
|
if (o.length > 0) if (tr(o[0])) i.appendChild(e(o, n));
|
|
2893
|
-
else for (let t of o) Array.isArray(t) ? t.length > 0 && i.appendChild(e(t, n)) : t instanceof Node ? i.appendChild(t) :
|
|
2890
|
+
else for (let t of o) Array.isArray(t) ? t.length > 0 && i.appendChild(e(t, n)) : t instanceof Node ? i.appendChild(t) : Hr(t) ? i.appendChild(zr(t)) : tr(t) ? i.appendChild(document.createTextNode(t)) : null != t && !1 !== t && hn("createElement2: child ignored, type " + typeof t);
|
|
2894
2891
|
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? i.appendChild(o) : null != o && (hn("content ignored"), vn(o));
|
|
2895
2892
|
if (s && "object" == typeof s) for (const e of Object.keys(s)) i.addEventListener(e, s[e]);
|
|
2896
2893
|
return i;
|
|
2897
|
-
}, e.createOneHtml =
|
|
2894
|
+
}, e.createOneHtml = Zr, e.create_json_record = function(e, t) {
|
|
2898
2895
|
let n = Fn(e);
|
|
2899
2896
|
return Mn(n, t), n;
|
|
2900
2897
|
}, e.create_template_record = function(e, t) {
|
|
@@ -2905,21 +2902,21 @@
|
|
|
2905
2902
|
let o = Or(null, t, e, l);
|
|
2906
2903
|
Yn(n, e, o);
|
|
2907
2904
|
}), n;
|
|
2908
|
-
}, e.current_timestamp =
|
|
2909
|
-
let n = kr(
|
|
2905
|
+
}, e.current_timestamp = el, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2906
|
+
let n = kr(al(e), null, !1), r = {};
|
|
2910
2907
|
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2911
2908
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2912
|
-
let n = Et(e, E.SDF_PERSIST), r = kr(
|
|
2909
|
+
let n = Et(e, E.SDF_PERSIST), r = kr(al(e), null, !1);
|
|
2913
2910
|
if (r && Zn(r)) {
|
|
2914
2911
|
let l = Rr(e, r, t, !1);
|
|
2915
2912
|
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2916
2913
|
}
|
|
2917
2914
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2918
|
-
let n = Dr(e, kr(
|
|
2919
|
-
0 === zn(n) ? Ir(
|
|
2915
|
+
let n = Dr(e, kr(al(e), null, !1), t, !1);
|
|
2916
|
+
0 === zn(n) ? Ir(al(e)) : Ar(al(e), n);
|
|
2920
2917
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2921
|
-
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(
|
|
2922
|
-
return r && Zn(r) && Wn(n, r), Ar(
|
|
2918
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(al(e), null, !1);
|
|
2919
|
+
return r && Zn(r) && Wn(n, r), Ar(al(e), n);
|
|
2923
2920
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2924
2921
|
let r = null, l = null, o = null;
|
|
2925
2922
|
const s = (...s) => {
|
|
@@ -2943,20 +2940,20 @@
|
|
|
2943
2940
|
return t;
|
|
2944
2941
|
}, e.empty_json = function(e) {
|
|
2945
2942
|
return 0 === Xn(e);
|
|
2946
|
-
}, e.empty_string = ir, e.escapeHtml =
|
|
2943
|
+
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2947
2944
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2948
2945
|
let t = null;
|
|
2949
2946
|
for (const n of Object.keys(e)) {
|
|
2950
|
-
const r =
|
|
2947
|
+
const r = il(n);
|
|
2951
2948
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2952
|
-
if (r.length >
|
|
2949
|
+
if (r.length > ll) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2953
2950
|
const l = "number" == typeof r[0];
|
|
2954
2951
|
if (null === t) t = l ? [] : {};
|
|
2955
2952
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2956
2953
|
let o = t;
|
|
2957
2954
|
for (let t = 0; t < r.length; t++) {
|
|
2958
2955
|
const l = r[t], s = "number" == typeof l, i = t === r.length - 1, _ = !i && "number" == typeof r[t + 1];
|
|
2959
|
-
if (s && l >
|
|
2956
|
+
if (s && l > ol) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2960
2957
|
if (s !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${s ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2961
2958
|
if (i) {
|
|
2962
2959
|
if (Array.isArray(o)) {
|
|
@@ -2996,15 +2993,15 @@
|
|
|
2996
2993
|
removed: {},
|
|
2997
2994
|
changed: {}
|
|
2998
2995
|
};
|
|
2999
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2996
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? _l(n[e], r[e]) || br(l.changed, e, {
|
|
3000
2997
|
from: n[e],
|
|
3001
2998
|
to: r[e]
|
|
3002
2999
|
}) : br(l.removed, e, n[e]);
|
|
3003
3000
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || br(l.added, e, r[e]);
|
|
3004
3001
|
return l;
|
|
3005
3002
|
}, e.flat_key_join = function(e) {
|
|
3006
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
3007
|
-
}, e.flat_key_split =
|
|
3003
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : sl(e)).join("`") : "";
|
|
3004
|
+
}, e.flat_key_split = il, e.gclass_add_ev_action = ye, e.gclass_add_event_type = Te, e.gclass_add_state = he, e.gclass_check_fsm = je, e.gclass_create = de, e.gclass_event_type = ve, e.gclass_find_by_name = Oe, e.gclass_flag_t = w, e.gclass_unregister = be, e.getPositionRelativeToBody = function(e) {
|
|
3008
3005
|
if (!e) return {
|
|
3009
3006
|
top: 0,
|
|
3010
3007
|
left: 0,
|
|
@@ -3023,7 +3020,7 @@
|
|
|
3023
3020
|
right: n + i + r,
|
|
3024
3021
|
bottom: t + s + l
|
|
3025
3022
|
};
|
|
3026
|
-
}, e.get_function_name =
|
|
3023
|
+
}, e.get_function_name = rl, e.get_now = function() {
|
|
3027
3024
|
return Math.floor(Date.now() / 1e3);
|
|
3028
3025
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3029
3026
|
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Re(e.parent, e), e.parent = null), $e(t, e), t.gclass.gmt.mt_child_added && (Y(e) && En(n("👦👦🔵 child_added(%s): %s", tt(t), et(e))), t.gclass.gmt.mt_child_added(t, e)), 0) : (hn(`${et(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
@@ -3171,10 +3168,10 @@
|
|
|
3171
3168
|
}
|
|
3172
3169
|
return _ ? yn(`${et(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${_})`) : i || a || (yn(`${et(e)}: No subscription found`), Un(n, "No subscription found")), 0;
|
|
3173
3170
|
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr = $t, e.gobj_write_str_attr = Rt, e.gobj_yuno = qe, e.gobj_yuno_id = Qe, e.gobj_yuno_name = He, e.gobj_yuno_role = ze, e.html_markup = function(e) {
|
|
3174
|
-
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new
|
|
3175
|
-
}, e.id_index_in_obj_list = Pr, e.index_in_list =
|
|
3171
|
+
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new qr("")) : new qr(e);
|
|
3172
|
+
}, e.id_index_in_obj_list = Pr, e.index_in_list = tl, e.is_array = er, e.is_boolean = rr, e.is_date = function(e) {
|
|
3176
3173
|
return e instanceof Date && !isNaN(e);
|
|
3177
|
-
}, e.is_function = or, e.is_gobj = sr, e.is_html_markup =
|
|
3174
|
+
}, e.is_function = or, e.is_gobj = sr, e.is_html_markup = Hr, e.is_metadata_key = function(e) {
|
|
3178
3175
|
if (!tr(e)) return !1;
|
|
3179
3176
|
let t = 0;
|
|
3180
3177
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -3192,17 +3189,17 @@
|
|
|
3192
3189
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3193
3190
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3194
3191
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3195
|
-
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${
|
|
3192
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${pn(r)}`), null;
|
|
3196
3193
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3197
3194
|
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3198
3195
|
let o, s = n.split("`"), i = l;
|
|
3199
|
-
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i =
|
|
3196
|
+
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3200
3197
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
3201
3198
|
let _ = er(i) ? i : Or(null, i, e.hook, null, 0), a = Pr(_, r.id);
|
|
3202
3199
|
return a < 0 ? (hn(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (_.splice(a, 1), l);
|
|
3203
3200
|
}, e.jdb_get = function(e, t, n, r) {
|
|
3204
3201
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3205
|
-
return l ? (void 0 === r && (r = !0),
|
|
3202
|
+
return l ? (void 0 === r && (r = !0), Yr(l, e.hook, n, r)) : (hn("jdb_get: topic not found: " + t), null);
|
|
3206
3203
|
}, e.jdb_get_by_idx = function(e, t, n) {
|
|
3207
3204
|
let r = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3208
3205
|
return r ? n < r.length ? r[n] : {} : (hn("jdb_get_by_idx: topic not found: " + t), null);
|
|
@@ -3221,11 +3218,11 @@
|
|
|
3221
3218
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3222
3219
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3223
3220
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3224
|
-
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${
|
|
3221
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${pn(r)}`), null;
|
|
3225
3222
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3226
3223
|
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3227
3224
|
let o, s, i = n.split("`"), _ = l;
|
|
3228
|
-
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ =
|
|
3225
|
+
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Yr(_, null, o, !1);
|
|
3229
3226
|
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
3230
3227
|
if (er(_)) s = _;
|
|
3231
3228
|
else {
|
|
@@ -3233,11 +3230,11 @@
|
|
|
3233
3230
|
if (s = Or(null, _, e.hook, null, 0), null == s) s = [], Yn(_, e.hook, s);
|
|
3234
3231
|
else if (!er(s)) return hn(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
3235
3232
|
}
|
|
3236
|
-
let a =
|
|
3233
|
+
let a = Yr(s, e.hook, r.id, !1);
|
|
3237
3234
|
return a ? Gn(a, r) : s.push(r), l;
|
|
3238
3235
|
}, e.json2flat = function(e) {
|
|
3239
3236
|
const t = {}, n = (e, r, l) => {
|
|
3240
|
-
if (l >
|
|
3237
|
+
if (l > ll) throw new Error("json2flat: deeper than 256");
|
|
3241
3238
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
3242
3239
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
3243
3240
|
const o = `[${t}]`;
|
|
@@ -3247,7 +3244,7 @@
|
|
|
3247
3244
|
const t = Object.keys(e);
|
|
3248
3245
|
if (t.length > 0) {
|
|
3249
3246
|
for (const o of t) {
|
|
3250
|
-
const t =
|
|
3247
|
+
const t = sl(o);
|
|
3251
3248
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
3252
3249
|
}
|
|
3253
3250
|
return;
|
|
@@ -3260,7 +3257,7 @@
|
|
|
3260
3257
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
3261
3258
|
}, e.json_array_remove = Hn, e.json_array_size = Qn, e.json_deep_copy = Fn, e.json_is_identical = Vn, e.json_mask_secrets = Pn, e.json_object_del = Kn, e.json_object_get = xn, e.json_object_set = Yn, e.json_object_set_new = Bn, e.json_object_size = zn, e.json_object_update = Gn, e.json_object_update_existing = Mn, e.json_object_update_missing = Wn, e.json_size = Xn, e.jwt2json = function(e, t) {
|
|
3262
3259
|
try {
|
|
3263
|
-
let n =
|
|
3260
|
+
let n = Br(e);
|
|
3264
3261
|
switch (t) {
|
|
3265
3262
|
case "header": return JSON.parse(n.header);
|
|
3266
3263
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -3269,7 +3266,7 @@
|
|
|
3269
3266
|
} catch (e) {
|
|
3270
3267
|
return null;
|
|
3271
3268
|
}
|
|
3272
|
-
}, e.jwtDecode =
|
|
3269
|
+
}, e.jwtDecode = Br, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3273
3270
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3274
3271
|
r || (r = $r);
|
|
3275
3272
|
let l = [];
|
|
@@ -3413,9 +3410,9 @@
|
|
|
3413
3410
|
var e;
|
|
3414
3411
|
}, r.send();
|
|
3415
3412
|
}, e.log_debug = En, e.log_error = hn, e.log_info = function(e, ...t) {
|
|
3416
|
-
let n = mn(e, ...t), r =
|
|
3413
|
+
let n = mn(e, ...t), r = el();
|
|
3417
3414
|
rn && cn("info", n) && rn("%c" + r + " INFO: " + String(n), "color:cyan"), gn("info", n, r);
|
|
3418
|
-
}, e.log_warning = yn, e.mask_secrets_inline = kn, e.msg_iev_get_msg_type = xr, e.msg_iev_get_stack = Mr, e.msg_iev_push_stack = Gr, e.msg_iev_read_key = Fr, e.msg_iev_set_msg_type = Wr, e.msg_iev_write_key = Vr, e.node_uuid =
|
|
3415
|
+
}, e.log_warning = yn, e.mask_secrets_inline = kn, e.msg_iev_get_msg_type = xr, e.msg_iev_get_stack = Mr, e.msg_iev_push_stack = Gr, e.msg_iev_read_key = Fr, e.msg_iev_set_msg_type = Wr, e.msg_iev_write_key = Vr, e.node_uuid = nl, e.parseBoolean = _r, e.parseSVG = function(e) {
|
|
3419
3416
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
3420
3417
|
}, e.refresh_language = function(e, t) {
|
|
3421
3418
|
if (!or(t)) return void hn("You must supply a translation function");
|
|
@@ -3442,22 +3439,22 @@
|
|
|
3442
3439
|
});
|
|
3443
3440
|
}, e.register_c_ievent_cli = function() {
|
|
3444
3441
|
return function(e) {
|
|
3445
|
-
if (
|
|
3442
|
+
if (Pl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3446
3443
|
const t = [
|
|
3447
3444
|
["ST_DISCONNECTED", [
|
|
3448
3445
|
[
|
|
3449
3446
|
"EV_ON_OPEN",
|
|
3450
|
-
|
|
3447
|
+
Bl,
|
|
3451
3448
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3452
3449
|
],
|
|
3453
3450
|
[
|
|
3454
3451
|
"EV_ON_CLOSE",
|
|
3455
|
-
|
|
3452
|
+
Jl,
|
|
3456
3453
|
null
|
|
3457
3454
|
],
|
|
3458
3455
|
[
|
|
3459
3456
|
"EV_TIMEOUT",
|
|
3460
|
-
|
|
3457
|
+
Yl,
|
|
3461
3458
|
null
|
|
3462
3459
|
],
|
|
3463
3460
|
[
|
|
@@ -3469,22 +3466,22 @@
|
|
|
3469
3466
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3470
3467
|
[
|
|
3471
3468
|
"EV_ON_MESSAGE",
|
|
3472
|
-
|
|
3469
|
+
Ql,
|
|
3473
3470
|
null
|
|
3474
3471
|
],
|
|
3475
3472
|
[
|
|
3476
3473
|
"EV_IDENTITY_CARD_ACK",
|
|
3477
|
-
|
|
3474
|
+
zl,
|
|
3478
3475
|
null
|
|
3479
3476
|
],
|
|
3480
3477
|
[
|
|
3481
3478
|
"EV_ON_CLOSE",
|
|
3482
|
-
|
|
3479
|
+
Jl,
|
|
3483
3480
|
"ST_DISCONNECTED"
|
|
3484
3481
|
],
|
|
3485
3482
|
[
|
|
3486
3483
|
"EV_TIMEOUT",
|
|
3487
|
-
|
|
3484
|
+
Hl,
|
|
3488
3485
|
null
|
|
3489
3486
|
],
|
|
3490
3487
|
[
|
|
@@ -3496,22 +3493,22 @@
|
|
|
3496
3493
|
["ST_SESSION", [
|
|
3497
3494
|
[
|
|
3498
3495
|
"EV_ON_MESSAGE",
|
|
3499
|
-
|
|
3496
|
+
Ql,
|
|
3500
3497
|
null
|
|
3501
3498
|
],
|
|
3502
3499
|
[
|
|
3503
3500
|
"EV_MT_STATS",
|
|
3504
|
-
|
|
3501
|
+
Xl,
|
|
3505
3502
|
null
|
|
3506
3503
|
],
|
|
3507
3504
|
[
|
|
3508
3505
|
"EV_MT_COMMAND",
|
|
3509
|
-
|
|
3506
|
+
Zl,
|
|
3510
3507
|
null
|
|
3511
3508
|
],
|
|
3512
3509
|
[
|
|
3513
3510
|
"EV_ON_CLOSE",
|
|
3514
|
-
|
|
3511
|
+
Jl,
|
|
3515
3512
|
"ST_DISCONNECTED"
|
|
3516
3513
|
],
|
|
3517
3514
|
[
|
|
@@ -3522,7 +3519,7 @@
|
|
|
3522
3519
|
]],
|
|
3523
3520
|
[null, null]
|
|
3524
3521
|
];
|
|
3525
|
-
return (
|
|
3522
|
+
return (Pl = de(e, [
|
|
3526
3523
|
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3527
3524
|
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3528
3525
|
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
@@ -3533,36 +3530,36 @@
|
|
|
3533
3530
|
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3534
3531
|
["EV_TIMEOUT", 0],
|
|
3535
3532
|
[null, 0]
|
|
3536
|
-
], t,
|
|
3533
|
+
], t, eo, 0, Al, Ll, 0, 0, Il, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3537
3534
|
}("C_IEVENT_CLI");
|
|
3538
3535
|
}, e.register_c_timer = function() {
|
|
3539
3536
|
return function(e) {
|
|
3540
|
-
if (
|
|
3537
|
+
if (ml) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3541
3538
|
const t = [["ST_IDLE", [[
|
|
3542
3539
|
"EV_TIMEOUT",
|
|
3543
|
-
|
|
3540
|
+
hl,
|
|
3544
3541
|
null
|
|
3545
3542
|
]]]];
|
|
3546
|
-
return (
|
|
3543
|
+
return (ml = de(e, [
|
|
3547
3544
|
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3548
3545
|
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3549
3546
|
[0, 0]
|
|
3550
|
-
], t,
|
|
3547
|
+
], t, yl, 0, bl, pl, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3551
3548
|
}("C_TIMER");
|
|
3552
3549
|
}, e.register_c_yuno = function() {
|
|
3553
3550
|
return function(e) {
|
|
3554
|
-
if (
|
|
3551
|
+
if (Sl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3555
3552
|
const t = [["ST_IDLE", [[
|
|
3556
3553
|
"EV_TIMEOUT_PERIODIC",
|
|
3557
|
-
|
|
3554
|
+
Rl,
|
|
3558
3555
|
null
|
|
3559
3556
|
]]]];
|
|
3560
|
-
return (
|
|
3557
|
+
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]], t, Dl, 0, jl, Ol, 0, 0, 0, 0)) ? 0 : -1;
|
|
3561
3558
|
}("C_YUNO");
|
|
3562
3559
|
}, e.safeSrc = function(e) {
|
|
3563
3560
|
if (!e) return "";
|
|
3564
3561
|
const t = String(e).trim();
|
|
3565
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
3562
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Jr(t);
|
|
3566
3563
|
}, e.sdata_flag_t = E, e.send_http_json_post = function(e, t, n) {
|
|
3567
3564
|
let r = new XMLHttpRequest();
|
|
3568
3565
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
@@ -3586,9 +3583,9 @@
|
|
|
3586
3583
|
}
|
|
3587
3584
|
} else on = e;
|
|
3588
3585
|
}, e.set_remote_log_functions = bn, e.set_strings_are_text = function(e) {
|
|
3589
|
-
|
|
3590
|
-
}, e.set_timeout =
|
|
3591
|
-
return
|
|
3586
|
+
Qr = !!e;
|
|
3587
|
+
}, e.set_timeout = El, e.set_timeout_periodic = Tl, e.sprintf = n, e.stats_parser = function(e, t, n, r) {}, e.str_in_list = Ur, e.strcasecmp = ur, e.strcmp = ar, e.strings_are_text = function() {
|
|
3588
|
+
return Qr;
|
|
3592
3589
|
}, e.strncmp = function(e, t, n) {
|
|
3593
3590
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
3594
3591
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
@@ -3618,9 +3615,9 @@
|
|
|
3618
3615
|
let e = t.split(".");
|
|
3619
3616
|
for (let t = 0; t < e.length; t++) {
|
|
3620
3617
|
let r = e[t];
|
|
3621
|
-
if (Ur(
|
|
3622
|
-
else if (Ur(
|
|
3623
|
-
else if (Ur(
|
|
3618
|
+
if (Ur(cl, r)) n.real_type || (n.real_type = r);
|
|
3619
|
+
else if (Ur(gl, r)) n.type || (n.type = r);
|
|
3620
|
+
else if (Ur(fl, r)) switch (r) {
|
|
3624
3621
|
case "writable":
|
|
3625
3622
|
n.is_writable = !0;
|
|
3626
3623
|
break;
|
|
@@ -3632,7 +3629,7 @@
|
|
|
3632
3629
|
}
|
|
3633
3630
|
}
|
|
3634
3631
|
n.real_type || (n.real_type = "string");
|
|
3635
|
-
} else Zn(t) ? (n =
|
|
3632
|
+
} else Zn(t) ? (n = dl(t), n.name || (n.name = e), n.header || (n.header = e)) : er(t) && (n.real_type = "array", n.enum_list = t);
|
|
3636
3633
|
return n.type || (n.type = n.real_type), n;
|
|
3637
3634
|
}, e.timeTracker = function(e = "Time Tracker", t = !1) {
|
|
3638
3635
|
const n = e, r = performance.now();
|
|
@@ -3644,7 +3641,7 @@
|
|
|
3644
3641
|
total: _
|
|
3645
3642
|
};
|
|
3646
3643
|
} };
|
|
3647
|
-
}, e.trace_json = vn, e.trace_json_masked = Un, e.trace_level_t = P, e.trace_msg = Tn, e.treedb_decoder_fkey =
|
|
3644
|
+
}, e.trace_json = vn, e.trace_json_masked = Un, e.trace_level_t = P, e.trace_msg = Tn, e.treedb_decoder_fkey = ul, e.treedb_decoder_hook = function(e, t) {
|
|
3648
3645
|
if (tr(t)) {
|
|
3649
3646
|
if (-1 === t.indexOf("^")) {
|
|
3650
3647
|
let n, r = e.hook;
|
|
@@ -3671,9 +3668,9 @@
|
|
|
3671
3668
|
id: t.id
|
|
3672
3669
|
} : (hn("bad hook 3"), hn(e), hn(t), null);
|
|
3673
3670
|
}, e.treedb_encoder_fkey = function(e, t) {
|
|
3674
|
-
let n =
|
|
3671
|
+
let n = ul(e, t);
|
|
3675
3672
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
3676
|
-
}, e.treedb_get_field_desc =
|
|
3673
|
+
}, e.treedb_get_field_desc = dl, e.treedb_hook_data_size = function(e) {
|
|
3677
3674
|
if (er(e) && 1 === Xn(e)) {
|
|
3678
3675
|
let t = e[0];
|
|
3679
3676
|
return gr(t, "size") ? t.size : 1;
|