@yuneta/gobj-js 7.27.0 → 7.28.1
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/LICENSE +24 -0
- package/README.md +1 -3
- package/THIRD-PARTY-NOTICES +37 -0
- package/dist/gobj-js.cjs.js +30 -56
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +238 -251
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +31 -55
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +306 -320
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +30 -56
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +238 -251
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +30 -56
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +238 -251
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +8 -7
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).gobjJs = {});
|
|
3
3
|
})(this, function(e) {
|
|
4
4
|
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
|
|
5
|
+
/*!
|
|
6
|
+
Adapted from https://github.com/alexei/sprintf.js/blob/master/src/sprintf.js
|
|
7
|
+
under its BSD-3-Clause License:
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro>
|
|
10
|
+
All rights reserved.
|
|
11
|
+
|
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
|
13
|
+
modification, are permitted provided that the following conditions are met:
|
|
14
|
+
* Redistributions of source code must retain the above copyright
|
|
15
|
+
notice, this list of conditions and the following disclaimer.
|
|
16
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
17
|
+
notice, this list of conditions and the following disclaimer in the
|
|
18
|
+
documentation and/or other materials provided with the distribution.
|
|
19
|
+
* Neither the name of this software nor the names of its contributors may be
|
|
20
|
+
used to endorse or promote products derived from this software without
|
|
21
|
+
specific prior written permission.
|
|
22
|
+
|
|
23
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
24
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
25
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
26
|
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
27
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
28
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
29
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
30
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
32
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
+
*/
|
|
5
34
|
var t = {
|
|
6
35
|
not_string: /[^s]/,
|
|
7
36
|
not_bool: /[^t]/,
|
|
@@ -229,7 +258,7 @@
|
|
|
229
258
|
};
|
|
230
259
|
var x = 1;
|
|
231
260
|
function K(e) {
|
|
232
|
-
Bo(e) && (e = JSON.stringify(e)), ar(" ".repeat(Math.max(1,
|
|
261
|
+
Bo(e) && (e = JSON.stringify(e)), ar(" ".repeat(Math.max(1, 4 * h)) + String(e));
|
|
233
262
|
}
|
|
234
263
|
var B = Object.freeze({
|
|
235
264
|
TRACE_MACHINE: 65536,
|
|
@@ -982,7 +1011,7 @@
|
|
|
982
1011
|
t.parent && ir(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
983
1012
|
}
|
|
984
1013
|
function lt(e, t) {
|
|
985
|
-
let n =
|
|
1014
|
+
let n = Hl(e.dl_children, t);
|
|
986
1015
|
n >= 0 && (Go(e.dl_children, n), t.parent = null);
|
|
987
1016
|
}
|
|
988
1017
|
function it(e, t) {
|
|
@@ -1587,7 +1616,7 @@
|
|
|
1587
1616
|
if (1 === x) K(n("🔄 %s %s%s %s from %s%s", t || "", e.running ? "" : "!!", kt(e), l.state_name, o && !o.running ? "!!" : "", kt(o)));
|
|
1588
1617
|
else {
|
|
1589
1618
|
let r = "";
|
|
1590
|
-
s.action && (r =
|
|
1619
|
+
s.action && (r = ei(s.action)), K(n("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Dt(e), At(e), l.state_name, "", t || "", "", r, o && !o.running ? "!!" : "", Dt(o), At(o)));
|
|
1591
1620
|
}
|
|
1592
1621
|
r && re(e) && Vo(r) && $o(r);
|
|
1593
1622
|
}
|
|
@@ -1935,23 +1964,23 @@
|
|
|
1935
1964
|
}
|
|
1936
1965
|
}
|
|
1937
1966
|
function ir(e, ...t) {
|
|
1938
|
-
let n = nr(e, ...t), r =
|
|
1967
|
+
let n = nr(e, ...t), r = ql();
|
|
1939
1968
|
Mn && (Mn === Fn.error ? qn("error", n) && rr(Mn, "%c" + r + " ERROR: " + String(n), "color:red") : (qn("error", n) && Fn.error("%c" + r + " ERROR: " + String(n), "color:red"), lr(Mn, `${r} ERROR: ${String(n)}`))), zn("error", n, r);
|
|
1940
1969
|
}
|
|
1941
1970
|
function sr(e, ...t) {
|
|
1942
|
-
let n = nr(e, ...t), r =
|
|
1971
|
+
let n = nr(e, ...t), r = ql();
|
|
1943
1972
|
Gn && (Gn === Fn.warn ? qn("warning", n) && rr(Gn, "%c" + r + " WARNING: " + String(n), "color:yellow") : (qn("warning", n) && Fn.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), lr(Gn, `${r} WARNING: ${String(n)}`))), zn("warning", n, r);
|
|
1944
1973
|
}
|
|
1945
1974
|
function ar(e, ...t) {
|
|
1946
|
-
let n = nr(e, ...t), r =
|
|
1975
|
+
let n = nr(e, ...t), r = ql();
|
|
1947
1976
|
Wn && qn("debug", n) && rr(Wn, "%c" + r + " DEBUG: " + String(n), "color:silver"), zn("debug", n, r);
|
|
1948
1977
|
}
|
|
1949
1978
|
function ur(e, ...t) {
|
|
1950
|
-
let n = nr(e, ...t), r =
|
|
1979
|
+
let n = nr(e, ...t), r = ql();
|
|
1951
1980
|
Wn && qn("msg", n) && rr(Wn, "%c" + r + " MSG: " + String(n), "color:cyan"), zn("msg", n, r);
|
|
1952
1981
|
}
|
|
1953
1982
|
function _r(e, t) {
|
|
1954
|
-
qn("json", t) && (t && rr(Fn.warn, "=====> " + er(t)), rr(Fn.dir, e)), zn("json", e,
|
|
1983
|
+
qn("json", t) && (t && rr(Fn.warn, "=====> " + er(t)), rr(Fn.dir, e)), zn("json", e, ql());
|
|
1955
1984
|
}
|
|
1956
1985
|
function cr(e) {
|
|
1957
1986
|
const t = new Array(128).fill(null);
|
|
@@ -3185,40 +3214,9 @@
|
|
|
3185
3214
|
return null;
|
|
3186
3215
|
}
|
|
3187
3216
|
function Vl(e) {
|
|
3188
|
-
function t(e) {
|
|
3189
|
-
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
3190
|
-
switch (t.length % 4) {
|
|
3191
|
-
case 0: break;
|
|
3192
|
-
case 2:
|
|
3193
|
-
t += "==";
|
|
3194
|
-
break;
|
|
3195
|
-
case 3:
|
|
3196
|
-
t += "=";
|
|
3197
|
-
break;
|
|
3198
|
-
default: throw "Illegal base64url string!";
|
|
3199
|
-
}
|
|
3200
|
-
try {
|
|
3201
|
-
return function(e) {
|
|
3202
|
-
return decodeURIComponent(atob(e).replace(/(.)/g, function(e, t) {
|
|
3203
|
-
let n = t.charCodeAt(0).toString(16).toUpperCase();
|
|
3204
|
-
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
3205
|
-
}));
|
|
3206
|
-
}(t);
|
|
3207
|
-
} catch (e) {
|
|
3208
|
-
return atob(t);
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
let n = e.split(".");
|
|
3212
|
-
return {
|
|
3213
|
-
header: t(n[0]),
|
|
3214
|
-
payload: t(n[1]),
|
|
3215
|
-
signature: t(n[2])
|
|
3216
|
-
};
|
|
3217
|
-
}
|
|
3218
|
-
function Wl(e) {
|
|
3219
3217
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3220
3218
|
}
|
|
3221
|
-
var
|
|
3219
|
+
var Wl = class {
|
|
3222
3220
|
constructor(e) {
|
|
3223
3221
|
this.html = e, Object.freeze(this);
|
|
3224
3222
|
}
|
|
@@ -3226,28 +3224,28 @@
|
|
|
3226
3224
|
return this.html;
|
|
3227
3225
|
}
|
|
3228
3226
|
};
|
|
3229
|
-
function
|
|
3230
|
-
return e instanceof
|
|
3227
|
+
function xl(e) {
|
|
3228
|
+
return e instanceof Wl;
|
|
3231
3229
|
}
|
|
3232
|
-
function
|
|
3230
|
+
function Kl(e) {
|
|
3233
3231
|
const t = document.createElement("template");
|
|
3234
3232
|
return t.innerHTML = e.html.trim(), t.content;
|
|
3235
3233
|
}
|
|
3236
|
-
var
|
|
3237
|
-
function
|
|
3234
|
+
var Bl = !1, Yl = /* @__PURE__ */ new Set();
|
|
3235
|
+
function Jl(e) {
|
|
3238
3236
|
const t = document.createElement("template");
|
|
3239
3237
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
3240
3238
|
}
|
|
3241
|
-
function
|
|
3239
|
+
function ql(e) {
|
|
3242
3240
|
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), o = e.getTimezoneOffset();
|
|
3243
3241
|
return `${n}.${r}${o > 0 ? "-" : "+"}${t(Math.floor(Math.abs(o) / 60), 2)}${t(Math.abs(o) % 60, 2)}`;
|
|
3244
3242
|
}
|
|
3245
|
-
function
|
|
3243
|
+
function Hl(e, t) {
|
|
3246
3244
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
3247
3245
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
3248
3246
|
return -1;
|
|
3249
3247
|
}
|
|
3250
|
-
function
|
|
3248
|
+
function zl() {
|
|
3251
3249
|
const e = "undefined" != typeof window && window.crypto || globalThis.crypto;
|
|
3252
3250
|
if (e && "function" == typeof e.randomUUID) return e.randomUUID();
|
|
3253
3251
|
const t = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -3257,37 +3255,37 @@
|
|
|
3257
3255
|
const n = Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
3258
3256
|
return `${n.slice(0, 8)}-${n.slice(8, 12)}-${n.slice(12, 16)}-${n.slice(16, 20)}-${n.slice(20)}`;
|
|
3259
3257
|
}
|
|
3260
|
-
var
|
|
3261
|
-
function
|
|
3262
|
-
if (
|
|
3258
|
+
var Ql = null, Xl = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
3259
|
+
function Zl() {
|
|
3260
|
+
if (Ql) return Ql;
|
|
3263
3261
|
const e = jl();
|
|
3264
|
-
if (!e) return
|
|
3262
|
+
if (!e) return Ql = zl();
|
|
3265
3263
|
let t = null;
|
|
3266
3264
|
try {
|
|
3267
3265
|
t = e.getItem("host_uuid");
|
|
3268
3266
|
} catch (e) {
|
|
3269
|
-
return Sl("host_uuid", "node_uuid(): localStorage cannot be read (storage blocked?): a uuid of this page only"),
|
|
3267
|
+
return Sl("host_uuid", "node_uuid(): localStorage cannot be read (storage blocked?): a uuid of this page only"), Ql = zl();
|
|
3270
3268
|
}
|
|
3271
|
-
if (t && !
|
|
3272
|
-
t =
|
|
3269
|
+
if (t && !Xl.test(t) && (sr("node_uuid(): the stored host_uuid is not a uuid: a new one replaces it"), t = null), !t) {
|
|
3270
|
+
t = zl();
|
|
3273
3271
|
try {
|
|
3274
3272
|
e.setItem("host_uuid", t);
|
|
3275
3273
|
} catch (e) {
|
|
3276
3274
|
Sl("host_uuid", "node_uuid(): localStorage cannot be written (storage full or blocked?): a uuid of this page only");
|
|
3277
3275
|
}
|
|
3278
3276
|
}
|
|
3279
|
-
return
|
|
3277
|
+
return Ql = t;
|
|
3280
3278
|
}
|
|
3281
|
-
function
|
|
3279
|
+
function ei(e) {
|
|
3282
3280
|
let t = null;
|
|
3283
3281
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
3284
3282
|
}
|
|
3285
|
-
var
|
|
3286
|
-
function
|
|
3283
|
+
var ti = 256, ni = 1e5;
|
|
3284
|
+
function ri(e) {
|
|
3287
3285
|
const t = String(e).replace(/`/g, "``");
|
|
3288
3286
|
return "[" === t[0] ? "[" + t : t;
|
|
3289
3287
|
}
|
|
3290
|
-
function
|
|
3288
|
+
function oi(e) {
|
|
3291
3289
|
if ("string" != typeof e) return null;
|
|
3292
3290
|
let t = [], n = "";
|
|
3293
3291
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -3308,13 +3306,13 @@
|
|
|
3308
3306
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
3309
3307
|
});
|
|
3310
3308
|
}
|
|
3311
|
-
function
|
|
3309
|
+
function li(e, t) {
|
|
3312
3310
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
3313
3311
|
}
|
|
3314
|
-
function
|
|
3312
|
+
function ii(e) {
|
|
3315
3313
|
return "persistent-attrs-" + kt(e);
|
|
3316
3314
|
}
|
|
3317
|
-
function
|
|
3315
|
+
function si(e, t) {
|
|
3318
3316
|
if (Jo(t)) {
|
|
3319
3317
|
if (-1 === t.indexOf("^")) {
|
|
3320
3318
|
let n, r, o = e.fkey;
|
|
@@ -3344,7 +3342,7 @@
|
|
|
3344
3342
|
hook_name: t.hook_name
|
|
3345
3343
|
} : (ir("bad fkey 3"), ir(e), ir(t), null);
|
|
3346
3344
|
}
|
|
3347
|
-
var
|
|
3345
|
+
var ai = [
|
|
3348
3346
|
"string",
|
|
3349
3347
|
"integer",
|
|
3350
3348
|
"object",
|
|
@@ -3354,7 +3352,7 @@
|
|
|
3354
3352
|
"real",
|
|
3355
3353
|
"boolean",
|
|
3356
3354
|
"blob"
|
|
3357
|
-
],
|
|
3355
|
+
], ui = [
|
|
3358
3356
|
"persistent",
|
|
3359
3357
|
"required",
|
|
3360
3358
|
"notnull",
|
|
@@ -3366,7 +3364,7 @@
|
|
|
3366
3364
|
"stats",
|
|
3367
3365
|
"rstats",
|
|
3368
3366
|
"pstats"
|
|
3369
|
-
],
|
|
3367
|
+
], _i = [
|
|
3370
3368
|
"hook",
|
|
3371
3369
|
"fkey",
|
|
3372
3370
|
"enum",
|
|
@@ -3395,7 +3393,7 @@
|
|
|
3395
3393
|
"coordinates",
|
|
3396
3394
|
"gbuffer"
|
|
3397
3395
|
];
|
|
3398
|
-
function
|
|
3396
|
+
function ci(e) {
|
|
3399
3397
|
let t = {
|
|
3400
3398
|
name: e.id,
|
|
3401
3399
|
header: e.header,
|
|
@@ -3414,7 +3412,7 @@
|
|
|
3414
3412
|
if (!e.flag) return t;
|
|
3415
3413
|
for (let n = 0; n < e.flag.length; n++) {
|
|
3416
3414
|
let r = e.flag[n];
|
|
3417
|
-
if (kl(
|
|
3415
|
+
if (kl(_i, r)) {
|
|
3418
3416
|
switch (r) {
|
|
3419
3417
|
case "enum":
|
|
3420
3418
|
t.enum_list = e.enum;
|
|
@@ -3428,7 +3426,7 @@
|
|
|
3428
3426
|
case "file": t.is_file = !0;
|
|
3429
3427
|
}
|
|
3430
3428
|
t.type = r;
|
|
3431
|
-
} else if (kl(
|
|
3429
|
+
} else if (kl(ui, r)) switch (r) {
|
|
3432
3430
|
case "writable":
|
|
3433
3431
|
t.is_writable = !0;
|
|
3434
3432
|
break;
|
|
@@ -3441,23 +3439,23 @@
|
|
|
3441
3439
|
}
|
|
3442
3440
|
return t.is_file && (t.type = "file"), t;
|
|
3443
3441
|
}
|
|
3444
|
-
var
|
|
3442
|
+
var fi = [
|
|
3445
3443
|
k(E.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3446
3444
|
k(E.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3447
3445
|
k(E.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3448
3446
|
D()
|
|
3449
|
-
],
|
|
3447
|
+
], gi = {
|
|
3450
3448
|
periodic: !1,
|
|
3451
3449
|
msec: 0,
|
|
3452
3450
|
timer_id: -1
|
|
3453
|
-
},
|
|
3454
|
-
function
|
|
3451
|
+
}, di = null;
|
|
3452
|
+
function bi(e, t, n, r) {
|
|
3455
3453
|
let o = e.priv, l = o.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3456
3454
|
return o.periodic && o.msec > 0 ? o.timer_id = setTimeout(function() {
|
|
3457
3455
|
jn(e, "EV_TIMEOUT", {}, e);
|
|
3458
3456
|
}, o.msec) : o.timer_id = -1, Ln(e, l, {}), o.periodic || -1 !== o.timer_id || Tt(e) && mt(e), 0;
|
|
3459
3457
|
}
|
|
3460
|
-
var
|
|
3458
|
+
var pi = {
|
|
3461
3459
|
mt_create: function(e) {
|
|
3462
3460
|
let t = e.priv, n = nn(e, "subscriber");
|
|
3463
3461
|
n ? kn(e, null, {}, n) : Lt(e) && (n = It(e), kn(e, null, {}, n)), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
@@ -3481,19 +3479,19 @@
|
|
|
3481
3479
|
},
|
|
3482
3480
|
mt_destroy: function(e) {}
|
|
3483
3481
|
};
|
|
3484
|
-
function
|
|
3482
|
+
function mi(e) {
|
|
3485
3483
|
return "number" == typeof e && Number.isFinite(e) ? Math.round(e) : e;
|
|
3486
3484
|
}
|
|
3487
|
-
function
|
|
3488
|
-
return e instanceof I ? "C_TIMER" !== Dt(e) ? (ir("not C_TIMER GObj"), -1) : (an(e, "periodic", !1), void un(e, "msec",
|
|
3485
|
+
function hi(e, t) {
|
|
3486
|
+
return e instanceof I ? "C_TIMER" !== Dt(e) ? (ir("not C_TIMER GObj"), -1) : (an(e, "periodic", !1), void un(e, "msec", mi(t))) : (ir("not GObj TYPE"), -1);
|
|
3489
3487
|
}
|
|
3490
|
-
function
|
|
3491
|
-
return e instanceof I ? "C_TIMER" !== Dt(e) ? (ir("not C_TIMER GObj"), -1) : (an(e, "periodic", !0), void un(e, "msec",
|
|
3488
|
+
function yi(e, t) {
|
|
3489
|
+
return e instanceof I ? "C_TIMER" !== Dt(e) ? (ir("not C_TIMER GObj"), -1) : (an(e, "periodic", !0), void un(e, "msec", mi(t))) : (ir("not GObj TYPE"), -1);
|
|
3492
3490
|
}
|
|
3493
|
-
function
|
|
3491
|
+
function vi(e) {
|
|
3494
3492
|
return e instanceof I ? "C_TIMER" !== Dt(e) ? (ir("not C_TIMER GObj"), -1) : void un(e, "msec", -1) : (ir("not GObj TYPE"), -1);
|
|
3495
3493
|
}
|
|
3496
|
-
var
|
|
3494
|
+
var Ei = [
|
|
3497
3495
|
k(E.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3498
3496
|
k(E.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3499
3497
|
k(E.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -3513,35 +3511,35 @@
|
|
|
3513
3511
|
k(E.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3514
3512
|
k(E.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3515
3513
|
D()
|
|
3516
|
-
],
|
|
3517
|
-
function
|
|
3514
|
+
], Ti = { gobj_timer: null }, ji = null;
|
|
3515
|
+
function Oi(e, t, n, r) {
|
|
3518
3516
|
let o = Qt(e, t);
|
|
3519
3517
|
return Bo(o) || (o = {}), o[n] = r, rn(e, t, o), it(e, t);
|
|
3520
3518
|
}
|
|
3521
|
-
var
|
|
3522
|
-
function
|
|
3519
|
+
var Si = -2147483648, wi = 2147483647;
|
|
3520
|
+
function Ni(e) {
|
|
3523
3521
|
if (!0 === e || !1 === e) return e;
|
|
3524
|
-
if ("number" == typeof e) return !Number.isInteger(e) || e <
|
|
3522
|
+
if ("number" == typeof e) return !Number.isInteger(e) || e < Si || e > wi ? null : 0 !== e;
|
|
3525
3523
|
if ("string" != typeof e || "" === e) return null;
|
|
3526
3524
|
let t = e.toLowerCase();
|
|
3527
3525
|
if ("set" === t) return !0;
|
|
3528
3526
|
if ("reset" === t) return !1;
|
|
3529
3527
|
if (/^-?(0|[1-9][0-9]*)$/.test(e)) {
|
|
3530
3528
|
let t = Number(e);
|
|
3531
|
-
return t <
|
|
3529
|
+
return t < Si || t > wi ? null : 0 !== t;
|
|
3532
3530
|
}
|
|
3533
3531
|
return "true" === t || "yes" === t || "on" === t || "false" !== t && "no" !== t && "off" !== t && null;
|
|
3534
3532
|
}
|
|
3535
|
-
function
|
|
3533
|
+
function $i() {
|
|
3536
3534
|
return `${$t()}^${Nt()}`;
|
|
3537
3535
|
}
|
|
3538
|
-
function
|
|
3536
|
+
function Ri(e, t, n, r) {
|
|
3539
3537
|
return Ln(e, t, n), 0;
|
|
3540
3538
|
}
|
|
3541
|
-
var
|
|
3539
|
+
var Ai = {
|
|
3542
3540
|
mt_create: function(e) {
|
|
3543
3541
|
let t = e.priv;
|
|
3544
|
-
_n(e, "start_date",
|
|
3542
|
+
_n(e, "start_date", ql()), _n(e, "node_uuid", Zl()), e.priv.gobj_timer = _t(At(e), "C_TIMER", {}, e), t.periodic_timeout = Qt(e, "periodic_timeout"), function(e) {
|
|
3545
3543
|
let t = Qt(e, "trace_levels");
|
|
3546
3544
|
if (!Bo(t)) return 0;
|
|
3547
3545
|
let n = t.__global_trace__;
|
|
@@ -3575,10 +3573,10 @@
|
|
|
3575
3573
|
},
|
|
3576
3574
|
mt_writing: function(e, t) {},
|
|
3577
3575
|
mt_start: function(e) {
|
|
3578
|
-
return
|
|
3576
|
+
return yi(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
3579
3577
|
},
|
|
3580
3578
|
mt_stop: function(e) {
|
|
3581
|
-
return
|
|
3579
|
+
return vi(e.priv.gobj_timer), yt(e), 0;
|
|
3582
3580
|
},
|
|
3583
3581
|
mt_destroy: function(e) {},
|
|
3584
3582
|
mt_play: function(e) {
|
|
@@ -3595,24 +3593,24 @@
|
|
|
3595
3593
|
case "get-global-no-trace": return o(0, 0, null, null, ce());
|
|
3596
3594
|
case "set-global-trace":
|
|
3597
3595
|
case "set-global-no-trace": {
|
|
3598
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
3599
|
-
return l ? null === i ? o(0, -1, `${
|
|
3596
|
+
let r = "set-global-no-trace" === t, l = n.level, i = Ni(n.set);
|
|
3597
|
+
return l ? null === i ? o(0, -1, `${$i()}: bitmask set or re-set?`, null, null) : (r ? se(l, i) : ie(l, i)) < 0 ? o(0, -1, `${$i()}: global trace level not found: ${l}`, null, null) : r ? (Oi(e, "no_trace_levels", "__global_no_trace__", ce()), o(0, 0, null, null, ce())) : (Oi(e, "trace_levels", "__global_trace__", _e()), o(0, 0, null, null, _e())) : o(0, -1, `${$i()}: what level?`, null, null);
|
|
3600
3598
|
}
|
|
3601
3599
|
case "get-gclass-trace":
|
|
3602
3600
|
case "get-gclass-no-trace":
|
|
3603
3601
|
case "set-gclass-trace":
|
|
3604
3602
|
case "set-gclass-no-trace": {
|
|
3605
3603
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = et(l);
|
|
3606
|
-
if (!i) return o(0, -1, `${
|
|
3604
|
+
if (!i) return o(0, -1, `${$i()}: what gclass is '${l}'?`, null, null);
|
|
3607
3605
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? de(i) : fe(i));
|
|
3608
|
-
let s = n.level, a =
|
|
3609
|
-
return s ? null === a ? o(0, -1, `${
|
|
3606
|
+
let s = n.level, a = Ni(n.set);
|
|
3607
|
+
return s ? null === a ? o(0, -1, `${$i()}: bitmask set or re-set?`, null, null) : (r ? pe(i, s, a) : be(i, s, a)) < 0 ? o(0, -1, `${$i()}: trace level of ${l} not found: ${s}`, null, null) : r ? (Oi(e, "no_trace_levels", l, de(i)), o(0, 0, null, null, de(i))) : (Oi(e, "trace_levels", l, ge(i)), o(0, 0, null, null, fe(i))) : o(0, -1, `${$i()}: what level?`, null, null);
|
|
3610
3608
|
}
|
|
3611
|
-
default: return o(0, -1, `${
|
|
3609
|
+
default: return o(0, -1, `${$i()}: command not available: ${t}`, null, null);
|
|
3612
3610
|
}
|
|
3613
3611
|
}
|
|
3614
3612
|
};
|
|
3615
|
-
var
|
|
3613
|
+
var Di = "ievent_gate_stack", ki = [
|
|
3616
3614
|
k(E.DTP_STRING, "wanted_yuno_role", R.SDF_RD, "", "wanted yuno role"),
|
|
3617
3615
|
k(E.DTP_STRING, "wanted_yuno_name", R.SDF_RD, "", "wanted yuno name"),
|
|
3618
3616
|
k(E.DTP_STRING, "wanted_yuno_service", R.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3629,15 +3627,15 @@
|
|
|
3629
3627
|
k(E.DTP_INTEGER, "timeout_idack", R.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3630
3628
|
k(E.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3631
3629
|
D()
|
|
3632
|
-
],
|
|
3630
|
+
], Ci = [
|
|
3633
3631
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3634
3632
|
["ievents2", "Trace inter-events with full kw"],
|
|
3635
3633
|
["identity-card", "Trace identity_card messages"]
|
|
3636
3634
|
];
|
|
3637
|
-
function
|
|
3635
|
+
function Ii(e) {
|
|
3638
3636
|
return !!(3 & X(e));
|
|
3639
3637
|
}
|
|
3640
|
-
var
|
|
3638
|
+
var Pi = {
|
|
3641
3639
|
url: null,
|
|
3642
3640
|
remote_yuno_name: null,
|
|
3643
3641
|
remote_yuno_role: null,
|
|
@@ -3650,8 +3648,8 @@
|
|
|
3650
3648
|
retry_ms_before_session: 0,
|
|
3651
3649
|
session_since: 0,
|
|
3652
3650
|
retry_floor_warned: !1
|
|
3653
|
-
},
|
|
3654
|
-
function
|
|
3651
|
+
}, Li = null;
|
|
3652
|
+
function Ui(e) {
|
|
3655
3653
|
e.priv.websocket && ir("Websocket ALREADY setup");
|
|
3656
3654
|
const t = tn(e, "url");
|
|
3657
3655
|
ar(`====> Starting WebSocket to '${t}' (${kt(e)})`);
|
|
@@ -3666,7 +3664,7 @@
|
|
|
3666
3664
|
code: 1006,
|
|
3667
3665
|
reason: r.message,
|
|
3668
3666
|
was_clean: !1
|
|
3669
|
-
}, e) < 0 &&
|
|
3667
|
+
}, e) < 0 && hi(e.priv.gobj_timer, Zi(e)), null;
|
|
3670
3668
|
}
|
|
3671
3669
|
return r ? (r.onopen = () => {
|
|
3672
3670
|
n !== e.priv.ws_seq || Ut(e) || jn(e, "EV_ON_OPEN", {
|
|
@@ -3688,7 +3686,7 @@
|
|
|
3688
3686
|
}, e));
|
|
3689
3687
|
}, r) : (ir(`${kt(e)}: Failed to initialize WebSocket.`), null);
|
|
3690
3688
|
}
|
|
3691
|
-
function
|
|
3689
|
+
function Fi(e, t = 1e3, n = "") {
|
|
3692
3690
|
let r = e.priv, o = r.websocket;
|
|
3693
3691
|
if (r.websocket = null, o && o.readyState !== WebSocket.CLOSED && o.readyState !== WebSocket.CLOSING) {
|
|
3694
3692
|
ar(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -3699,12 +3697,12 @@
|
|
|
3699
3697
|
}
|
|
3700
3698
|
} else sr("WebSocket is already closed or in the process of closing.");
|
|
3701
3699
|
}
|
|
3702
|
-
function
|
|
3700
|
+
function Mi(e, t) {
|
|
3703
3701
|
let n = e.priv;
|
|
3704
|
-
"ST_SESSION" === fn(e) && (performance.now() - n.session_since <
|
|
3702
|
+
"ST_SESSION" === fn(e) && (performance.now() - n.session_since < Xi(e).max && (n.retry_ms = n.retry_ms_before_session), n.retry_ms_before_session = 0), Fi(e, 4002, t);
|
|
3705
3703
|
}
|
|
3706
|
-
var
|
|
3707
|
-
function
|
|
3704
|
+
var Gi = 128;
|
|
3705
|
+
function Vi(e, t) {
|
|
3708
3706
|
let n = String(e), r = To(n);
|
|
3709
3707
|
if (null !== r && (n = r), n.length > t) {
|
|
3710
3708
|
let e = t, r = n.charCodeAt(e);
|
|
@@ -3712,25 +3710,25 @@
|
|
|
3712
3710
|
}
|
|
3713
3711
|
return n;
|
|
3714
3712
|
}
|
|
3715
|
-
function
|
|
3716
|
-
let r =
|
|
3713
|
+
function Wi(e, t, n) {
|
|
3714
|
+
let r = ql();
|
|
3717
3715
|
try {
|
|
3718
3716
|
ar("\n" + r + " " + t + "\n"), $o(n);
|
|
3719
3717
|
} catch (e) {
|
|
3720
3718
|
ar("ERROR in trace_inter_event: " + e);
|
|
3721
3719
|
}
|
|
3722
3720
|
}
|
|
3723
|
-
var
|
|
3721
|
+
var xi = class {
|
|
3724
3722
|
constructor(e, t) {
|
|
3725
3723
|
this.event = e, this.kw = t || {};
|
|
3726
3724
|
}
|
|
3727
3725
|
};
|
|
3728
|
-
function
|
|
3726
|
+
function Ki(e, t, n, r) {
|
|
3729
3727
|
return function(e, t) {
|
|
3730
3728
|
let n = e.priv, r = JSON.stringify(t);
|
|
3731
|
-
if (
|
|
3729
|
+
if (Ii(e)) {
|
|
3732
3730
|
let n = tn(e, "url"), o = At(wt()) + " ==> " + n, l = Qt(wt(), "trace_ievent_callback");
|
|
3733
|
-
l ? l(o, t, 1, r.length) :
|
|
3731
|
+
l ? l(o, t, 1, r.length) : Wi(0, o, t);
|
|
3734
3732
|
}
|
|
3735
3733
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return sr(`${kt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3736
3734
|
try {
|
|
@@ -3740,10 +3738,10 @@
|
|
|
3740
3738
|
}
|
|
3741
3739
|
return 0;
|
|
3742
3740
|
}(e, function(e, t) {
|
|
3743
|
-
return Zo(e) ? (ir("iev_create() event NULL"), null) : new
|
|
3741
|
+
return Zo(e) ? (ir("iev_create() event NULL"), null) : new xi(e, t);
|
|
3744
3742
|
}(t, n));
|
|
3745
3743
|
}
|
|
3746
|
-
function
|
|
3744
|
+
function Bi(e, t, n) {
|
|
3747
3745
|
return Zo(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3748
3746
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3749
3747
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
@@ -3751,10 +3749,10 @@
|
|
|
3751
3749
|
src_yuno: Nt(),
|
|
3752
3750
|
src_role: $t(),
|
|
3753
3751
|
src_service: t,
|
|
3754
|
-
host:
|
|
3752
|
+
host: Zl()
|
|
3755
3753
|
};
|
|
3756
3754
|
}
|
|
3757
|
-
function
|
|
3755
|
+
function Yi(e) {
|
|
3758
3756
|
let t = e.priv, n = St(wt()), r = tn(wt(), "yuno_version"), o = tn(wt(), "yuno_release"), l = tn(wt(), "yuno_tag"), s = Qt(e, "required_services");
|
|
3759
3757
|
s && s.length || (s = Qt(wt(), "required_services"));
|
|
3760
3758
|
let a = {
|
|
@@ -3772,32 +3770,32 @@
|
|
|
3772
3770
|
username: tn(wt(), "__username__"),
|
|
3773
3771
|
launch_id: 0,
|
|
3774
3772
|
yuno_startdate: tn(wt(), "start_date"),
|
|
3775
|
-
id:
|
|
3773
|
+
id: Zl(),
|
|
3776
3774
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3777
3775
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3778
3776
|
required_services: s
|
|
3779
3777
|
};
|
|
3780
|
-
return Pl(e, a,
|
|
3778
|
+
return Pl(e, a, Di, Bi(e, At(It(e)), null)), Ul(e, a, "__identity__"), hi(t.gobj_timer, en(e, "timeout_idack")), Ki(e, "EV_IDENTITY_CARD", a);
|
|
3781
3779
|
}
|
|
3782
|
-
function
|
|
3780
|
+
function Ji(e, t) {
|
|
3783
3781
|
if (Zo(t.event)) return -1;
|
|
3784
3782
|
let n = {}, r = t.__global__, o = t.__config__, l = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3785
3783
|
o && (n.__config__ = o), r && (n.__global__ = r), l && (n.__filter__ = l);
|
|
3786
|
-
return Pl(e, n,
|
|
3784
|
+
return Pl(e, n, Di, Bi(e, At(s), i)), Ul(e, n, "__subscribing__"), Ki(e, t.event, n);
|
|
3787
3785
|
}
|
|
3788
|
-
function
|
|
3786
|
+
function qi(e, t, n, r) {
|
|
3789
3787
|
let o = e.priv;
|
|
3790
|
-
return Tt(e) && (o.websocket =
|
|
3788
|
+
return Tt(e) && (o.websocket = Ui(e)), 0;
|
|
3791
3789
|
}
|
|
3792
|
-
function
|
|
3793
|
-
return ar("Websocket opened: " + e.priv.url),
|
|
3790
|
+
function Hi(e, t, n, r) {
|
|
3791
|
+
return ar("Websocket opened: " + e.priv.url), Yi(e), 0;
|
|
3794
3792
|
}
|
|
3795
|
-
function
|
|
3793
|
+
function zi(e, t, n, r) {
|
|
3796
3794
|
let o = e.priv, l = n.url;
|
|
3797
3795
|
if (void 0 !== n.ws_seq && n.ws_seq !== o.ws_seq) return 0;
|
|
3798
3796
|
Xn();
|
|
3799
|
-
const i =
|
|
3800
|
-
return
|
|
3797
|
+
const i = Vi(void 0 === n.reason ? "" : n.reason, 256);
|
|
3798
|
+
return Ii(e) && ur(`${kt(e)}: WebSocket closed ${l} (Code: ${n.code}, Reason: "${i}", Clean: ${n.was_clean})`), o.websocket && (o.websocket.onopen = null, o.websocket.onmessage = null, o.websocket.onerror = null, o.websocket.onclose = null, o.websocket = null), o.inform_on_close ? (o.inform_on_close = !1, (!n.was_clean || 1e3 !== n.code && 1001 !== n.code) && Tt(e) && sr(`${kt(e)}: session closed ${l} (Code: ${n.code}, Reason: "${i}", Clean: ${n.was_clean})`), Ln(e, "EV_ON_CLOSE", {
|
|
3801
3799
|
url: l,
|
|
3802
3800
|
remote_yuno_name: o.remote_yuno_name,
|
|
3803
3801
|
remote_yuno_role: o.remote_yuno_role,
|
|
@@ -3813,33 +3811,33 @@
|
|
|
3813
3811
|
code: n.code,
|
|
3814
3812
|
reason: i,
|
|
3815
3813
|
was_clean: n.was_clean
|
|
3816
|
-
})), Tt(e) &&
|
|
3814
|
+
})), Tt(e) && hi(o.gobj_timer, Zi(e)), 0;
|
|
3817
3815
|
}
|
|
3818
|
-
var
|
|
3819
|
-
function
|
|
3816
|
+
var Qi = 1e3;
|
|
3817
|
+
function Xi(e) {
|
|
3820
3818
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3821
|
-
return n >=
|
|
3819
|
+
return n >= Qi || (t.retry_floor_warned || (t.retry_floor_warned = !0, sr(`${kt(e)}: timeout_retry ${n} ms is below ${Qi} ms: ${Qi} ms is used`)), n = Qi), r >= n || (r = n), {
|
|
3822
3820
|
base: n,
|
|
3823
3821
|
max: r
|
|
3824
3822
|
};
|
|
3825
3823
|
}
|
|
3826
|
-
function
|
|
3824
|
+
function Zi(e) {
|
|
3827
3825
|
let t = e.priv;
|
|
3828
|
-
const { base: n, max: r } =
|
|
3826
|
+
const { base: n, max: r } = Xi(e);
|
|
3829
3827
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3830
3828
|
let o = .2 * t.retry_ms, l = t.retry_ms - o + 2 * Math.random() * o;
|
|
3831
3829
|
return Math.max(1, Math.round(l));
|
|
3832
3830
|
}
|
|
3833
|
-
function
|
|
3834
|
-
return
|
|
3831
|
+
function es(e, t, n, r) {
|
|
3832
|
+
return Yi(e), 0;
|
|
3835
3833
|
}
|
|
3836
|
-
function
|
|
3834
|
+
function ts(e, t, n, r) {
|
|
3837
3835
|
let o = e.priv;
|
|
3838
|
-
|
|
3839
|
-
let l = Ll(e, n,
|
|
3836
|
+
vi(o.gobj_timer);
|
|
3837
|
+
let l = Ll(e, n, Di, !0), i = gl(e, l, "src_yuno", ""), s = gl(e, l, "src_role", ""), a = gl(e, l, "src_service", "");
|
|
3840
3838
|
_n(e, "remote_yuno_name", i), _n(e, "remote_yuno_role", s), _n(e, "remote_yuno_service", a);
|
|
3841
3839
|
let u = fl(e, n, "result", -1, 0), _ = gl(e, n, "comment", "", 0), c = gl(e, n, "username", "", 0), f = pl(e, n, "services_roles", {});
|
|
3842
|
-
if (u < 0)
|
|
3840
|
+
if (u < 0) Fi(e), Ln(e, "EV_ON_ID_NAK", {
|
|
3843
3841
|
url: tn(e, "url"),
|
|
3844
3842
|
result: u,
|
|
3845
3843
|
comment: _,
|
|
@@ -3856,11 +3854,11 @@
|
|
|
3856
3854
|
services_roles: f
|
|
3857
3855
|
})), o.inside_on_open = !1, function(e) {
|
|
3858
3856
|
let t = In(e, null, null, null);
|
|
3859
|
-
for (let n = 0; n < t.length; n++)
|
|
3857
|
+
for (let n = 0; n < t.length; n++) Ji(e, t[n]);
|
|
3860
3858
|
}(e);
|
|
3861
3859
|
return 0;
|
|
3862
3860
|
}
|
|
3863
|
-
function
|
|
3861
|
+
function ns(e, t, n, r) {
|
|
3864
3862
|
let o = e.priv.url, l = function(e, t) {
|
|
3865
3863
|
let n;
|
|
3866
3864
|
try {
|
|
@@ -3879,49 +3877,49 @@
|
|
|
3879
3877
|
kw: o || {}
|
|
3880
3878
|
} : (sr(`${kt(e)}: parsing inter_event: kw not a json object`), null) : (sr(`${kt(e)}: parsing inter_kw: no kw`), null);
|
|
3881
3879
|
}(e, n.data);
|
|
3882
|
-
if (!l) return sr(`${kt(e)}: frame dropped from ${o}: ${
|
|
3883
|
-
if (
|
|
3880
|
+
if (!l) return sr(`${kt(e)}: frame dropped from ${o}: ${Vi(n.data, 256)}`), -1;
|
|
3881
|
+
if (Ii(e)) {
|
|
3884
3882
|
let e = At(wt()) + " <== " + o, t = n.data.length, r = Qt(wt(), "trace_ievent_callback");
|
|
3885
|
-
r ? r(e, l, 2, t) :
|
|
3883
|
+
r ? r(e, l, 2, t) : Wi(0, e, l);
|
|
3886
3884
|
}
|
|
3887
3885
|
let i = l.event, s = l.kw;
|
|
3888
3886
|
if ("ST_SESSION" !== fn(e)) {
|
|
3889
3887
|
if ("ev_identity_card_ack" === String(i).toLowerCase()) {
|
|
3890
3888
|
if (!(jn(e, "EV_IDENTITY_CARD_ACK", s, e) < 0)) return 0;
|
|
3891
|
-
} else sr(`${kt(e)}: event UNKNOWN in not-session state ${
|
|
3892
|
-
return
|
|
3889
|
+
} else sr(`${kt(e)}: event UNKNOWN in not-session state ${Vi(i, Gi)}`);
|
|
3890
|
+
return Mi(e, "event out of session"), -1;
|
|
3893
3891
|
}
|
|
3894
3892
|
l = null;
|
|
3895
|
-
let a = Fl(e, s), u = Ll(e, s,
|
|
3896
|
-
if (!Zo(_) && _.toLowerCase() !== String($t()).toLowerCase()) return sr(`${kt(e)}: It's not my role, dst_role: ${
|
|
3893
|
+
let a = Fl(e, s), u = Ll(e, s, Di), _ = gl(e, u, "dst_role", "");
|
|
3894
|
+
if (!Zo(_) && _.toLowerCase() !== String($t()).toLowerCase()) return sr(`${kt(e)}: It's not my role, dst_role: ${Vi(_, Gi)}, my_role: ${$t()}, event: ${Vi(i, Gi)}`), Mi(e, "not my role"), -1;
|
|
3897
3895
|
let c = gl(e, u, "dst_yuno", "");
|
|
3898
|
-
if (!Zo(c) && c.toLowerCase() !== String(Nt()).toLowerCase()) return sr(`${kt(e)}: It's not my name, dst_yuno: ${
|
|
3896
|
+
if (!Zo(c) && c.toLowerCase() !== String(Nt()).toLowerCase()) return sr(`${kt(e)}: It's not my name, dst_yuno: ${Vi(c, Gi)}, my_name: ${Nt()}, event: ${Vi(i, Gi)}`), Mi(e, "not my name"), -1;
|
|
3899
3897
|
let f = gl(e, u, "dst_service", "");
|
|
3900
|
-
if ("__subscribing__" === a) return sr(`${kt(e)}: subscription event ignored, I'm client (service: ${
|
|
3901
|
-
if ("__unsubscribing__" === a) return sr(`${kt(e)}: unsubscription event ignored, I'm client (service: ${
|
|
3898
|
+
if ("__subscribing__" === a) return sr(`${kt(e)}: subscription event ignored, I'm client (service: ${Vi(f, Gi)}, event: ${Vi(i, Gi)})`), -1;
|
|
3899
|
+
if ("__unsubscribing__" === a) return sr(`${kt(e)}: unsubscription event ignored, I'm client (service: ${Vi(f, Gi)}, event: ${Vi(i, Gi)})`), -1;
|
|
3902
3900
|
const g = Sn(i, 0, !1);
|
|
3903
3901
|
if (g && dn(e, g.event_name, 0)) {
|
|
3904
3902
|
const t = g.event_name;
|
|
3905
|
-
return dn(e, t, F.EVF_PUBLIC_EVENT) && "EV_IDENTITY_CARD_ACK" !== t ? (jn(e, t, s, e), 0) : (sr(`${kt(e)}: event of the transport itself, or out of its place, DROPPED: ev '${
|
|
3903
|
+
return dn(e, t, F.EVF_PUBLIC_EVENT) && "EV_IDENTITY_CARD_ACK" !== t ? (jn(e, t, s, e), 0) : (sr(`${kt(e)}: event of the transport itself, or out of its place, DROPPED: ev '${Vi(i, Gi)}'`), -1);
|
|
3906
3904
|
}
|
|
3907
3905
|
if (!Zo(f)) {
|
|
3908
3906
|
let t = nt(f, !1);
|
|
3909
|
-
return t ? dn(t, i, F.EVF_PUBLIC_EVENT) ? (jn(t, i, s, e), 0) : (sr(`${kt(e)}: Service found but no event or not public, DROPPED: service '${kt(t)}', ev '${
|
|
3907
|
+
return t ? dn(t, i, F.EVF_PUBLIC_EVENT) ? (jn(t, i, s, e), 0) : (sr(`${kt(e)}: Service found but no event or not public, DROPPED: service '${kt(t)}', ev '${Vi(i, Gi)}'`), -1) : (sr(`${kt(e)}: event for a service that is gone, DROPPED: service '${Vi(f, Gi)}', ev '${Vi(i, Gi)}'`), 0);
|
|
3910
3908
|
}
|
|
3911
3909
|
let d = Sn(i, F.EVF_PUBLIC_EVENT, !1);
|
|
3912
|
-
return d ? (Ln(e, d.event_name, s), 0) : (sr(`${kt(e)}: event that no gclass declares public, DROPPED: ev '${
|
|
3910
|
+
return d ? (Ln(e, d.event_name, s), 0) : (sr(`${kt(e)}: event that no gclass declares public, DROPPED: ev '${Vi(i, Gi)}'`), -1);
|
|
3913
3911
|
}
|
|
3914
|
-
function
|
|
3912
|
+
function rs(e, t, n, r) {
|
|
3915
3913
|
const o = n && "string" == typeof n[r] ? n[r] : "", l = n && "string" == typeof n.service ? n.service : "";
|
|
3916
|
-
return sr(`${kt(e)}: ${t} not served by this client, DROPPED: ${r.replace(/_/g, "")} '${
|
|
3914
|
+
return sr(`${kt(e)}: ${t} not served by this client, DROPPED: ${r.replace(/_/g, "")} '${Vi(o, Gi)}', service '${Vi(l, Gi)}'`), -1;
|
|
3917
3915
|
}
|
|
3918
|
-
function
|
|
3919
|
-
return
|
|
3916
|
+
function os(e, t, n, r) {
|
|
3917
|
+
return rs(e, t, n, "__stats__");
|
|
3920
3918
|
}
|
|
3921
|
-
function
|
|
3922
|
-
return
|
|
3919
|
+
function ls(e, t, n, r) {
|
|
3920
|
+
return rs(e, t, n, "__command__");
|
|
3923
3921
|
}
|
|
3924
|
-
var
|
|
3922
|
+
var is = {
|
|
3925
3923
|
mt_create: function(e) {
|
|
3926
3924
|
let t = e.priv;
|
|
3927
3925
|
t.gobj_timer = _t(At(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"), _n(e, "wanted_yuno_name", t.remote_yuno_name), _n(e, "wanted_yuno_role", t.remote_yuno_role), _n(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -3951,43 +3949,43 @@
|
|
|
3951
3949
|
code: 1e3,
|
|
3952
3950
|
reason: "restarted",
|
|
3953
3951
|
was_clean: !0
|
|
3954
|
-
}, e),
|
|
3952
|
+
}, e), vi(t.gobj_timer)), t.websocket = Ui(e), 0;
|
|
3955
3953
|
},
|
|
3956
3954
|
mt_stop: function(e) {
|
|
3957
3955
|
let t = e.priv;
|
|
3958
|
-
return
|
|
3956
|
+
return vi(t.gobj_timer), t.websocket && Fi(e), 0;
|
|
3959
3957
|
},
|
|
3960
3958
|
mt_destroy: function(e) {},
|
|
3961
3959
|
mt_stats: function(e, t, n, r) {
|
|
3962
3960
|
if ("ST_SESSION" !== fn(e)) return ir("Not in session"), null;
|
|
3963
3961
|
n || (n = {});
|
|
3964
|
-
let o =
|
|
3962
|
+
let o = Bi(e, At(r), gl(e, n, "service", null, 0)), l = pl(e, n, "__md_stats__", null, Un.KW_EXTRACT);
|
|
3965
3963
|
return l || (l = {}), Pl(e, n, "stats_stack", {
|
|
3966
3964
|
stats: t,
|
|
3967
3965
|
kw: l
|
|
3968
|
-
}), Pl(e, n,
|
|
3966
|
+
}), Pl(e, n, Di, o), n.__stats__ = t, Ul(e, n, "__stats__"), Ki(e, "EV_MT_STATS", n, r), null;
|
|
3969
3967
|
},
|
|
3970
3968
|
mt_command_parser: function(e, t, n, r) {
|
|
3971
3969
|
if ("ST_SESSION" !== fn(e)) return ir("Not in session"), null;
|
|
3972
3970
|
n || (n = {});
|
|
3973
|
-
let o =
|
|
3971
|
+
let o = Bi(e, At(r), gl(e, n, "service", "", 0)), l = pl(e, n, "__md_command__", null, Un.KW_EXTRACT);
|
|
3974
3972
|
return l || (l = {}), Pl(e, n, "command_stack", {
|
|
3975
3973
|
command: t,
|
|
3976
3974
|
kw: l
|
|
3977
|
-
}), Pl(e, n,
|
|
3975
|
+
}), Pl(e, n, Di, o), n.__command__ = t, Ul(e, n, "__command__"), Ki(e, "EV_MT_COMMAND", n, r), null;
|
|
3978
3976
|
},
|
|
3979
3977
|
mt_inject_event: function(e, t, n, r) {
|
|
3980
3978
|
if ("ST_SESSION" !== fn(e)) return window.console.error("Not in session"), -1;
|
|
3981
|
-
if (n = Do({}, Bo(n) ? n : {}), Bo(n.__md_iev__) && (n.__md_iev__ = Ro(n.__md_iev__)), Ll(e, n,
|
|
3979
|
+
if (n = Do({}, Bo(n) ? n : {}), Bo(n.__md_iev__) && (n.__md_iev__ = Ro(n.__md_iev__)), Ll(e, n, Di));
|
|
3982
3980
|
else {
|
|
3983
|
-
let o =
|
|
3984
|
-
Po(n, "__service__"), Pl(e, n, "__message__", t), Pl(e, n,
|
|
3981
|
+
let o = Bi(e, At(r), gl(e, n, "__service__", 0, 0));
|
|
3982
|
+
Po(n, "__service__"), Pl(e, n, "__message__", t), Pl(e, n, Di, o);
|
|
3985
3983
|
}
|
|
3986
|
-
return Ul(e, n, "__message__"),
|
|
3984
|
+
return Ul(e, n, "__message__"), Ki(e, t, n, r);
|
|
3987
3985
|
},
|
|
3988
3986
|
mt_subscription_added: function(e, t) {
|
|
3989
3987
|
let n = e.priv;
|
|
3990
|
-
return "ST_SESSION" === fn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3988
|
+
return "ST_SESSION" === fn(e) && n.websocket ? n.inside_on_open ? 0 : Ji(e, t) : 0;
|
|
3991
3989
|
},
|
|
3992
3990
|
mt_subscription_deleted: function(e, t) {
|
|
3993
3991
|
let n = e.priv;
|
|
@@ -3996,7 +3994,7 @@
|
|
|
3996
3994
|
if (Zo(t.event)) return 0;
|
|
3997
3995
|
let r = {}, o = t.__global__, l = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3998
3996
|
l && (r.__config__ = l), o && (r.__global__ = o), i && (r.__filter__ = i);
|
|
3999
|
-
return Pl(e, r,
|
|
3997
|
+
return Pl(e, r, Di, Bi(e, At(a), s)), Ul(e, r, "__unsubscribing__"), Ki(e, t.event, r, e);
|
|
4000
3998
|
}
|
|
4001
3999
|
};
|
|
4002
4000
|
e.GObj = I, e.SDATA = k, e.SDATAAUTHZ = (e, t, n, r, o, l) => new A(e, t, n, null, l, r, null, 0, null, o, null), e.SDATACM = (e, t, n, r, o, l) => new A(e, t, 0, null, l, n, null, 0, o, r, null), e.SDATACM2 = (e, t, n, r, o, l, i) => new A(e, t, n, null, i, r, null, 0, l, o, null), e.SDATADF = (e, t, n, r, o, l) => new A(e, t, n, null, l, null, r, o), e.SDATAPM = (e, t, n, r, o) => new A(e, t, n, r, o), e.SDATAPM0 = (e, t, n, r, o) => new A(e, t, n, null, o, null, null, 0, null, null, r), e.SDATA_END = D, e.SDataDesc = A, e.YUNETA_VERSION = i, Object.defineProperty(e, "__yuno__", {
|
|
@@ -4010,7 +4008,7 @@
|
|
|
4010
4008
|
return t;
|
|
4011
4009
|
}, e.build_stats_response = l, e.clean_name = function(e) {
|
|
4012
4010
|
return e.replace(/[?# ^:]/g, "_");
|
|
4013
|
-
}, e.clear_timeout =
|
|
4011
|
+
}, e.clear_timeout = vi, e.cmp_two_simple_json = rl, e.command_parameter_from_json = ke, e.command_parameter_from_text = function(e, t) {
|
|
4014
4012
|
const n = De(e, t, !1);
|
|
4015
4013
|
return void 0 !== n.value || n.refused || (n.refused = je), n;
|
|
4016
4014
|
}, e.command_parser = function(e, t, n, r) {}, e.createElement2 = function e(t, n) {
|
|
@@ -4022,21 +4020,21 @@
|
|
|
4022
4020
|
for (const n of Object.keys(o[e])) t += `${n}: ${o[e][n]};`;
|
|
4023
4021
|
s.style.cssText = t;
|
|
4024
4022
|
} else "style" === e ? s.style.cssText = o[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== o[e] && void 0 !== o[e] && (a = o[e], s.setAttribute("data-i18n", a)) : s.setAttribute(e, o[e]);
|
|
4025
|
-
if (
|
|
4026
|
-
else if (Jo(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !
|
|
4023
|
+
if (xl(l)) s.appendChild(Kl(l));
|
|
4024
|
+
else if (Jo(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !Bl) s.appendChild(Jl(l));
|
|
4027
4025
|
else if (l.length > 0 && "<" === l[0] && function(e) {
|
|
4028
|
-
if (
|
|
4026
|
+
if (Yl.size >= 100) return;
|
|
4029
4027
|
const t = e.slice(0, 80);
|
|
4030
|
-
|
|
4028
|
+
Yl.has(t) || (Yl.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)}`));
|
|
4031
4029
|
}(l), n && a) s.textContent = n(a) || l;
|
|
4032
4030
|
else s.textContent = l;
|
|
4033
4031
|
else if (Yo(l)) {
|
|
4034
4032
|
if (l.length > 0) if (Jo(l[0])) s.appendChild(e(l, n));
|
|
4035
|
-
else for (let t of l) Array.isArray(t) ? t.length > 0 && s.appendChild(e(t, n)) : t instanceof Node ? s.appendChild(t) :
|
|
4033
|
+
else for (let t of l) Array.isArray(t) ? t.length > 0 && s.appendChild(e(t, n)) : t instanceof Node ? s.appendChild(t) : xl(t) ? s.appendChild(Kl(t)) : Jo(t) ? s.appendChild(document.createTextNode(t)) : null != t && !1 !== t && ir("createElement2: child ignored, type " + typeof t);
|
|
4036
4034
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? s.appendChild(l) : null != l && (ir("content ignored"), _r(l));
|
|
4037
4035
|
if (i && "object" == typeof i) for (const e of Object.keys(i)) s.addEventListener(e, i[e]);
|
|
4038
4036
|
return s;
|
|
4039
|
-
}, e.createOneHtml =
|
|
4037
|
+
}, e.createOneHtml = Jl, e.create_json_record = function(e, t) {
|
|
4040
4038
|
let n = Ro(e);
|
|
4041
4039
|
return ko(n, t), n;
|
|
4042
4040
|
}, e.create_template_record = function(e, t) {
|
|
@@ -4047,21 +4045,21 @@
|
|
|
4047
4045
|
let l = pl(null, t, e, o);
|
|
4048
4046
|
Lo(n, e, l);
|
|
4049
4047
|
}), n;
|
|
4050
|
-
}, e.current_timestamp =
|
|
4051
|
-
let n = wl(
|
|
4048
|
+
}, e.current_timestamp = ql, e.data_type_t = E, e.db_list_persistent_attrs = function(e, t) {
|
|
4049
|
+
let n = wl(ii(e), null, !1), r = {};
|
|
4052
4050
|
return n && Bo(n) && (r = El(e, n, t, !1)), r;
|
|
4053
4051
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
4054
|
-
let n = Xt(e, R.SDF_PERSIST), r = wl(
|
|
4052
|
+
let n = Xt(e, R.SDF_PERSIST), r = wl(ii(e), null, !1);
|
|
4055
4053
|
if (r && Bo(r)) {
|
|
4056
4054
|
let o = El(e, r, t, !1);
|
|
4057
4055
|
o = El(e, o, n, !1), sn(e, o, R.SDF_PERSIST);
|
|
4058
4056
|
}
|
|
4059
4057
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
4060
|
-
let n = Tl(e, wl(
|
|
4061
|
-
0 === Vo(n) ? $l(
|
|
4058
|
+
let n = Tl(e, wl(ii(e), null, !1), t, !1);
|
|
4059
|
+
0 === Vo(n) ? $l(ii(e)) : Nl(ii(e), n);
|
|
4062
4060
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
4063
|
-
let n = El(e, Xt(e, R.SDF_PERSIST), t, !1), r = wl(
|
|
4064
|
-
return r && Bo(r) && Co(n, r), Nl(
|
|
4061
|
+
let n = El(e, Xt(e, R.SDF_PERSIST), t, !1), r = wl(ii(e), null, !1);
|
|
4062
|
+
return r && Bo(r) && Co(n, r), Nl(ii(e), n);
|
|
4065
4063
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
4066
4064
|
let r = null, o = null, l = null;
|
|
4067
4065
|
const i = (...i) => {
|
|
@@ -4083,20 +4081,20 @@
|
|
|
4083
4081
|
const t = {};
|
|
4084
4082
|
for (const n of e) Do(t, structuredClone(n));
|
|
4085
4083
|
return t;
|
|
4086
|
-
}, e.empty_json = Ko, e.empty_string = Zo, e.escapeHtml =
|
|
4084
|
+
}, e.empty_json = Ko, e.empty_string = Zo, e.escapeHtml = Vl, e.event_flag_t = F, e.flat2json = function(e) {
|
|
4087
4085
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
4088
4086
|
let t = null;
|
|
4089
4087
|
for (const n of Object.keys(e)) {
|
|
4090
|
-
const r =
|
|
4088
|
+
const r = oi(n);
|
|
4091
4089
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
4092
|
-
if (r.length >
|
|
4090
|
+
if (r.length > ti) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
4093
4091
|
const o = "number" == typeof r[0];
|
|
4094
4092
|
if (null === t) t = o ? [] : {};
|
|
4095
4093
|
else if (o !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
4096
4094
|
let l = t;
|
|
4097
4095
|
for (let t = 0; t < r.length; t++) {
|
|
4098
4096
|
const o = r[t], i = "number" == typeof o, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
4099
|
-
if (i && o >
|
|
4097
|
+
if (i && o > ni) throw new Error(`flat2json: array index ${o} over the limit (100000) in '${n}'`);
|
|
4100
4098
|
if (i !== Array.isArray(l)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(l) ? "array" : "object"}`);
|
|
4101
4099
|
if (s) {
|
|
4102
4100
|
if (Array.isArray(l)) {
|
|
@@ -4136,15 +4134,15 @@
|
|
|
4136
4134
|
removed: {},
|
|
4137
4135
|
changed: {}
|
|
4138
4136
|
};
|
|
4139
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
4137
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? li(n[e], r[e]) || sl(o.changed, e, {
|
|
4140
4138
|
from: n[e],
|
|
4141
4139
|
to: r[e]
|
|
4142
4140
|
}) : sl(o.removed, e, n[e]);
|
|
4143
4141
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || sl(o.added, e, r[e]);
|
|
4144
4142
|
return o;
|
|
4145
4143
|
}, e.flat_key_join = function(e) {
|
|
4146
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
4147
|
-
}, e.flat_key_split =
|
|
4144
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : ri(e)).join("`") : "";
|
|
4145
|
+
}, e.flat_key_split = oi, e.gclass_add_ev_action = He, e.gclass_add_event_type = Qe, e.gclass_add_state = qe, e.gclass_check_fsm = Ze, e.gclass_create = Ke, e.gclass_event_type = Xe, e.gclass_find_by_name = et, e.gclass_flag_t = P, e.gclass_unregister = Be, e.getPositionRelativeToBody = function(e) {
|
|
4148
4146
|
if (!e) return {
|
|
4149
4147
|
top: 0,
|
|
4150
4148
|
left: 0,
|
|
@@ -4163,7 +4161,7 @@
|
|
|
4163
4161
|
right: n + s + r,
|
|
4164
4162
|
bottom: t + i + o
|
|
4165
4163
|
};
|
|
4166
|
-
}, e.get_function_name =
|
|
4164
|
+
}, e.get_function_name = ei, e.get_now = function() {
|
|
4167
4165
|
return Math.floor(Date.now() / 1e3);
|
|
4168
4166
|
}, e.gobj_bottom_gobj = Ft, e.gobj_change_parent = function(e, t) {
|
|
4169
4167
|
if (Ut(e)) return ir("gobj NULL or DESTROYED"), -1;
|
|
@@ -4315,10 +4313,10 @@
|
|
|
4315
4313
|
}
|
|
4316
4314
|
return a ? sr(`${kt(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${a})`) : s || u || (sr(`${kt(e)}: No subscription found`), $o(n, "No subscription found")), 0;
|
|
4317
4315
|
}, e.gobj_unsubscribe_list = Cn, e.gobj_walk_gobj_children = Vt, e.gobj_walk_gobj_children_tree = Wt, e.gobj_write_attr = rn, e.gobj_write_attrs = sn, e.gobj_write_bool_attr = an, e.gobj_write_integer_attr = un, e.gobj_write_str_attr = _n, e.gobj_yuno = wt, e.gobj_yuno_id = Rt, e.gobj_yuno_name = Nt, e.gobj_yuno_role = $t, e.html_markup = function(e) {
|
|
4318
|
-
return "string" != typeof e ? (ir("html_markup: not a string, type " + typeof e), new
|
|
4319
|
-
}, e.id_index_in_obj_list = Dl, e.index_in_list =
|
|
4316
|
+
return "string" != typeof e ? (ir("html_markup: not a string, type " + typeof e), new Wl("")) : new Wl(e);
|
|
4317
|
+
}, e.id_index_in_obj_list = Dl, e.index_in_list = Hl, e.is_array = Yo, e.is_boolean = Ho, e.is_date = function(e) {
|
|
4320
4318
|
return e instanceof Date && !isNaN(e);
|
|
4321
|
-
}, e.is_function = Qo, e.is_gobj = Xo, e.is_html_markup =
|
|
4319
|
+
}, e.is_function = Qo, e.is_gobj = Xo, e.is_html_markup = xl, e.is_metadata_key = function(e) {
|
|
4322
4320
|
if (!Jo(e)) return !1;
|
|
4323
4321
|
let t = 0;
|
|
4324
4322
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -4383,7 +4381,7 @@
|
|
|
4383
4381
|
return u ? Do(u, r) : i.push(r), o;
|
|
4384
4382
|
}, e.json2flat = function(e) {
|
|
4385
4383
|
const t = {}, n = (e, r, o) => {
|
|
4386
|
-
if (o >
|
|
4384
|
+
if (o > ti) throw new Error("json2flat: deeper than 256");
|
|
4387
4385
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
4388
4386
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
4389
4387
|
const l = `[${t}]`;
|
|
@@ -4393,7 +4391,7 @@
|
|
|
4393
4391
|
const t = Object.keys(e);
|
|
4394
4392
|
if (t.length > 0) {
|
|
4395
4393
|
for (const l of t) {
|
|
4396
|
-
const t =
|
|
4394
|
+
const t = ri(l);
|
|
4397
4395
|
n(e[l], 0 === o ? t : r + "`" + t, o + 1);
|
|
4398
4396
|
}
|
|
4399
4397
|
return;
|
|
@@ -4404,18 +4402,7 @@
|
|
|
4404
4402
|
return null == e || n(e, "", 0), t;
|
|
4405
4403
|
}, e.json_array_append = Fo, e.json_array_append_new = Mo, e.json_array_extend = function(e, t) {
|
|
4406
4404
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
4407
|
-
}, e.json_array_remove = Go, e.json_array_size = Wo, e.json_deep_copy = Ro, e.json_is_identical = Ao, e.json_mask_secrets = No, e.json_object_del = Po, e.json_object_get = Io, e.json_object_set = Lo, e.json_object_set_new = Uo, e.json_object_size = Vo, e.json_object_update = Do, e.json_object_update_existing = ko, e.json_object_update_missing = Co, e.json_size = xo, e.json_text_of = Fe, e.
|
|
4408
|
-
try {
|
|
4409
|
-
let n = Vl(e);
|
|
4410
|
-
switch (t) {
|
|
4411
|
-
case "header": return JSON.parse(n.header);
|
|
4412
|
-
case "signature": return JSON.parse(n.signature);
|
|
4413
|
-
default: return JSON.parse(n.payload);
|
|
4414
|
-
}
|
|
4415
|
-
} catch (e) {
|
|
4416
|
-
return null;
|
|
4417
|
-
}
|
|
4418
|
-
}, e.jwtDecode = Vl, e.kw_clone_by_keys = El, e.kw_clone_by_not_keys = Tl, e.kw_collect = function(e, t, n, r) {
|
|
4405
|
+
}, e.json_array_remove = Go, e.json_array_size = Wo, e.json_deep_copy = Ro, e.json_is_identical = Ao, e.json_mask_secrets = No, e.json_object_del = Po, e.json_object_get = Io, e.json_object_set = Lo, e.json_object_set_new = Uo, e.json_object_size = Vo, e.json_object_update = Do, e.json_object_update_existing = ko, e.json_object_update_missing = Co, e.json_size = xo, e.json_text_of = Fe, e.kw_clone_by_keys = El, e.kw_clone_by_not_keys = Tl, e.kw_collect = function(e, t, n, r) {
|
|
4419
4406
|
if (e && !Xo(e) && ir("GObj bad instanceof"), !t) return null;
|
|
4420
4407
|
r || (r = vl);
|
|
4421
4408
|
let o = [];
|
|
@@ -4559,9 +4546,9 @@
|
|
|
4559
4546
|
var e;
|
|
4560
4547
|
}, r.send();
|
|
4561
4548
|
}, e.log_debug = ar, e.log_error = ir, e.log_info = function(e, ...t) {
|
|
4562
|
-
let n = nr(e, ...t), r =
|
|
4549
|
+
let n = nr(e, ...t), r = ql();
|
|
4563
4550
|
Vn && qn("info", n) && rr(Vn, "%c" + r + " INFO: " + String(n), "color:cyan"), zn("info", n, r);
|
|
4564
|
-
}, e.log_warning = sr, e.mask_secrets_inline = To, e.msg_iev_get_msg_type = Fl, e.msg_iev_get_stack = Ll, e.msg_iev_push_stack = Pl, e.msg_iev_read_key = Cl, e.msg_iev_set_msg_type = Ul, e.msg_iev_write_key = Il, e.node_uuid =
|
|
4551
|
+
}, e.log_warning = sr, e.mask_secrets_inline = To, e.msg_iev_get_msg_type = Fl, e.msg_iev_get_stack = Ll, e.msg_iev_push_stack = Pl, e.msg_iev_read_key = Cl, e.msg_iev_set_msg_type = Ul, e.msg_iev_write_key = Il, e.node_uuid = Zl, e.parseBoolean = el, e.parseSVG = function(e) {
|
|
4565
4552
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
4566
4553
|
}, e.refresh_language = function(e, t) {
|
|
4567
4554
|
if (!Qo(t)) return void ir("You must supply a translation function");
|
|
@@ -4588,22 +4575,22 @@
|
|
|
4588
4575
|
});
|
|
4589
4576
|
}, e.register_c_ievent_cli = function() {
|
|
4590
4577
|
return function(e) {
|
|
4591
|
-
if (
|
|
4578
|
+
if (Li) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
4592
4579
|
const t = [
|
|
4593
4580
|
["ST_DISCONNECTED", [
|
|
4594
4581
|
[
|
|
4595
4582
|
"EV_ON_OPEN",
|
|
4596
|
-
|
|
4583
|
+
Hi,
|
|
4597
4584
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
4598
4585
|
],
|
|
4599
4586
|
[
|
|
4600
4587
|
"EV_ON_CLOSE",
|
|
4601
|
-
|
|
4588
|
+
zi,
|
|
4602
4589
|
null
|
|
4603
4590
|
],
|
|
4604
4591
|
[
|
|
4605
4592
|
"EV_TIMEOUT",
|
|
4606
|
-
|
|
4593
|
+
qi,
|
|
4607
4594
|
null
|
|
4608
4595
|
],
|
|
4609
4596
|
[
|
|
@@ -4615,22 +4602,22 @@
|
|
|
4615
4602
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
4616
4603
|
[
|
|
4617
4604
|
"EV_ON_MESSAGE",
|
|
4618
|
-
|
|
4605
|
+
ns,
|
|
4619
4606
|
null
|
|
4620
4607
|
],
|
|
4621
4608
|
[
|
|
4622
4609
|
"EV_IDENTITY_CARD_ACK",
|
|
4623
|
-
|
|
4610
|
+
ts,
|
|
4624
4611
|
null
|
|
4625
4612
|
],
|
|
4626
4613
|
[
|
|
4627
4614
|
"EV_ON_CLOSE",
|
|
4628
|
-
|
|
4615
|
+
zi,
|
|
4629
4616
|
"ST_DISCONNECTED"
|
|
4630
4617
|
],
|
|
4631
4618
|
[
|
|
4632
4619
|
"EV_TIMEOUT",
|
|
4633
|
-
|
|
4620
|
+
es,
|
|
4634
4621
|
null
|
|
4635
4622
|
],
|
|
4636
4623
|
[
|
|
@@ -4642,22 +4629,22 @@
|
|
|
4642
4629
|
["ST_SESSION", [
|
|
4643
4630
|
[
|
|
4644
4631
|
"EV_ON_MESSAGE",
|
|
4645
|
-
|
|
4632
|
+
ns,
|
|
4646
4633
|
null
|
|
4647
4634
|
],
|
|
4648
4635
|
[
|
|
4649
4636
|
"EV_MT_STATS",
|
|
4650
|
-
|
|
4637
|
+
os,
|
|
4651
4638
|
null
|
|
4652
4639
|
],
|
|
4653
4640
|
[
|
|
4654
4641
|
"EV_MT_COMMAND",
|
|
4655
|
-
|
|
4642
|
+
ls,
|
|
4656
4643
|
null
|
|
4657
4644
|
],
|
|
4658
4645
|
[
|
|
4659
4646
|
"EV_ON_CLOSE",
|
|
4660
|
-
|
|
4647
|
+
zi,
|
|
4661
4648
|
"ST_DISCONNECTED"
|
|
4662
4649
|
],
|
|
4663
4650
|
[
|
|
@@ -4668,7 +4655,7 @@
|
|
|
4668
4655
|
]],
|
|
4669
4656
|
[null, null]
|
|
4670
4657
|
];
|
|
4671
|
-
return (
|
|
4658
|
+
return (Li = Ke(e, [
|
|
4672
4659
|
["EV_ON_MESSAGE", F.EVF_OUTPUT_EVENT],
|
|
4673
4660
|
["EV_IDENTITY_CARD_ACK", F.EVF_PUBLIC_EVENT],
|
|
4674
4661
|
["EV_ON_ID_NAK", F.EVF_OUTPUT_EVENT],
|
|
@@ -4679,36 +4666,36 @@
|
|
|
4679
4666
|
["EV_ON_OPEN_ERROR", F.EVF_OUTPUT_EVENT | F.EVF_NO_WARN_SUBS],
|
|
4680
4667
|
["EV_TIMEOUT", 0],
|
|
4681
4668
|
[null, 0]
|
|
4682
|
-
], t,
|
|
4669
|
+
], t, is, 0, ki, Pi, 0, 0, Ci, P.gcflag_no_check_output_events)) ? 0 : -1;
|
|
4683
4670
|
}("C_IEVENT_CLI");
|
|
4684
4671
|
}, e.register_c_timer = function() {
|
|
4685
4672
|
return function(e) {
|
|
4686
|
-
if (
|
|
4673
|
+
if (di) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
4687
4674
|
const t = [["ST_IDLE", [[
|
|
4688
4675
|
"EV_TIMEOUT",
|
|
4689
|
-
|
|
4676
|
+
bi,
|
|
4690
4677
|
null
|
|
4691
4678
|
]]]];
|
|
4692
|
-
return (
|
|
4679
|
+
return (di = Ke(e, [
|
|
4693
4680
|
["EV_TIMEOUT", F.EVF_OUTPUT_EVENT],
|
|
4694
4681
|
["EV_TIMEOUT_PERIODIC", F.EVF_OUTPUT_EVENT],
|
|
4695
4682
|
[0, 0]
|
|
4696
|
-
], t,
|
|
4683
|
+
], t, pi, 0, fi, gi, 0, 0, 0, P.gcflag_manual_start)) ? 0 : -1;
|
|
4697
4684
|
}("C_TIMER");
|
|
4698
4685
|
}, e.register_c_yuno = function() {
|
|
4699
4686
|
return function(e) {
|
|
4700
|
-
if (
|
|
4687
|
+
if (ji) return ir(`GClass ALREADY created: ${e}`), -1;
|
|
4701
4688
|
const t = [["ST_IDLE", [[
|
|
4702
4689
|
"EV_TIMEOUT_PERIODIC",
|
|
4703
|
-
|
|
4690
|
+
Ri,
|
|
4704
4691
|
null
|
|
4705
4692
|
]]]];
|
|
4706
|
-
return (
|
|
4693
|
+
return (ji = Ke(e, [["EV_TIMEOUT_PERIODIC", F.EVF_OUTPUT_EVENT | F.EVF_NO_WARN_SUBS], [0, 0]], t, Ai, 0, Ei, Ti, 0, 0, 0, 0)) ? 0 : -1;
|
|
4707
4694
|
}("C_YUNO");
|
|
4708
4695
|
}, e.safeSrc = function(e) {
|
|
4709
4696
|
if (!e) return "";
|
|
4710
4697
|
const t = String(e).trim();
|
|
4711
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
4698
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Vl(t);
|
|
4712
4699
|
}, e.sdata_flag_t = R, e.send_http_json_post = function(e, t, n) {
|
|
4713
4700
|
let r = new XMLHttpRequest();
|
|
4714
4701
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
@@ -4732,9 +4719,9 @@
|
|
|
4732
4719
|
}
|
|
4733
4720
|
} else xn = e;
|
|
4734
4721
|
}, e.set_remote_log_functions = Xn, e.set_strings_are_text = function(e) {
|
|
4735
|
-
|
|
4736
|
-
}, e.set_timeout =
|
|
4737
|
-
return
|
|
4722
|
+
Bl = !!e;
|
|
4723
|
+
}, e.set_timeout = hi, e.set_timeout_periodic = yi, e.sprintf = n, e.stats_parser = function(e, t, n, r) {}, e.str_in_list = kl, e.strcasecmp = nl, e.strcmp = tl, e.strings_are_text = function() {
|
|
4724
|
+
return Bl;
|
|
4738
4725
|
}, e.strncmp = function(e, t, n) {
|
|
4739
4726
|
var r = (e + "").substring(0, n), o = (t + "").substring(0, n);
|
|
4740
4727
|
return r === o ? 0 : r > o ? 1 : -1;
|
|
@@ -4764,9 +4751,9 @@
|
|
|
4764
4751
|
let e = t.split(".");
|
|
4765
4752
|
for (let t = 0; t < e.length; t++) {
|
|
4766
4753
|
let r = e[t];
|
|
4767
|
-
if (kl(
|
|
4768
|
-
else if (kl(
|
|
4769
|
-
else if (kl(
|
|
4754
|
+
if (kl(ai, r)) n.real_type || (n.real_type = r);
|
|
4755
|
+
else if (kl(_i, r)) n.type || (n.type = r);
|
|
4756
|
+
else if (kl(ui, r)) switch (r) {
|
|
4770
4757
|
case "writable":
|
|
4771
4758
|
n.is_writable = !0;
|
|
4772
4759
|
break;
|
|
@@ -4778,7 +4765,7 @@
|
|
|
4778
4765
|
}
|
|
4779
4766
|
}
|
|
4780
4767
|
n.real_type || (n.real_type = "string");
|
|
4781
|
-
} else Bo(t) ? (n =
|
|
4768
|
+
} else Bo(t) ? (n = ci(t), n.name || (n.name = e), n.header || (n.header = e)) : Yo(t) && (n.real_type = "array", n.enum_list = t);
|
|
4782
4769
|
return n.type || (n.type = n.real_type), n;
|
|
4783
4770
|
}, e.timeTracker = function(e = "Time Tracker", t = !1) {
|
|
4784
4771
|
const n = e, r = performance.now();
|
|
@@ -4790,7 +4777,7 @@
|
|
|
4790
4777
|
total: a
|
|
4791
4778
|
};
|
|
4792
4779
|
} };
|
|
4793
|
-
}, e.trace_json = _r, e.trace_json_masked = $o, e.trace_level_t = B, e.trace_msg = ur, e.treedb_decoder_fkey =
|
|
4780
|
+
}, e.trace_json = _r, e.trace_json_masked = $o, e.trace_level_t = B, e.trace_msg = ur, e.treedb_decoder_fkey = si, e.treedb_decoder_hook = function(e, t) {
|
|
4794
4781
|
if (Jo(t)) {
|
|
4795
4782
|
if (-1 === t.indexOf("^")) {
|
|
4796
4783
|
let n, r = e.hook;
|
|
@@ -4817,9 +4804,9 @@
|
|
|
4817
4804
|
id: t.id
|
|
4818
4805
|
} : (ir("bad hook 3"), ir(e), ir(t), null);
|
|
4819
4806
|
}, e.treedb_encoder_fkey = function(e, t) {
|
|
4820
|
-
let n =
|
|
4807
|
+
let n = si(e, t);
|
|
4821
4808
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
4822
|
-
}, e.treedb_get_field_desc =
|
|
4809
|
+
}, e.treedb_get_field_desc = ci, e.treedb_hook_data_size = function(e) {
|
|
4823
4810
|
if (Yo(e) && 1 === xo(e)) {
|
|
4824
4811
|
let t = e[0];
|
|
4825
4812
|
return ll(t, "size") ? t.size : 1;
|